A common objective of time series modeling is generating forecasts for a process over a future time horizon. That is, given an observed series y1, y2,...,yN and a forecast horizon h, generate predictions for
Let denote a forecast for the process at time t + 1, conditional on the history of the process up to time t, Ht, and the exogenous covariate series up to time t + 1, Xt + 1, if a regression component is included in the model. The minimum mean square error (MMSE) forecast is the forecast that minimizes expected square loss,
Minimizing this loss function yields the MMSE forecast,
forecast method generates MMSE forecasts
recursively. When you call
forecast, you can specify
presample observations (
Y0), innovations (
conditional variances (
V0), and exogenous covariate
X0) using name-value arguments. If you include
presample exogenous covariate data, then you must also specify exogenous
covariate forecasts (
To begin forecasting from the end of an observed series, say
use the last few observations of
Y as presample
Y0 to initialize the forecast. There
are several points to keep in mind when you specify presample data:
The minimum number of responses needed to initialize
forecasting is stored in the property
P of an
If you provide too few presample observations,
If you do not provide any presample responses, then
For models that are stationary and do not contain a regression component, all presample observations are set to the unconditional mean of the process.
For nonstationary models or models with a regression component, all presample observations are set to zero.
If you forecast a model with an MA component, then
presample innovations. The number of innovations needed is stored
in the property
Q of an
If you also have a conditional variance model, you must additionally
account for any presample innovations it requires. If you specify
presample innovations, but not enough,
If you forecast a model with a regression component,
forecast requires presample exogenous covariate
data. The number of presample exogenous covariate data needed is at
least the number of presample responses minus
If you provide presample exogenous covariate data, but not enough,
forecast returns an error.
If you do not specify any presample innovations, but
specify sufficient presample responses (at least
and exogenous covariate data (at least the number of presample responses
infers presample innovations. In general, the longer the presample
response series you provide, the better the inferred presample innovations
will be. If you provide presample responses and exogenous covariate
data, but not enough,
forecast sets presample innovations
equal to zero.
Consider generating forecasts for an AR(2) process,
Given presample observations and forecasts are recursively generated as follows:
For a stationary AR process, this recursion converges to the unconditional mean of the process,
For an MA(12) process, e.g.,
you need 12 presample innovations to initialize the forecasts. All innovations from time N + 1 and greater are set to their expectation, zero. Thus, for an MA(12) process, the forecast for any time more than 12 steps in the future is the unconditional mean, μ.
The forecast mean square error for an s-step ahead forecast is given by
Consider a conditional mean model given by
where . Sum the variances of the lagged innovations to get the s-step MSE,
where denotes the innovation variance.
For stationary processes, the coefficients of the infinite lag operator polynomial are absolutely summable, and the MSE converges to the unconditional variance of the process.
For nonstationary processes, the series does not converge, and the forecast error grows over time.