Stop 11 · Time Series AnalysisTopics · 4/7

Exponential Smoothing

Part of the Data Science Roadmap

In short

Exponential smoothing forecasts by trusting recent data more than old data. It's simple, fast and surprisingly hard to beat, which is why it runs inside lots of demand planning tools.

A family of forecasting methods that weight recent observations more heavily than older ones — simple, fast, and often a genuinely strong baseline before reaching for more complex models.

The mascot sits at a bus stop checking a wristwatch as a friend comes running in late.

Think of it like this

Your friend's punctuality

Will your friend be late today? You don't average every meeting since Class 6. Last week's lateness matters most, last month's a bit, school days barely at all. Older memories fade gradually. That fading weight is exactly how exponential smoothing works.

Watch it happen

Weights given to past days when alpha = 0.5

0.5
0
0.25
1
0.125
2
0.0625
3
0.03125
4

1/4Each cell is the weight on one past day, newest on the left.

The big ideas

What you need to know

Simple smoothing

Only a level. Good for series with no clear trend or season, like steady daily demand.

Holt adds trend

A second smoothing equation tracks the slope, so forecasts keep rising or falling.

Holt-Winters adds season

A third equation tracks the seasonal pattern, additive or multiplicative.

Learned weights

statsmodels picks alpha, beta and gamma by minimising errors on your history.

See it in code

Walk through the code

python
1import numpy as np2import pandas as pd3from statsmodels.tsa.holtwinters import ExponentialSmoothing4 5idx = pd.date_range("2023-01-01", periods=48, freq="MS")6y = pd.Series(200 + 2 * np.arange(48) + 20 * np.sin(2 * np.pi * np.arange(48) / 12), index=idx)7 8fit = ExponentialSmoothing(y, trend="add", seasonal="add", seasonal_periods=12).fit()9print(fit.params["smoothing_level"])10print(fit.forecast(6))

1/448 months of a series with a steady rise and a yearly wave.

Holt-Winters with an additive trend and a 12-month season, fitted to four years of monthly data.

Save yourself the pain

Common mistakes

Oops

Using simple exponential smoothing on a series with a strong trend.

Do this instead

Simple smoothing forecasts a flat line. Add trend='add' (Holt) when the series keeps rising or falling.

Oops

Fitting a 12-month season with only 15 months of data.

Do this instead

Have at least two full seasonal cycles, ideally more, before modelling seasonality.

Your mission

Three smoothers, one dataset

~30 min

Quick check

What happens when you raise alpha towards 1 in simple exponential smoothing?

Go deeper

  1. 1Fit a simple exponential smoothing model and compare it to your ARIMA baseline.
  2. 2Learn the difference between simple, double (trend), and triple (seasonal) exponential smoothing.
  3. 3Understand why simpler models sometimes outperform complex ones on noisy, short series.

More topics at this stop

Stuck on this topic? Ask an Insider

Get 1:1 guidance from people who've walked this exact path — on the InsideEdge app.

Download
InsideEdge