Time Series Analysis – How to Decompose a Time Series with Zero Values Using Seasonality and LOESS Methods

decompositionintermittent time seriesloessseasonalitytime series

There are many techniques to decompose a time series into trend, seasonal, and remainder components. I was wondering if these techniques can be applied without worry to time series which have some zero values. I think that the answer may be different according to the decomposition method used and to the observed ratio of zero to non zero values.

Since the question might sound too broad, I'll focus on just two decomposition methods: decomposition using a moving average and the STL procedure. I'm worried that the estimate of the seasonal component will be biased by the presence of the zero values. Intuitively, if the time series isn't too short, I'd say that the seasonal component will not be too much affected if the ratio of zero to non zero values is low. But how can I ensure that the zero values aren't too many? I'd like to know if I should aggregate the data until there are non more zero values (such as considering data by quarters instead that by month) or if I need to apply specific techniques which can handle zero values.

Thank you in advance

Best Answer

Additive models for seasonal-trend decomposition should have no problem with zero values. With additive models

data = seasonality + trend + residual

the trend will be calculated adjust to the appropriate level, which can be near zero without any restriction.

If there were reason to believe that the composition should be multiplicative, then zero values would be problematic.