Library · Demand and stock

Simple exponential smoothing on intermittent demand

Simple exponential smoothing follows the level of a series with one constant. On intermittent demand its average is right and its timing is wrong: the forecast peaks just after each sale, when the reorder is placed.

By , published

Definition

Simple exponential smoothing (SES) updates a level every period, by a share α of the last error.

level ← level + α ( yt − level ),   forecast = level

The forecast is a weighted average of the past, with weights that decrease geometrically. On a series without trend or season it is hard to beat. Averaged over all periods it is also unbiased on an intermittent series. Croston's remark in 1972 was about when the forecast is used.

Worked example

An item sells in one period out of five. We record the SES forecast in every period, then only in the periods that follow a sale, which is when a reorder system looks at it.

import numpy as np

rng = np.random.default_rng(9)
T, alpha = 200_000, 0.2
y = rng.binomial(1, 0.2, T) * rng.integers(1, 6, T)        # true mean 0.6

level = np.empty(T)
lv = 0.6
for t in range(T):
    lv += alpha * (y[t] - lv)
    level[t] = lv                                           # forecast made after seeing period t

after_sale = y > 0
print(f"true mean demand per period:          0.600")
print(f"SES forecast, average over all periods: {level.mean():.3f}")
print(f"SES forecast right after a sale:        {level[after_sale].mean():.3f}")
print(f"SES forecast after a period with none:  {level[~after_sale].mean():.3f}")

Output, produced by running the code above when this page was built:

true mean demand per period:          0.600
SES forecast, average over all periods: 0.599
SES forecast right after a sale:        1.081
SES forecast after a period with none:  0.480

Over all periods the forecast averages the true mean. Read right after a sale it is far above. A system that reorders when stock is withdrawn reads the forecast at exactly those moments.

Where it misleads

  • The size of the bias after a sale grows with α. A small constant reduces it and makes the forecast slow to follow a real change of level.
  • Under a periodic review, where the forecast is read on fixed dates whatever happened, the decision-point bias does not apply and SES is a strong baseline. In the M5 competition and in our own tests it is rarely far behind the methods built for intermittent demand.
  • The forecast is never exactly zero and never exactly an integer, which matters when it is turned into a count distribution.

Croston's method removes the timing problem by updating only when a demand occurs, at the price of a bias of its own.

In our work

SES is the reference method in our comparisons: every other method is reported as a paired difference against it, with an interval across series.

References

  1. Croston, J. D. (1972). Forecasting and stock control for intermittent demands. Operational Research Quarterly, 23(3), 289-303. doi:10.1057/jors.1972.50
  2. Hyndman, R. J., Athanasopoulos, G. (2021). Forecasting: principles and practice, 3rd edition. OTexts, Melbourne. otexts.com/fpp3
  3. Gardner, E. S. (2006). Exponential smoothing: the state of the art, part II. International Journal of Forecasting, 22(4), 637-666. doi:10.1016/j.ijforecast.2006.03.005

Have a question like this one on your own data? Tell us what you need in a few lines.

Send us the brief

Related pages

  • Croston's methodCroston's method splits an intermittent series in two: how much is ordered when there is an order, and how long between orders. Each is smoothed separately and the forecast is their ratio. The ratio is biased upward.
  • ADIDA: aggregate, forecast, disaggregateADIDA removes zeros by temporal aggregation: months become quarters, and a series that was mostly zeros becomes one that can be smoothed. The forecast is then divided back into the original periods.
  • The zero forecast as a baselineA forecast of zero for every item and every period is useless for stock and has the best absolute error on most intermittent series. Including it in a comparison shows at once whether the error measure can be trusted.
All library pages