Documentation Center

  • Trials
  • Product Updates

forecast

Class: gjr

Forecast GJR process

Syntax

V = forecast(model,numPeriods)
V = forecast(model,numPeriods,Name,Value)

Description

V = forecast(model,numPeriods) forecasts the conditional variance of a GJR process over a specified forecast horizon.

V = forecast(model,numPeriods,Name,Value) generates forecasts with additional options specified by one or more Name,Value pair arguments.

Input Arguments

model

gjr model object, as created by gjr or estimate. The input model object cannot have any NaN values.

numPeriods

Positive integer specifying the forecast horizon, in periods consistent with the underlying GJR model and the sampling frequency of any presample data.

Name-Value Pair Arguments

Specify optional comma-separated pairs of Name,Value arguments. Name is the argument name and Value is the corresponding value. Name must appear inside single quotes (' '). You can specify several name and value pair arguments in any order as Name1,Value1,...,NameN,ValueN.

'Y0'

Presample response data whose conditional variance is forecasted. Y0 usually represents a time series of presample innovations with mean zero and variance characterized by the model specified in model. Y0 might also represent a time series of innovations with mean zero plus an offset. The inclusion of an offset is signaled by a nonzero Offset property in the GJR model object, model.

If Y0 is specified, any necessary presample innovation observations (referred to as E0 in other methods) are derived from Y0 by subtracting any offset. These presample innovations are then used as initial values for the GJR(P,Q) model forecast.

Y0 is a column vector or a matrix with at least model.Q rows to initialize the variance equation. If the number of rows exceeds model.Q, then only the most recent model.Q observations are used to derive presample innovations (E0). The last row contains the most recent observation.

If Y0 is a column vector, it represents a single path of the underlying innovation series. If Y0 is a matrix, then it needs numPaths columns, each representing a presample path of the underlying innovations series.

Default: Necessary presample innovations are set to the unconditional standard deviation of the GJR process.

'V0'

Positive presample conditional variances, providing initial values for the GJR(P,Q) model.

V0 is a column vector or matrix with at least model.P rows to initialize the variance equation. If the number of rows exceeds model.P, then only the most recent model.P observations are used as initial values. The last row contains the most recent observation.

If V0 is a column vector, it represents a single presample path of the variance series. If V0 is a matrix, then it needs numPaths columns, each representing a presample path of the variance series.

Default: Necessary presample observations are inferred from the corresponding presample response data in Y0, provided Y0 has at least max(P,Q) + P observations. If Y0 is unspecified or of insufficient length, presample observations of V0 are set equal to the unconditional variance of the GJR process.

    Notes  

    • The number of sample paths, numPaths, is the largest column dimension of the presample arrays Y0 and V0, but not fewer than one.

    • If both Y0 and V0 are matrices with multiple columns, they must both have numPaths columns. Otherwise, an error occurs.

    • NaNs indicate missing values. The toolbox uses listwise deletion to remove missing values in the presample data, Y0 and V0. That is, Y0 and V0 are merged into a composite series, and any row of the combined series with at least one NaN is removed.

    • forecast assumes you synchronize presample data such that the last (most recent) observation of each presample series occurs simultaneously.

Output Arguments

V

numPeriods-by-numPaths matrix of minimum mean square error (MMSE) forecasts of the conditional variances of future model innovations. The number of columns of V (numPaths) is derived from the presample information provided in Y0 and V0. If both Y0 and V0 are unspecified, V is a numPeriods column vector.

In all cases, the first row of V contains the conditional variance forecasts in period 1, the second row contains the conditional variance forecasts in period 2, and so on until the last row, which contains the conditional variance forecasts at the specified forecast horizon.

Examples

expand all

Forecast Conditional Variances

Forecast the conditional variance of simulated data over a 30-period horizon.

Simulate 100 observations from a GJR(1,1) model with known parameters.

model = gjr('Constant',0.01,'GARCH',0.6,'ARCH',0.2,...
            'Leverage',0.2);
rng('default')
[V,Y] = simulate(model,100);

Forecast the conditional variances over a 30-period horizon, with and without using the simulated data as presample innovations. Plot the forecasts.

Vf1 = forecast(model,30,'Y0',Y);
Vf2 = forecast(model,30);

figure
plot(V,'Color',[.7,.7,.7])
hold on
plot(101:130,Vf1,'r','LineWidth',2);
plot(101:130,Vf2,':','LineWidth',2);
title('Forecasted Conditional Variances')
legend('Observed','Forecasts with Presamples',...
		'Forecasts without Presamples','Location','NorthEast')
hold off

Forecasts made without using presample innovations equal the unconditional innovation variance. Forecasts made using presample innovations converge asymptotically to the unconditional innovation variance.

Forecast the Conditional Variance of NASDAQ Returns

Forecast the conditional variance of the NASDAQ Composite Index returns over a 500-day horizon.

Load the NASDAQ data included with the toolbox. Convert the index to returns.

load Data_EquityIdx
nasdaq = Dataset.NASDAQ;
r = price2ret(nasdaq);
N = length(r);

Fit a GJR(1,1) model to the data.

model = gjr(1,1);
fit = estimate(model,r);

Forecast the conditional variance for 500 days using the fitted model. Use the observed returns as presample innovations for the forecast.

Vf = forecast(fit,500,'Y0',r);

Plot the forecasts, along with the conditional variances inferred from the data.

V = infer(fit,r);

figure
plot(V,'Color',[.7,.7,.7])
hold on
plot(N+1:N+500,Vf,'r','LineWidth',2)
xlim([1,N+500])
legend('Inferred','Forecast','Location','Northwest')
title('Conditional Variance Forecasts for NASDAQ Returns')
hold off

Plot conditional variance forecasts for 1000 days.

Vf1000 = forecast(fit,1000,'Y0',r);

figure
plot(Vf1000,'r','LineWidth',2)
title('Conditional Variance Forecast Asymptote')

The forecasts converge asymptotically to the unconditional variance of the GJR process.

References

[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, 1986, pp. 307–327.

[3] Bollerslev, T. "A Conditionally Heteroskedastic Time Series Model for Speculative Prices and Rates of Return." The Review of 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] Glosten, L. R., R. Jagannathan, and D. E. Runkle. "On the Relation between the Expected Value and the Volatility of the Nominal Excess Return on Stocks." The Journal of Finance. Vol. 48, No. 5, 1993, pp. 1779–1801.

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

See Also

| | | | |

More About

Was this topic helpful?