Forecasting (Introduction) |
This page and the ones following provide an overview of the techniques and models available in RATS, introduces the instructions you can use to produce forecasts, and discusses some important issues related to producing good forecasts. Most of the information in this chapter applies to all the methods available in RATS, and is recommended reading for anyone doing forecasts with any type of model: ARIMA/Box-Jenkins models and exponential smoothing, Vector Autoregressions (VAR’s), Simultaneous Equations, and State-space models.
The main forecasting instructions are FORECAST and UFORECAST. UFORECAST (univariate forecast) is the simplest of these—as the name implies, it is used only for forecasting (linear) univariate models. FORECAST can handle models with many equations, and with nonlinearities. You can also use PRJ for forecasting certain simple types of models, though its main use is analyzing the in-sample properties of a fitted model.
Note that this deals only with forecasts of the mean of a process, and only for models that are linear in the endogenous variables. Linearity permits simple calculations of the predicted mean of the process. For forecasts of the variance see ARCH and GARCH models. Forecasts of models which are non-linear in the endogenous variables (such as threshold models) require simulation methods.
Consider the basic regression model:
\begin{equation} y_t = {\bf{X}}_t \beta + u_t \label{eq:forecast_simplereg} \end{equation}
Such a model is generally not a self-contained forecasting model unless it is a simple regression on deterministic trend variables and/or lags of the dependent variable. Otherwise, to forecast the future values of \(y\), we either need to know the future values of \(\bf{X}_t\), or the forecasts must be made conditional upon some assumed values for them. It’s also possible to “close” the model by constructing additional equations which will forecast the future \(\bf{X}\)’s.
As a simple example, suppose that we are going to forecast a series of orders using a regression on a linear trend. We have data through 2024:6, but want forecasts out to 2025:12. In order to do this, we need to define the trend series out to 2025:12.
data(format=xls,org=columns) 1986:1 2024:6 orders
set trend 1986:1 2025:12 = t
linreg orders
# constant trend
prj forecast 2024:7 2025:12
Models With Lagged Dependent Variables
If the right hand side of your model includes lags of the dependent variable (that is, if \(bf{X}\) in equation \eqref{eq:forecast_simplereg} contains lagged values of \(y\)), the model is referred to as a dynamic model. One example would be the simple autoregressive model:
\begin{equation} y_t = \alpha + \beta y_{t - 1} + u_t \end{equation}
For such models, you have the choice between computing static forecasts or dynamic forecasts.
Static forecasts are computed as a series of one-step-ahead forecasts, using only actual values for lagged dependent variable terms. You can only compute static forecasts in-sample (or up to one period beyond the end of the sample), because you must have actual data available for the lagged dependent variable terms. Static forecasting will always produce the same forecasted values for a given time period \(T\), regardless of the point in time at which you start computing forecasts.
Dynamic forecasts are multi–step forecasts, where forecasts computed at earlier horizons are used for the lagged dependent variable terms at later horizons. For example, the forecasted value computed for time \(T\) will be used as the first–period lag value for computing the forecast at time \(T+1\), and so on.
For dynamic forecasts, use UFORECAST or FORECAST, which do dynamic forecasting by default. If you want static forecasts instead, you can use the STATIC option on UFORECAST or FORECAST or, for simple linear models, you can use the PRJ instruction.
Note that if you are only forecasting one step ahead, the static and dynamic forecasts will produce the same result. And if your model is itself static (has no lagged dependent variables), you will get identical results with any of the methods just described.
Time Series Models
In “pure” time series models, future values of a series (or group of series) depend only on its (their) past values. This category includes Box–Jenkins (ARIMA), exponential smoothing, and spectral models, as well as VAR systems that do not include other exogenous variables. For all except exponential smoothing and spectral methods, you can use FORECAST to produce dynamic forecasts or, with the STATIC option, one-step-ahead static forecasts (in–sample only). (UFORECAST can be used for single equations).
An ARIMA model with moving average terms also requires lags of the residuals for forecasting. For instance, if
\begin{equation} y_t = \alpha + \varphi {\kern 1pt} y_{t - 1} + u_t + \theta {\kern 1pt} u_{t - 1} \end{equation}
in order to forecast period \(T+1\), a value is needed for the \(u_T\) (\(u_{T+1}\) is a post-sample shock and is set to zero). When you use BOXJENK to estimate an ARIMA model, it will automatically save these.
Copyright © 2025 Thomas A. Doan