About this question
Hard · data_manipulation · Quant Researcher interview question · scipy, numpy, signal_processing, optimization
Exponential Moving Averages (EMA) are critical in quantitative finance for smoothing time-series data while prioritizing recent observations through exponentially decreasing weights. Implementing these filters using optimized signal processing primitives like scipy.signal.lfilter ensures high performance and scalability for large datasets or real-time pipelines compared to standard iterative approaches. Task Implement the function solution(data, alpha) to compute the Exponential Moving Average