# Forecasting Intermittent Demand with zeroes in times series

I am trying to forecast intermittent demand (slow movers and extreme slow movers).

Here's the type of data I am working with

• weekly data so I cannot really group it
• has zeroes in time series
• not sure if seasonal (at least not visibly)

Based on some research, I think I can use Croston's method for this type of data, but I want to know what the general approach is for handling this type of lumpy data with zeroes in it.

Burning questions for now would be-

1. How to handle zeroes in data

2. What models are generally used for Intermittent data

3. How to model seasonality if it's present

I am using R for my analysis.

I found the article by professor Hyndman for forecasting intermittent data very helpful. Although its main focus is on the error measurements, it suggests four simple models for forecasting intermittent data:

• The historical mean

• The naïve or random walk method

• Simple exponential smoothing
• As you suggested, and the most common for intermittent data as far as I know; Croston’s method for intermittent demands (Boylan, 2005)

I took the liberty of adding the tag to your question. You may want to browse through earlier questions carrying this tag.

As you note, the most common approach to modeling intermittent demands is . An alternative is to fit a simple overall Poisson distribution, since your data don't exhibit any obvious dynamics.

A few earlier threads that may be interesting:

1) I wouldn't have considered the time series shown in the OP as intermittent. As far as sales for a single SKU/loc go, that's a pretty dense time series, and SES or moving average would work better than Croston's, would you agree?

There is no ironclad definition of what precisely an intermittent time series is. I agree that these here are not overly intermittent, compared to some other highly intermittent series you might encounter. However, there are still 32 zeros out of 103 observations.

I suspect that SES or MA would certainly be competitive, but I would not declare a priori that they would work better than Croston's method. (By "better", do you mean in terms of MSE, or MAE? This makes a difference, especially for count data.)

2) Why did you mention Poisson but not negative binomial?

Yes, the negbin is another possibility, and I do like it a lot, but the overdispersion is not blatant here. The mean is 1.36, the variance 1.51, and a formal test for overdispersion comes up insignificant:

foo <- structure(list(Week = structure(c(17054, 17061, 17068, 17075,
17082, 17089, 17096, 17103, 17110, 17117, 17124, 17131, 17138,
17145, 17152, 17159, 17166, 17173, 17180, 17187, 17201, 17208,
17215, 17222, 17229, 17236, 17243, 17250, 17257, 17264, 17271,
17278, 17285, 17292, 17299, 17306, 17313, 17320, 17327, 17334,
17341, 17348, 17355, 17362, 17369, 17376, 17383, 17390, 17397,
17404, 17411, 17418, 17425, 17432, 17439, 17446, 17453, 17460,
17467, 17474, 17481, 17488, 17495, 17502, 17509, 17516, 17523,
17530, 17537, 17544, 17551, 17558, 17565, 17572, 17579, 17586,
17593, 17600, 17607, 17614, 17621, 17628, 17635, 17642, 17649,
17656, 17663, 17670, 17677, 17684, 17691, 17698, 17705, 17712,
17719, 17726, 17733, 17740, 17747, 17754, 17761, 17768, 17775
), class = "Date"), Value = c(2L, 1L, 0L, 4L, 0L, 0L, 2L, 1L,
1L, 0L, 0L, 2L, 1L, 2L, 0L, 1L, 1L, 0L, 2L, 0L, 1L, 3L, 3L, 0L,
2L, 0L, 3L, 1L, 3L, 0L, 2L, 2L, 0L, 2L, 3L, 3L, 5L, 0L, 2L, 1L,
0L, 3L, 1L, 0L, 0L, 0L, 0L, 1L, 1L, 1L, 4L, 0L, 0L, 1L, 3L, 0L,
0L, 1L, 2L, 0L, 1L, 0L, 2L, 2L, 1L, 2L, 0L, 1L, 0L, 3L, 2L, 2L,
2L, 1L, 1L, 2L, 2L, 3L, 4L, 3L, 2L, 1L, 0L, 3L, 1L, 1L, 3L, 0L,
1L, 0L, 1L, 2L, 0L, 1L, 4L, 3L, 1L, 2L, 1L, 3L, 0L, 0L, 2L)), row.names = c(NA,
-103L), class = "data.frame")

with(foo,plot(Week,Value,type="o",pch=19))
hist(foo$$Value,breaks=seq(-0.5,max(foo$$Value)+0.5))

library(AER)
dispersiontest(glm(foo$Value~1,family="poisson"))  yields  Overdispersion test data: glm(foo$Value ~ 1, family = "poisson")
z = 0.79877, p-value = 0.2122
alternative hypothesis: true dispersion is greater than 1
sample estimates:
dispersion
1.09792


And of course, if all we are interested in is an expectation point forecast, the best forecast would be the historical mean, no matter whether we model the series as Poisson or negbin distributed.

• I'm curious (since you also work in demand forecasting) about two points: 1) I wouldn't have considered the time series shown in the OP as intermittent. As far as sales for a single SKU/loc go, that's a pretty dense time series, and SES or moving average would work better than Croston's, would you agree? 2) Why did you mention Poisson but not negative binomial? – Skander H. Oct 25 '18 at 17:29
• @Alex: good questions. I edited my answer to address them. Does this help? – Stephan Kolassa Oct 26 '18 at 12:16
• Actually I realized just now that that time series might seem dense for somebody in fashion retail like myself, but would qualify as intermittent for a grocer or a CPG company. – Skander H. Oct 26 '18 at 23:00