Solved – How to use Holt-Winters’ seasonal multiplicative method when the data has zero values

exponential-smoothingtime series

I understand that the Holt-Winters' seasonal multiplicative method needs the data to have non-zero values. Accordingly, functions such as statsmodels.tsa.holtwinters.ExponentialSmoothing do not allow for the use of multiplicative seasonality (or trend) if the data contains zeros – or even negative values.

But many seasonal time series do contain zeros, and I would expect it to be possible to use the same methods maybe with some trick to make it work.

In my particular case, I added 0.01 to all entries of my dataset, and then the algorithm ran well with decent results. But it seems fishy.

Is this what one should do, or is it something else?

Best Answer

Yes, it's ideal for there not to be zeroes. I'm not sure what software you're using but there are implementations of exponential smoothing that won't fail just because there's one zero. The results might be wonky (if something is zero 25% of the time, then shifts to 5% of the time, the model might end up showing that as an exponential trend).

Adding a small number to all observations and then subtracting it from the forecast is an acceptable workaround as far as I'm concerned. I have used it in the past when forecasting across many time series, some that had zeroes and some that didn't, and wanting to avoid wonky results on the intermittent ones (which in my case, was okay because by definition a series that had lower values was less important and didn't justify spending a lot of time to improve the model).