Search code examples
rparametersforecastingholtwinters

How to avoid 0 forecasts for a time series with decreasing trend?


I am trying to apply the holt-winter method to multiple time series with 36 data points and trying to predict for 16 future time periods in R. There are some time series with a decreasing trend for which I am getting negative numbers as forecast values. How can I avoid generating negative numbers as forecast?

I have already tried generating forecast with damped = T, but still negative numbers are generated as forecasts.

fit_ets1 <- ets(y = sales_ts1, model = "ZZZ")
fit_ets_forecast1 <- forecast(fit_ets1, h = holdoutPeriod)

Solution

  • fit_ets1 <- ets(y = sales_ts1, model = "ZZZ", lambda=0)
    fit_ets_forecast1 <- forecast(fit_ets1, h = holdoutPeriod, biasadj=TRUE)
    

    This will create forecasts on the log scale, so the back-transformed forecasts will be positive. See https://otexts.com/fpp2/limits.html.