Forecast ARIMA or ARIMAX model responses or conditional variances

```
[Y,YMSE]
= forecast(Mdl,numperiods,Y0)
```

[Y,YMSE] = forecast(Mdl,numperiods,Y0,Name,Value)

[Y,YMSE,V]
= forecast(___)

`[`

returns `Y`

,`YMSE`

]
= forecast(`Mdl`

,`numperiods`

,`Y0`

)`numperiods`

consecutive forecasted responses `Y`

and corresponding mean square errors `YMSE`

of the fully specified,
univariate ARIMA or ARIMAX model `Mdl`

. The presample response data
`Y0`

initializes the model to generate forecasts.

`[`

uses additional options specified by one or more name-value pair arguments. For example, for a
model with a regression component, `Y`

,`YMSE`

] = forecast(`Mdl`

,`numperiods`

,`Y0`

,`Name,Value`

)`'X0',X0,'XF',XF`

specifies the presample
and forecasted predictor data `X0`

and `XF`

,
respectively.

`[`

also forecasts `Y`

,`YMSE`

,`V`

]
= forecast(___)`numperiods`

conditional variances `V`

of a
composite conditional mean and variance model (for example, an ARIMA and GARCH composite
model) using any of the input argument combinations in the previous syntaxes.

`forecast`

sets the number of sample paths to forecast`numpaths`

to the maximum number of columns among the presample data sets`E0`

,`V0`

, and`Y0`

. All presample data sets must have either`numpaths`

> 1 columns or one column. Otherwise,`forecast`

issues an error. For example, if`Y0`

has five columns, representing five paths, then`E0`

and`V0`

can either have five columns or one column. If`E0`

has one column, then`forecast`

applies`E0`

to each path.`NaN`

values in presample and future data sets indicate missing data.`forecast`

removes missing data from the presample data sets following this procedure:`forecast`

horizontally concatenates the specified presample data sets`Y0`

,`E0`

,`V0`

, and`X0`

such that the latest observations occur simultaneously. The result can be a jagged array because the presample data sets can have a different number of rows. In this case,`forecast`

prepads variables with an appropriate amount of zeros to form a matrix.`forecast`

applies list-wise deletion to the combined presample matrix by removing all rows containing at least one`NaN`

.`forecast`

extracts the processed presample data sets from the result of step 2, and removes all prepadded zeros.

`forecast`

applies a similar procedure to the forecasted predictor data`XF`

. After`forecast`

applies list-wise deletion to`XF`

, the result must have at least`numperiods`

rows. Otherwise,`forecast`

issues an error.List-wise deletion reduces the sample size and can create irregular time series.

When

`forecast`

estimates MSEs`YMSE`

of the conditional mean forecasts`Y`

, the function treats the specified predictor data sets`X0`

and`XF`

as exogenous, nonstochastic, and statistically independent of the model innovations. Therefore,`YMSE`

reflects the variance associated with the ARIMA component of the input model`Mdl`

alone.

[1] Baillie, R., and T. Bollerslev. “Prediction in Dynamic Models with
Time-Dependent Conditional Variances.” *Journal of
Econometrics*. Vol. 52, 1992, pp. 91–113.

[2] Bollerslev, T. “Generalized Autoregressive Conditional
Heteroskedasticity.” *Journal of Econometrics*. Vol. 31, 1996,
pp. 307–327.

[3] Bollerslev, T. “A Conditionally Heteroskedastic Time Series Model for
Speculative Prices and Rates of Return.” *The Review Economics and
Statistics*. Vol. 69, 1987, pp. 542–547.

[4] Box, G. E. P., G. M. Jenkins, and G. C. Reinsel. *Time Series Analysis:
Forecasting and Control* 3rd ed. Englewood Cliffs, NJ: Prentice Hall,
1994.

[5] Enders, W. *Applied Econometric Time Series*. Hoboken, NJ:
John Wiley & Sons, 1995.

[6] Engle, R. F. “Autoregressive Conditional Heteroskedasticity with Estimates
of the Variance of United Kingdom Inflation.” *Econometrica*.
Vol. 50, 1982, pp. 987–1007.

[7] Hamilton, J. D. *Time Series Analysis*. Princeton, NJ:
Princeton University Press, 1994.