Documentation

This is machine translation

Translated by Microsoft
Mouse over text to see original. Click the button below to return to the English verison of the page.

Compare Conditional Variance Models Using Information Criteria

This example shows how to specify and fit a GARCH, EGARCH, and GJR model to foreign exchange rate returns. Compare the fits using AIC and BIC.

Step 1. Load the data.

Load the foreign exchange rate data included with the toolbox. Convert the Swiss franc exchange rate to returns.

load Data_FXRates
y = DataTable.CHF;
r = price2ret(y);
T = length(r);

logL = zeros(1,3); % Preallocate
numParams = logL;  % Preallocate

figure
plot(r)
xlim([0,T])
title('Swiss Franc Exchange Rate Returns')

The returns series appears to exhibit some volatility clustering.

Step 2. Fit a GARCH(1,1) model.

Specify, and then fit a GARCH(1,1) model to the returns series. Return the value of the loglikelihood objective function.

Mdl1 = garch(1,1);
[EstMdl1,EstParamCov1,logL(1)] = estimate(Mdl1,r);
numParams(1) = sum(any(EstParamCov1)); % Number of fitted parameters
 
    GARCH(1,1) Conditional Variance Model:
    ----------------------------------------
    Conditional Probability Distribution: Gaussian

                                  Standard          t     
     Parameter       Value          Error       Statistic 
    -----------   -----------   ------------   -----------
     Constant    1.62757e-06   4.37243e-07        3.72235
     GARCH{1}       0.913795    0.00687819        132.854
      ARCH{1}      0.0584845    0.00499777        11.7021

Step 3. Fit an EGARCH(1,1) model.

Specify, and then fit an EGARCH(1,1) model to the returns series. Return the value of the loglikelihood objective function.

Mdl2 = egarch(1,1);
[EstMdl2,EstParamCov2,logL(2)] = estimate(Mdl2,r);
numParams(2) = sum(any(EstParamCov2));
 
    EGARCH(1,1) Conditional Variance Model:
    --------------------------------------
    Conditional Probability Distribution: Gaussian

                                  Standard          t     
     Parameter       Value          Error       Statistic 
    -----------   -----------   ------------   -----------
     Constant      -0.292511     0.0459423       -6.36693
     GARCH{1}       0.969756    0.00467861        207.275
      ARCH{1}       0.122918     0.0120523        10.1987
  Leverage{1}     -0.0132298     0.0049498        -2.6728

Step 4. Fit a GJR(1,1) model.

Specify, and then fit a GJR(1,1) model to the returns series. Return the value of the loglikelihood objective function.

Mdl3 = gjr(1,1);
[EstMdl3,EstParamCov3,logL(3)] = estimate(Mdl3,r);
numParams(3) = sum(any(EstParamCov3));
 
    GJR(1,1) Conditional Variance Model:
    --------------------------------------
    Conditional Probability Distribution: Gaussian

                                  Standard          t     
     Parameter       Value          Error       Statistic 
    -----------   -----------   ------------   -----------
     Constant    1.65175e-06   4.40711e-07        3.74792
     GARCH{1}       0.913624    0.00699698        130.574
      ARCH{1}      0.0572467    0.00670587         8.5368
  Leverage{1}     0.00198623    0.00714026       0.278173

The leverage term in the GJR model is not statistically significant.

Step 5. Compare the model fits using AIC and BIC.

Calculate the AIC and BIC values for the GARCH, EGARCH, and GJR model fits. The GARCH model has three parameters; the EGARCH and GJR models each have four parameters.

[aic,bic] = aicbic(logL,numParams,T)
aic =

   1.0e+04 *

   -3.3329   -3.3321   -3.3327


bic =

   1.0e+04 *

   -3.3309   -3.3295   -3.3301

The GARCH(1,1) and EGARCH(1,1) models are not nested, so you cannot compare them by conducting a likelihood ratio test. The GARCH(1,1) is nested in the GJR(1,1) model, however, so you could use a likelihood ratio test to compare these models.

Using AIC and BIC, the GARCH(1,1) model has slightly smaller (more negative) AIC and BIC values. Thus, the GARCH(1,1) model is the preferred model according to these criteria.

See Also

| |

Related Examples

More About

Was this topic helpful?