209. Overview

209.1. Moving Averages

A family of forecasting methods that produce a forecast as a weighted average of past observations. Each method is a different choice of weights along a single axis: how much should past observations count?

209.1.1. The weighting-scheme axis

Two extremes and two interpolators. All five methods can be written in the form

𝑥̂𝑡,𝑡+1=𝑖=0𝑁1𝑤𝑖𝑥𝑡𝑖

— they only differ in how they choose the weights 𝑤𝑖 (and the window 𝑁).

MethodWindowWeightsFormulaSee
Naïve1(1, 0, 0, …)𝑥̂𝑡,𝑡+1=𝑥𝑡[naive.typ](naive.typ)
SMA𝑀(1/𝑀,,1/𝑀,0,)𝑥̂𝑡,𝑡+1=1𝑀𝑖=0𝑀1𝑥𝑡𝑖[sma.typ](sma.typ)
WMA𝑀(𝑤0,𝑤1,,𝑤𝑀1,0,)𝑥̂𝑡,𝑡+1=𝑤𝑖𝑥𝑡𝑖𝑤𝑖[wma.typ](wma.typ)
SESall𝛼(1𝛼)𝑖 (geometric decay)𝑥̂𝑡,𝑡+1=𝛼𝑖=0𝑡(1𝛼)𝑖𝑥𝑡𝑖ETS(A,N,N)
Cumulative𝑡(1/𝑡,1/𝑡,,1/𝑡)𝑥̂𝑡,𝑡+1=1𝑡𝑖=1𝑡𝑥𝑖[cumulative.typ](cumulative.typ)

209.1.2. Reading the axis

Two endpoints and two interpolators:

Between them, two interpolators:

The full ETS family (all 30 cells, see ets/) generalizes SES by adding trend and seasonal components on top of the level.

209.1.3. When to use each

MethodUse when
NaïveRandom-walk demand (no structure to exploit). Useful baseline — every other method should beat it.
SMASmooth, slowly-changing demand without trend. Easy to explain to non-technical stakeholders.
WMASame as SMA, but you want to give more weight to recent observations without going to full geometric decay.
SESSlowly-changing level + want infinite-history weighting. Most operational forecasting starts here.
CumulativeEstimating a long-run mean (for stable processes) or as a slow-baseline in regime-detection.

209.1.4. Comparing them on the same data

For a stationary series, SMA, WMA, SES, and Cumulative all converge to the same long-run mean — they only differ in how fast they react to changes. For a trending series, all of them lag behind (they’re averages — they smooth out the trend); use ETS or ARIMA if you have trend.

The next four files cover Naïve, SMA, WMA, and Cumulative; SES is in [ets/a-n-n.typ](../ets/a-n-n.typ) as ETS(A, N, N).