8.8 Forecasting

Point forecasts

Although we have calculated forecasts from the ARIMA models in our examples, we have not yet explained how they are obtained. Point forecasts can be calculated using the following three steps.

  1. Expand the ARIMA equation so that yt is on the left hand side and all other terms are on the right.
  2. Rewrite the equation by replacing t with T+h.
  3. On the right hand side of the equation, replace future observations with their forecasts, future errors with zero, and past errors with the corresponding residuals.

Beginning with h=1, these steps are then repeated for h=2,3, until all forecasts have been calculated.

The procedure is most easily understood via an example. We will illustrate it using the ARIMA(3,1,1) model fitted in the previous section. The model can be written as follows: (1ˆϕ1Bˆϕ2B2ˆϕ3B3)(1B)yt=(1+ˆθ1B)et, where ˆϕ1=0.004, ˆϕ2=0.092, ˆϕ3=0.37 and ˆθ1=0.392. Then we expand the left hand side to obtain [1(1+ˆϕ1)B+(ˆϕ1ˆϕ2)B2+(ˆϕ2ˆϕ3)B3+ˆϕ3B4]yt=(1+ˆθ1B)et, and applying the backshift operator gives yt(1+ˆϕ1)yt1+(ˆϕ1ˆϕ2)yt2+(ˆϕ2ˆϕ3)yt3+ˆϕ3yt4=et+ˆθ1et1. Finally, we move all terms other than yt to the right hand side: yt=(1+ˆϕ1)yt1(ˆϕ1ˆϕ2)yt2(ˆϕ2ˆϕ3)yt3ˆϕ3yt4+et+ˆθ1et1. This completes the first step. While the equation now looks like an ARIMA(4,0,1), it is still the same ARIMA(3,1,1) model we started with. It cannot be considered an ARIMA(4,0,1) because the coefficients do not satisfy the stationarity conditions.

For the second step, we replace t with T+1 in (8.6): yT+1=(1+ˆϕ1)yT(ˆϕ1ˆϕ2)yT1(ˆϕ2ˆϕ3)yT2ˆϕ3yT3+eT+1+ˆθ1eT. Assuming we have observations up to time T, all values on the right hand side are known except for eT+1, which we replace with zero, and eT, which we replace with the last observed residual ˆeT: ˆyT+1|T=(1+ˆϕ1)yT(ˆϕ1ˆϕ2)yT1(ˆϕ2ˆϕ3)yT2ˆϕ3yT3+ˆθ1ˆeT.

A forecast of yT+2 is obtained by replacing t with T+2 in (8.6) . All values on the right hand side will be known at time T except yT+1 which we replace with ˆyT+1|T, and eT+2 and eT+1, both of which we replace with zero: ˆyT+2|T=(1+ˆϕ1)ˆyT+1|T(ˆϕ1ˆϕ2)yT(ˆϕ2ˆϕ3)yT1ˆϕ3yT2.

The process continues in this manner for all future time periods. In this way, any number of point forecasts can be obtained.

Prediction intervals

The calculation of ARIMA prediction intervals is more difficult, and the details are largely beyond the scope of this book. We will only give some simple examples.

The first prediction interval is easy to calculate. If ˆσ is the standard deviation of the residuals, then a 95% prediction interval is given by ˆyT+1|T±1.96ˆσ. This result is true for all ARIMA models regardless of their parameters and orders.

Multi-step prediction intervals for ARIMA(0,0,q) models are relatively easy to calculate. We can write the model as yt=et+qi=1θieti. Then, the estimated forecast variance can be written as σh=ˆσ2[1+h1i=1ˆθ2i],for h=2,3,, and a 95% prediction interval is given by ˆyT+h|T±1.96σh.

In Section 8.4, we showed that an AR(1) model can be written as an MA() model. Using this equivalence, the above result for MA(q) models can also be used to obtain prediction intervals for AR(1) models.

More general results, and other special cases of multi-step prediction intervals for an ARIMA(p,d,q) model, are given in more advanced textbooks such as Brockwell and Davis (2016).

The prediction intervals for ARIMA models are based on assumptions that the residuals are uncorrelated and normally distributed. If either of these assumptions does not hold, then the prediction intervals may be incorrect. For this reason, always plot the ACF and histogram of the residuals to check the assumptions before producing prediction intervals.

In general, prediction intervals from ARIMA models increase as the forecast horizon increases. For stationary models (i.e., with d=0) they will converge, so that prediction intervals for long horizons are all essentially the same. For d>1, the prediction intervals will continue to grow into the future.

As with most prediction interval calculations, ARIMA-based intervals tend to be too narrow. This occurs because only the variation in the errors has been accounted for. There is also variation in the parameter estimates, and in the model order, that has not been included in the calculation. In addition, the calculation assumes that the historical patterns that have been modelled will continue into the forecast period.

References

Brockwell, Peter J, and Richard A Davis. 2016. Introduction to Time Series and Forecasting. 3rd ed. New York: Springer.