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.
- Expand the ARIMA equation so that \(y_t\) is on the left hand side and all other terms are on the right.
- Rewrite the equation by replacing \(t\) with \(T+h\).
- 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,\dots\) 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-\hat{\phi}_1B -\hat{\phi}_2B^2-\hat{\phi}_3B^3)(1-B) y_t = (1+\hat{\theta}_1B)e_{t}, \] where \(\hat{\phi}_1=0.004\), \(\hat{\phi}_2=0.092\), \(\hat{\phi}_3=0.37\) and \(\hat{\theta}_1=-0.392\). Then we expand the left hand side to obtain \[ \left[1-(1+\hat{\phi}_1)B +(\hat{\phi}_1-\hat{\phi}_2)B^2 + (\hat{\phi}_2-\hat{\phi}_3)B^3 +\hat{\phi}_3B^4\right] y_t = (1+\hat{\theta}_1B)e_{t}, \] and applying the backshift operator gives \[ y_t - (1+\hat{\phi}_1)y_{t-1} +(\hat{\phi}_1-\hat{\phi}_2)y_{t-2} + (\hat{\phi}_2-\hat{\phi}_3)y_{t-3} +\hat{\phi}_3y_{t-4} = e_t+\hat{\theta}_1e_{t-1}. \] Finally, we move all terms other than \(y_t\) to the right hand side: \[\begin{equation} \tag{8.6} y_t = (1+\hat{\phi}_1)y_{t-1} -(\hat{\phi}_1-\hat{\phi}_2)y_{t-2} - (\hat{\phi}_2-\hat{\phi}_3)y_{t-3} -\hat{\phi}_3y_{t-4} + e_t+\hat{\theta}_1e_{t-1}. \end{equation}\] 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): \[ y_{T+1} = (1+\hat{\phi}_1)y_{T} -(\hat{\phi}_1-\hat{\phi}_2)y_{T-1} - (\hat{\phi}_2-\hat{\phi}_3)y_{T-2} -\hat{\phi}_3y_{T-3} + e_{T+1}+\hat{\theta}_1e_{T}. \] Assuming we have observations up to time \(T\), all values on the right hand side are known except for \(e_{T+1}\), which we replace with zero, and \(e_T\), which we replace with the last observed residual \(\hat{e}_T\): \[ \hat{y}_{T+1|T} = (1+\hat{\phi}_1)y_{T} -(\hat{\phi}_1-\hat{\phi}_2)y_{T-1} - (\hat{\phi}_2-\hat{\phi}_3)y_{T-2} -\hat{\phi}_3y_{T-3} + \hat{\theta}_1\hat{e}_{T}. \]
A forecast of \(y_{T+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 \(y_{T+1}\) which we replace with \(\hat{y}_{T+1|T}\), and \(e_{T+2}\) and \(e_{T+1}\), both of which we replace with zero: \[ \hat{y}_{T+2|T} = (1+\hat{\phi}_1)\hat{y}_{T+1|T} -(\hat{\phi}_1-\hat{\phi}_2)y_{T} - (\hat{\phi}_2-\hat{\phi}_3)y_{T-1} -\hat{\phi}_3y_{T-2}. \]
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 \(\hat{\sigma}\) is the standard deviation of the residuals, then a 95% prediction interval is given by \(\hat{y}_{T+1|T} \pm 1.96\hat{\sigma}\). 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 \[ y_t = e_t + \sum_{i=1}^q \theta_i e_{t-i}. \] Then, the estimated forecast variance can be written as \[ \sigma_h = \hat{\sigma}^2 \left[ 1 + \sum_{i=1}^{h-1} \hat{\theta}_i^2\right], \qquad\text{for $h=2,3,\dots$,} \] and a 95% prediction interval is given by \(\hat{y}_{T+h|T} \pm 1.96\sqrt{\sigma_h}\).
In Section 8.4, we showed that an AR(1) model can be written as an MA(\(\infty\)) 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.