Moving average and exponential smoothing
The honest way to test a forecasting method is to hide part of the data from it. The last two weeks on the chart are grey: the methods never saw them, and MAPE is computed on exactly those days. The three methods on offer differ in one thing โ what they remember about the past. A moving average remembers the last few days with equal weight, exponential smoothing remembers every day with a decaying one, and HoltโWinters additionally keeps the trend and the seasonality as separate numbers.
Moving average and simple smoothing forecast a flat line: they carry no trend or seasonality. HoltโWinters keeps all three components, so its forecast keeps the weekly shape.
A moving average as a forecast works crudely: take the mean of the last few days and declare it the answer for every day ahead. Hence the flat dashed line. The right panel shows what that answer is made of: inside the window every day has the same weight, outside it the weight is zero.
Move the window down to 2 days, then up to 21. What happens to the smoothed line and to the error?
What it means
In reports a moving average is used less for forecasting than for smoothing the chart: MA(7) removes the weekly sawtooth and makes the dynamics readable. As a forecast it serves mainly as a baseline.
HoltโWinters is a sensible working baseline for metrics with a pronounced week or year: sales, orders, attendance. In statsmodels it is ExponentialSmoothing with the trend and seasonal parameters.
The parameters ฮฑ, ฮฒ, ฮณ are not tuned by hand: libraries estimate them from the data by minimising the error on history. Manual tuning is only needed when there is a substantive requirement โ for instance, to react to a level shift faster than history suggests.
Where it shows up
Demand forecasting in retail was built on exponential smoothing for decades: the method is cheap to compute and robust, and a chain has tens of thousands of such series.
ยซAverage speed over the last 5 minutesยป in a navigator and ยซaverage loadยป in monitoring are the same moving average, applied to a stream.
In the M-series forecasting competitions simple methods from this family regularly placed above complex models โ especially on short series with few observations.
Definitions
When the method lies (assumptions)
Both simple methods assume the level changes slowly and without structure. A sharp shift โ a price change, a launch in a new city โ is picked up late, and the smaller ฮฑ is, the later.
Additive seasonality in HoltโWinters assumes a constant size of the cycle. If the swings grow with the level, the multiplicative variant or a log of the series is needed.
Deep dive: the math and the mechanism (optional)
Simple exponential smoothing and ARIMA are not rivals but relatives: smoothing with parameter ฮฑ is exactly an ARIMA(0,1,1) model with ฮธ = ฮฑโ1. Holt's method with a trend corresponds to ARIMA(0,2,2). The difference is in the language of description: ETS talks about the components of a series, ARIMA about autocorrelation โ and the resulting forecast can coincide.
Not every ETS model can be written as an ARIMA: variants with multiplicative seasonality and with a damped trend fall outside linear ARIMA models. The damped trend, by the way, is the most practical of them: it extends the growth but gradually reins it in, so on a long horizon it does not fly off to infinity the way plain Holt does.