# Time series with a sequence of zeros

I am trying to model a time series that contains a sequence of zeros. I tried fitting an ARIMA model using auto.arima function from the forecast package in R but the MAPE is reported as infinity (probably due to division by zero). Moreover, the auto.arima fits an ARIMA(0,1,0) model over the data.

Can you suggest any types of models that may be appropriate for such data?

• I am curious what that data represents. Could you give us a little background information? I agree that MAPE may be zero because of division by zero. Commented Feb 28, 2016 at 17:16
• Such series can be found in hydrology and meteorology. For example we may have 0 precipitation for several hours or 0 temperature for several hours or no sales (business application) for several days etc. Commented Feb 28, 2016 at 18:09
• @RichardHardy Such a time series could also be representative of interest rate data that has hit the zero lower bound. Commented Feb 28, 2016 at 18:54
• Thanks to both of you. I was not interested in the general case but in this particular one so as to get a better idea of modelling choices that are relevant to this particular question. Commented Feb 28, 2016 at 22:23
• @RichardHardy I am applying it to precipitation and temperature series. Both values have zeros as described in the question. Commented Feb 29, 2016 at 3:58

A common approach to handle many zeroes in a time series is to use a Croston Model. To implement this model with your time series there are two R packages forecast and tsintermittent. The tsintermittent package optimizes the Croston model $\alpha$ parameter whereas the forecast package produces a forecast for a given $\alpha$ value.

This is not the only approach to forecasting a time series w/ a sequence of zeroes but is a common approach. Another approach would be to fit a zero-inflated or hurdle model.

However, as mentioned in the comments of the post by the OP, the measurements could be continuous on the positive half-line. With non-negative measurements and a zero point mass the most likely approach would be a Tweedie regression. Here is a good post from SO with example codes: https://stackoverflow.com/questions/21807118/r-codes-for-tweedie-compound-poisson-gamma

• Tweedie distribution doesn't seems a proper tool to forecast a seasonal time series for me . Could you mind to make more explanation ? Commented Aug 21, 2019 at 9:18
• LSTM is not able to process timeseries with lots of 0s please?
– Avv
Commented Jul 9, 2021 at 13:56