1

I have an intermittent time series of the demand of some products. I have read some very useful answers (such as Forecasting Intermittent Demand with zeroes in times series ) as to how one would go about predicting such time series.

In my case though I know already which periods in the future will have no demand as I know days when the products will not be available in the shops.

How would one incorporate this information in the prediction? Should I use something like the croston method and just set to 0 the periods when I know that the demand will be zero? This seems to me like it wouldn't be using all the available information

User2321
  • 113
  • 4

1 Answers1

2

First of all, it makes sense to treat historical zeros due to stockouts separately. (These do not represent unconstrained demands.) I would simply remove these historical periods from the training data so they do not bias your predictions for in-stock periods.

This means that methods that rely on the time series having no "holes", like ARIMA or Exponential Smoothing, will have a problem. So I would go with a simple regression with seasonal dummies, possibly a trend predictor, and predictors for all other drivers like promotions. Use OLS for fast selling products, and some kind of negative binomial regression for slower movers.

If this is a problem, you could also use Boolean predictors for historical stockouts and use a forecasting method that incorporates regressors, like ARIMAX or regression with ARIMA errors.

In forecasting, just forecast with your model. If you know there will be no product, overwrite the forecast with a zero.

This should do as a first pass. You can later elaborate. Perhaps if your product is out of stock, people shift demand to other products (so you might model substitution effects on other products), or they postpone buying the product (so you might model higher demand right after stockouts). If stockouts can be anticipated by the customer, they might even pull demand forward in time.

Stephan Kolassa
  • 95,027
  • 13
  • 197
  • 357
  • That was really helpful, thank you! Regarding the seasonal dummies, can I still incorporate it in the model even though my time-series will be irregular after removing the historical zeros? For example I might remove more Mondays that Tuesdays – User2321 May 04 '20 at 08:52
  • Yes, you can. Just include one dummy for each day of the week (minus one so you are not overparameterized). Your software should convert a factor variable DayOfWeek automatically into the appropriate number of dummies. And it doesn't matter if one dummy is 1 more often than another one. – Stephan Kolassa May 04 '20 at 08:54