Definition
Teunter, Syntetos and Babai proposed in 2011 to smooth the demand probability d, the chance that a period has a demand, and the size z of the demand when there is one.
every period: d ← d + β (1{yt > 0} − d); if yt > 0: z ← z + α (yt − z); forecast = d × z
The probability moves toward 1 after a demand and toward 0 after a period without one, so the forecast is revised every period. The product of the two is an unbiased estimate of the mean demand, with no correction factor.
Worked example
An item sells regularly for 36 months and then stops. The forecast of each method is printed at several dates. The functions come from intermittent-eval, our open-source package (pip install intermittent-eval).
import numpy as np
from intermittent_eval import croston, sba, tsb
rng = np.random.default_rng(8)
alive = rng.binomial(1, 0.4, 36) * rng.integers(1, 5, 36)
y = np.r_[alive, np.zeros(24, dtype=int)] # nothing sold after month 36
print("months seen Croston SBA TSB")
for t in (36, 42, 48, 60):
h = y[:t]
print(f"{t:8d} {croston(h, 0.1):6.3f} {sba(h, 0.1):6.3f} {tsb(h, 0.1, 0.1):6.3f}")Output, produced by running the code above when this page was built:
months seen Croston SBA TSB
36 0.787 0.748 0.486
42 0.787 0.748 0.258
48 0.787 0.748 0.137
60 0.787 0.748 0.039Croston and SBA print the same forecast at month 60 as at month 36: two years without a sale changed nothing. TSB decays at a speed set by β.
Where it misleads
- The forecast also falls during an ordinary gap between two demands. For a healthy item with long intervals, TSB is lowest just before the next order arrives. A small β limits the effect and slows the reaction to a real stop.
- Two constants have to be chosen instead of one, and the starting values of d and z matter on short histories. Our package starts from the mean of the first three demands and the share of non-zero periods in the first twelve; other libraries start differently.
- The decay tells that demand is fading, not why. A seasonal item out of season looks obsolete to TSB.
In our work
We include TSB whenever a catalogue contains items at the end of their life, and we test it against a forecast of zero, which is what TSB converges to.
Service: forecasting and statistical studies Research note: intermittent demand forecasting, measured
References
- Teunter, R. H., Syntetos, A. A., Babai, M. Z. (2011). Intermittent demand: linking forecasting to inventory obsolescence. European Journal of Operational Research, 214(3), 606-615. doi:10.1016/j.ejor.2011.05.018
- Croston, J. D. (1972). Forecasting and stock control for intermittent demands. Operational Research Quarterly, 23(3), 289-303. doi:10.1057/jors.1972.50
- Syntetos, A. A., Boylan, J. E. (2005). The accuracy of intermittent demand estimates. International Journal of Forecasting, 21(2), 303-314. doi:10.1016/j.ijforecast.2004.10.001