This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materials including this page, select Japan from the country navigator on the bottom of this page.

Forecast a Conditional Variance Model

This example shows how to forecast a conditional variance model using forecast.

Load the data and specify the model.

Load the Deutschmark/British pound foreign exchange rate data included with the toolbox, and convert to returns. For numerical stability, convert returns to percentage returns.

load Data_MarkPound
r  = price2ret(Data);
pR = 100*r;
T  = length(r);

Specify and fit a GARCH(1,1) model.

Mdl = garch(1,1);
EstMdl = estimate(Mdl,pR);
    GARCH(1,1) Conditional Variance Model:
    Conditional Probability Distribution: Gaussian

                                  Standard          t     
     Parameter       Value          Error       Statistic 
    -----------   -----------   ------------   -----------
     Constant       0.010868    0.00129723        8.37786
     GARCH{1}       0.804518     0.0160384        50.1619
      ARCH{1}       0.154325     0.0138523        11.1407

Generate MMSE forecasts.

Use the fitted model to generate MMSE forecasts over a 200-period horizon. Use the observed return series as presample data. By default, forecast infers the corresponding presample conditional variances. Compare the asymptote of the variance forecast to the theoretical unconditional variance of the GARCH(1,1) model.

v = forecast(EstMdl,200,'Y0',pR);
sig2 = EstMdl.Constant/(1-EstMdl.GARCH{1}-EstMdl.ARCH{1});

hold on
title('Forecast Conditional Variance')
hold off

The MMSE forecasts converge to the theoretical unconditional variance after about 160 steps.

See Also

| |

Related Examples

More About

Was this topic helpful?