Exponential Smoothing
Predict tomorrow by averaging the past with weights that fall by half at each step back, so yesterday shapes the forecast far more than last month.
Why Does This Exist?
A 30 day average treats a sale from 29 days ago exactly like yesterday sale. When a shop runs a promotion yesterday, that equal weighting is wrong on purpose: yesterday tells you far more about tomorrow than last month does.
Exponential smoothing fixes the weighting. It averages the past, but the weights fall geometrically as you look back. With factor alpha at 0.5, yesterday holds half the vote, the day before holds a quarter, then an eighth, and so on. The method needs one number for state, not a full window, which is why it scales to thousands of series.
This page covers simple smoothing for level data without trend or seasonality. The check for persistence that tells you smoothing can work lives in autocorrelation. The general forecaster that adds trend and seasonality lives in ARIMA. The split of level, trend and season lives in time series decomposition.
Think of It Like This
A shopkeeper who trusts yesterday most
A shopkeeper guesses tomorrow bread sales. Yesterday sold out by noon, so that day counts most. The day before counts half as much. Last week counts as background, and last month is barely a whisper. One strong recent day moves the guess, while one strong old day does not.
That maps directly: the guess is the level, yesterday weight is alpha at 0.5, and the whisper of old days is the geometric tail that never fully reaches zero.
Where it stops: the shopkeeper also knows about weekends, holidays and trends. Simple smoothing knows none of that. It only tracks level, so trend and season need their own equations.
How It Actually Works
Call the observation at time , meaning sales on day . Call the smoothed level after seeing , meaning the best guess of the underlying sales rate. Call the smoothing factor between 0 and 1, meaning the share of the vote the newest observation gets. Simple smoothing updates in one line:
The forecast for tomorrow is the current level, . A high near 0.9 reacts fast and keeps little memory. A low near 0.1 moves slowly and trusts history. Before fitting, confirm the series is roughly level and stable with stationarity, and score the result out of sample with forecast evaluation.
Worked example: four days of sales with alpha 0.5
Take daily sales , , , . Start the level at the first sale, . Set .
Day one, :
Day two, :
Day three, :
The forecast for day four is . Unrolled, the weights are 0.50 on 15, 0.25 on 11, 0.125 on 14 and 0.125 on the starting 12, which sum to 1.0. That is the diagram: four sales bars beside three level steps ending at 13.5.
What changes with trend and season
Simple smoothing lags a steady climb because it has no slope term. Holt adds a trend equation with factor . Holt-Winters adds a seasonal equation with factor and a season length like 12 for monthly data. Each extension keeps the same idea: new evidence gets a fixed share, old state keeps the rest.
Code
The point is the check: rebuild the three level steps by hand and confirm 13.0, 12.0 and 13.5.
alpha: float = 0.5level: float = 12.0
level = alpha * 14.0 + (1.0 - alpha) * levelprint(f"{level:.1f}") # -> 13.0
level = alpha * 11.0 + (1.0 - alpha) * levelprint(f"{level:.1f}") # -> 12.0
level = alpha * 15.0 + (1.0 - alpha) * levelprint(f"{level:.1f}") # -> 13.5The printout matches the hand steps. Change alpha to 0.9 and the same three lines jump faster toward each new sale. Change it to 0.1 and the level barely moves.
Watch Out For
Fitting simple smoothing on trended data
A shop with steady growth fits simple smoothing and watches every forecast sit below the actuals, week after week.
Symptom: one step errors stay positive on an upward slope, or negative on a downward slope, instead of scattering around zero. Fix: move to a trend form such as Holt or ARIMA, and confirm the slope need with autocorrelation rather than raising alpha to chase the line.
Letting a trend forecast run to the sky
A Holt model on 20 percent yearly growth projects that same growth forever, which no market sustains.
Symptom: long horizon forecasts climb far past any plausible demand while short horizons look fine. Fix: damp the trend so the slope decays each step ahead, shorten the horizon to what forecast evaluation supports, and recheck time series decomposition for a saturating shape.
The Quick Version
- Exponential smoothing forecasts tomorrow with the current level, which is alpha times today sale plus one minus alpha times yesterday level.
- Our sales of 12, 14, 11 and 15 with alpha 0.5 give levels 13.0, then 12.0, then 13.5, so the next forecast is 13.5.
- The weights fall geometrically: 0.50 on the newest sale, 0.25 next, then 0.125 and 0.125, summing to 1.0.
- High alpha reacts fast and forgets quickly, while low alpha moves slowly and trusts history.
- Simple smoothing tracks level only. Trend needs Holt, and trend plus season needs Holt-Winters.