Accelerating the pace of engineering and science

Documentation Center

• Trials

Compare GARCH Models Using Likelihood Ratio Test

This example shows how to conduct a likelihood ratio test to choose the number of lags in a GARCH model.

Load the Deutschmark/British pound foreign-exchange rate data included with the toolbox. Convert the rates to returns.

```load Data_MarkPound
Y = Data;
r = price2ret(Y);
N = length(r);

figure
plot(r)
xlim([0,N])
title('Mark-Pound Exchange Rate Returns')```

The daily returns exhibit volatility clustering.

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

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

```model1 = garch('Offset',NaN,'GARCHLags',1,'ARCHLags',1);
[fit1,~,LogL1] = estimate(model1,r);```
```    GARCH(1,1) Conditional Variance Model:
----------------------------------------
Conditional Probability Distribution: Gaussian

Standard          t
Parameter       Value          Error       Statistic
-----------   -----------   ------------   -----------
Constant    1.07537e-06   3.57199e-07        3.01057
GARCH{1}       0.806105     0.0132699        60.7467
ARCH{1}       0.153082      0.011529         13.278
Offset   -6.13385e-05   8.28665e-05      -0.740209```

Step 3. Specify and fit a GARCH(2,1) model.

Specify and fit a GARCH(2,1) model with a mean offset.

```model2 = garch(2,1);
model2.Offset = NaN;
[fit2,~,LogL2] = estimate(model2,r);```
```        GARCH(2,1) Conditional Variance Model:
----------------------------------------
Conditional Probability Distribution: Gaussian

Standard          t
Parameter       Value          Error       Statistic
-----------   -----------   ------------   -----------
Constant    9.00089e-07   3.62434e-07        2.48346
GARCH{1}       0.439975      0.102146         4.3073
GARCH{2}       0.367693      0.097094        3.78698
ARCH{1}       0.161236      0.012301        13.1075
Offset   -5.21026e-05   8.20919e-05      -0.634687```

Step 4. Conduct a likelihood ratio test.

Conduct a likelihood ratio test to compare the restricted GARCH(1,1) model fit to the unrestricted GARCH(2,1) model fit. The degree of freedom for this test is one (the number of restrictions).

`[h,p] = lratiotest(LogL2,LogL1,1)`
```h =

1

p =

0.0415```

At the 0.05 significance level, the null GARCH(1,1) model is rejected (h = 1) in favor of the unrestricted GARCH(2,1) alternative.