RATS 10.1
RATS 10.1

GARCHUV.RPF provides examples of estimates of standard univariate GARCH models. In practice, you wouldn't use all of these models on a single data set—they are provided for illustration of both the command and the output. For less standard models, see GARCHUVMAX.RPF.

Full Program

open data garch.asc
data(format=free,org=columns) 1 1867 bp cd dm jy sf
*
set dlogdm = 100*log(dm/dm{1})
*
* Estimate an ARCH(6) and a GARCH(1,1) model
*
garch(p=0,q=6) / dlogdm
garch(p=1,q=1) / dlogdm
*
* EGARCH model (without asymmetry)
*
garch(p=1,q=1,exp) / dlogdm
*
* IGARCH model
*
garch(p=1,q=1,i=nodrift) / dlogdm
*
* GARCH(1,1) with t errors, first with shape chosen, the second
* with shape estimated.
*
garch(p=1,q=1,distrib=t,shape=5) / dlogdm
garch(p=1,q=1,distrib=t) / dlogdm
*
* Models with asymmetry
*
garch(p=1,q=1,exp,asymmetric,hseries=hha) / dlogdm
garch(p=1,q=1,asymmetric) / dlogdm
*
* AR(1) model for the mean
*
garch(p=1,q=1,regressors) / dlogdm
# constant dlogdm{1}
*
* ARMA(1,1) model for the mean
*
garch(p=1,q=1,regressors) / dlogdm
# constant dlogdm{1} %mvgavge{1}
*
* AR(1) model for the mean, input using EQUATION
*
linreg(define=ar1) dlogdm
# constant dlogdm{1}
garch(p=1,q=1,equation=ar1)
*
* GARCH-M model (with AR(1) mean term as well)
*
garch(p=1,q=1,regressors) / dlogdm
# constant dlogdm{1} %garchv
*
* GARCH(1,1) with QMLE standard errors
*
garch(p=1,q=1,robusterrors) / dlogdm
*
* GARCH(1,1)-M with square root of variance
*
set sqrth = 0.0
garch(p=1,q=1,hseries=hs,hadjust=(sqrth=sqrt(hs)),$
   regressors) / dlogdm
# constant sqrth
*
* Diagnostics on standardized residuals
*
garch(p=1,q=1,resids=u,hseries=h) / dlogdm
set ustd   = u/sqrt(h)
set ustdsq = ustd^2
@regcorrs(qstat,number=40,dfc=1,title="GARCH-LB Test") ustd
@regcorrs(qstat,number=40,dfc=2,title="GARCH-McLeod-Li Test") $
  ustdsq
*
* Fluctuations test
*
garch(p=1,q=1,derives=dd) / dlogdm
@flux(title="Stability Test for GARCH model")
# dd
*
* Graph the estimated standard errors for three models (over a
* limited range).
*
garch(p=0,q=6,hseries=hh06) / dlogdm
garch(p=1,q=1,hseries=hh11) / dlogdm
garch(p=1,q=1,exp,asymm,hseries=hha) / dlogdm

set h06 = sqrt(hh06)
set h11 = sqrt(hh11)
set hha = sqrt(hha)
graph(key=below,header="Estimated Standard Deviations",$
    klabels=||"ARCH6","EGARCH11","GARCH11"||) 3
# h06 1770 *
# hha 1770 *
# h11 1770 *

Output


 

This is from the ARCH(6). Mean(DLOGDM) is the estimated mean parameter. C is the constant in the variance equation. The A{l} are the lagged squared residual terms ("ARCH" terms) in the variance equation.


 

GARCH Model - Estimation by BFGS

Convergence in    43 Iterations. Final criterion was  0.0000057 <=  0.0000100
 

Dependent Variable DLOGDM

Usable Observations                      1866

Log Likelihood                     -2079.3769

 

    Variable                        Coeff      Std Error      T-Stat      Signif

************************************************************************************

1.  Mean(DLOGDM)                 -0.010202377  0.014363485     -0.71030  0.47751841

2.  C                             0.227541547  0.025731044      8.84307  0.00000000

3.  A{1}                          0.091943656  0.026773580      3.43412  0.00059448

4.  A{2}                          0.080992375  0.010106859      8.01360  0.00000000

5.  A{3}                          0.123388807  0.026347355      4.68316  0.00000282

6.  A{4}                          0.137631192  0.033296452      4.13351  0.00003573

7.  A{5}                          0.121836065  0.028984092      4.20355  0.00002628

8.  A{6}                          0.100581321  0.028249705      3.56044  0.00037024


 

 

This is from the GARCH(1,1). Mean(DLOGDM) and C are described above. The A is the first (and only) lagged squared residual ("ARCH" term) in the variance equation and B is the first (and only) lagged variable term ("GARCH" term) in the variance equation.


 

GARCH Model - Estimation by BFGS

Convergence in    18 Iterations. Final criterion was  0.0000093 <=  0.0000100

 

Dependent Variable DLOGDM

Usable Observations                      1866

Log Likelihood                     -2068.1265

 

    Variable                        Coeff      Std Error      T-Stat      Signif

************************************************************************************

1.  Mean(DLOGDM)                 -0.020635802  0.015767968     -1.30872  0.19063035

2.  C                             0.016180175  0.005181947      3.12241  0.00179375

3.  A                             0.110125419  0.015859223      6.94394  0.00000000

4.  B                             0.868369919  0.018692362     46.45587  0.00000000


 

This is from an EGARCH(1,1) model without an asymmetry term. The labels are the same as for a GARCH(1,1), but the C, A and B have very different interpretations—C can be negative, since it's in a log specification, A doesn't enter into the overall persistence of volatility and B is the only parameter which does measure the persistence.

 

GARCH Model - Estimation by BFGS

Convergence in    42 Iterations. Final criterion was  0.0000055 <=  0.0000100

 

Dependent Variable DLOGDM

Usable Observations                      1866

Log Likelihood                     -2066.0184

 

    Variable                        Coeff      Std Error      T-Stat      Signif

************************************************************************************

1.  Mean(DLOGDM)                 -0.024192173  0.004368326     -5.53809  0.00000003

2.  C                            -0.191334378  0.021973693     -8.70743  0.00000000

3.  A                             0.220275484  0.025181605      8.74748  0.00000000

4.  B                             0.963516000  0.009443662    102.02779  0.00000000


 

This is for an IGARCH(1,1) model. The A and B are forced to sum to one. As they aren't estimated independently, their standard errors are the same.

 

GARCH Model - Estimation by BFGS

Convergence in    17 Iterations. Final criterion was  0.0000000 <=  0.0000100

 

Dependent Variable DLOGDM

Usable Observations                      1866

Log Likelihood                     -2088.7331


 

    Variable                        Coeff      Std Error      T-Stat      Signif

************************************************************************************

1.  Mean(DLOGDM)                 -0.018534067  0.015549141     -1.19197  0.23327407

2.  C                             0.000000000  0.000000000      0.00000  0.00000000

3.  A                             0.082104140  0.008813022      9.31623  0.00000000

4.  B                             0.917895860  0.008813022    104.15223  0.00000000


 

These are for GARCH(1,1) models with t-distributed errors. The first has the shape pegged at 5, the second has the shape estimated freely.


 

GARCH Model - Estimation by BFGS

Convergence in    18 Iterations. Final criterion was  0.0000003 <=  0.0000100

 

Dependent Variable DLOGDM

Usable Observations                      1866

Log Likelihood                     -2053.1056

 

    Variable                        Coeff      Std Error      T-Stat      Signif

************************************************************************************

1.  Mean(DLOGDM)                 -0.032487264  0.015670182     -2.07319  0.03815460

2.  C                             0.016118196  0.006090093      2.64663  0.00812993

3.  A                             0.115531133  0.021190751      5.45196  0.00000005

4.  B                             0.877888414  0.021541296     40.75374  0.00000000


 

GARCH Model - Estimation by BFGS

Convergence in    23 Iterations. Final criterion was  0.0000000 <=  0.0000100

 

Dependent Variable DLOGDM

Usable Observations                      1866

Log Likelihood                     -2046.8940

 

    Variable                        Coeff      Std Error      T-Stat      Signif

************************************************************************************

1.  Mean(DLOGDM)                 -0.028988887  0.015392608     -1.88330  0.05965982

2.  C                             0.015059570  0.005219566      2.88521  0.00391147

3.  A                             0.104416870  0.017524533      5.95833  0.00000000

4.  B                             0.875756941  0.020172081     43.41431  0.00000000

5.  Shape                         8.775517794  1.691998502      5.18648  0.00000021


 

This is from the EGARCH(1,1) with asymmetry. The first four are the same as for an EGARCH. The D is for handling asymmetry—it's for a term with the lagged standardize residual without absolute value.

 

GARCH Model - Estimation by BFGS

Convergence in    47 Iterations. Final criterion was  0.0000076 <=  0.0000100

 

Dependent Variable DLOGDM

Usable Observations                      1866

Log Likelihood                     -2065.1214

 

    Variable                        Coeff      Std Error      T-Stat      Signif

************************************************************************************

1.  Mean(DLOGDM)                 -0.027981984  0.015420283     -1.81462  0.06958203

2.  C                            -0.184508954  0.023374185     -7.89371  0.00000000

3.  A                             0.215083574  0.026988392      7.96948  0.00000000

4.  B                             0.967688682  0.008917124    108.52027  0.00000000

5.  D                            -0.017258229  0.012730862     -1.35562  0.17521964


 

This is from the GARCH(1,1) with asymmetry (GJR model). The first four are the same as for a GARCH(1,1). The D is for handling asymmetry—it's the term with the lagged squared residual but only if the lagged residual is negative.

 

GARCH Model - Estimation by BFGS

Convergence in    24 Iterations. Final criterion was  0.0000004 <=  0.0000100

 

Dependent Variable DLOGDM

Usable Observations                      1866

Log Likelihood                     -2066.7407

 

    Variable                        Coeff      Std Error      T-Stat      Signif

************************************************************************************

1.  Mean(DLOGDM)                 -0.027168020  0.018387564     -1.47752  0.13953590

2.  C                             0.013681319  0.004828922      2.83320  0.00460841

3.  A                             0.089768070  0.019190238      4.67780  0.00000290

4.  B                             0.877557723  0.019279382     45.51794  0.00000000

5.  D                             0.032974948  0.020725016      1.59107  0.11159386


 

This is a GARCH(1,1) with an AR(1) (with constant) for the mean model.

 

GARCH Model - Estimation by BFGS

Convergence in    20 Iterations. Final criterion was  0.0000075 <=  0.0000100
 

Dependent Variable DLOGDM

Usable Observations                      1865

Log Likelihood                     -2063.0191

 

    Variable                        Coeff      Std Error      T-Stat      Signif

************************************************************************************

1.  Constant                     -0.022623191  0.016669918     -1.35713  0.17474097

2.  DLOGDM{1}                    -0.075892967  0.022990733     -3.30102  0.00096333

 

3.  C                             0.015791350  0.004861764      3.24807  0.00116191

4.  A                             0.110511663  0.016053177      6.88410  0.00000000

5.  B                             0.868670147  0.017885893     48.56733  0.00000000


 

This is a GARCH(1,1) model with an ARMA(1,1) mean model.

 

GARCH Model - Estimation by BFGS

Convergence in    27 Iterations. Final criterion was  0.0000004 <=  0.0000100

 

Dependent Variable DLOGDM

Usable Observations                      1865

Log Likelihood                     -2062.4516

 

    Variable                        Coeff      Std Error      T-Stat      Signif

************************************************************************************

1.  Constant                     -0.027037472  0.018680860     -1.44734  0.14780297

2.  DLOGDM{1}                    -0.271873465  0.161349899     -1.68499  0.09198990

3.  Mvg Avge{1}                   0.194283906  0.163221977      1.19030  0.23392661

 

4.  C                             0.015810577  0.004697819      3.36551  0.00076401

5.  A                             0.110603223  0.013764192      8.03558  0.00000000

6.  B                             0.868534818  0.017203672     50.48543  0.00000000


 


 

This is from the GARCH(1,1)-M with an AR also in the mean model. GARCH-V enters the mean model and represents the the current variance.


 

GARCH Model - Estimation by BFGS

Convergence in    22 Iterations. Final criterion was  0.0000000 <=  0.0000100

 

Dependent Variable DLOGDM

Usable Observations                      1865

Log Likelihood                     -2058.8758

 

    Variable                        Coeff      Std Error      T-Stat      Signif

************************************************************************************

1.  Constant                     -0.099950530  0.030934281     -3.23106  0.00123332

2.  DLOGDM{1}                    -0.084561360  0.024189202     -3.49583  0.00047259

3.  GARCH-V                       0.160554894  0.056244351      2.85460  0.00430916

 

4.  C                             0.015099945  0.004519597      3.34099  0.00083479

5.  A                             0.108470775  0.016668720      6.50744  0.00000000

6.  B                             0.871554313  0.018356903     47.47829  0.00000000

 


 

This is for the GARCH(1,1) with a regression model for the mean (here, CONSTANT and one lag of the dependent variable). C, A and B are as for other GARCH models.


 

GARCH Model - Estimation by BFGS

Convergence in    26 Iterations. Final criterion was  0.0000039 <=  0.0000100

Dependent Variable DLOGDM

Usable Observations                      1865

Log Likelihood                     -2063.0356


 

    Variable                        Coeff      Std Error      T-Stat      Signif

************************************************************************************

1.  Constant                     -0.022621710  0.015596502     -1.45043  0.14693728

2.  DLOGDM{1}                    -0.075890487  0.024356060     -3.11588  0.00183399

 

3.  C                             0.015799611  0.004766295      3.31486  0.00091688

4.  A                             0.110535422  0.015694511      7.04294  0.00000000

5.  B                             0.868634127  0.017811684     48.76766  0.00000000


 

This is the GARCH(1,1) model with QMLE standard errors.

 

GARCH Model - Estimation by BFGS

Convergence in    18 Iterations. Final criterion was  0.0000093 <=  0.0000100

 

With Heteroscedasticity/Misspecification Adjusted Standard Errors

Dependent Variable DLOGDM

Usable Observations                      1866

Log Likelihood                     -2068.1265

 

    Variable                        Coeff      Std Error      T-Stat      Signif

************************************************************************************

1.  Mean(DLOGDM)                 -0.020635802  0.017150593     -1.20321  0.22889424

2.  C                             0.016180175  0.006552618      2.46927  0.01353895

3.  A                             0.110125419  0.021427596      5.13942  0.00000028

4.  B                             0.868369919  0.023925676     36.29448  0.00000000


 

This is a GARCH(1,1) model with an M effect using the square root (rather than the variance).

 

GARCH Model - Estimation by BFGS

Convergence in    22 Iterations. Final criterion was  0.0000000 <=  0.0000100
 

Dependent Variable DLOGDM

Usable Observations                      1866

Log Likelihood                     -2064.7470

 

    Variable                        Coeff      Std Error      T-Stat      Signif

************************************************************************************

1.  Constant                     -0.175167826  0.062791496     -2.78967  0.00527611

2.  SQRTH                         0.231317883  0.091229410      2.53556  0.01122668

 

3.  C                             0.015453301  0.004707448      3.28273  0.00102806

4.  A                             0.107706349  0.015552770      6.92522  0.00000000

5.  B                             0.871680363  0.017793428     48.98889  0.00000000

 

These are diagnostic graphs on the standardized residuals. The first shows the autocorrelations of the standardized residuals and a Ljung-Box Q test for serial correlation. This indicates that there might be some problem with the mean model, since the Q is significant as are several of the early lags. (If the Q were significant, but only because of larger autocorrelations at high lags, you probably wouldn't be able to come up with any fix). However, the standardized residuals have fat tails (as shown by the fairly low value of the "Shape" parameter), so the Q statistic may be misleading because of that.

 


 


 


 

This shows the autocorrelation of the squared residuals and a Q test on those (the "McLeod-Li" test). This gives the type of result that you would like from this—an insignificant Q with no noticeable problems on the short lags.


 


 

 


 

This is the result of a Nyblom fluctuations test on the partial derivatives of the basic GARCH(1,1). The numbered rows correspond to the four parameters in order, so the only one that is clearly shown as significant (indicating that it might be subject to a structural break) is the mean. By itself, this won't tell what type of break (if any) might be present, but it does indicate that it would be a good idea to check further if this were a serious model. (The use of the @FLUX procedure and related analysis is covered in the Structural Breaks and Switching Models course.)

 

Test  Statistic  P-Value

Joint 1.25368599    0.05

 

    1 0.71222462    0.01

    2 0.35758891    0.09

    3 0.13840253    0.41

    4 0.18261598    0.29


 

This is an example of a graph of volatility (expressed in standard deviations) for three models. This is graphed only across about 100 data—across the full 1800 entries, you probably couldn't see much of a difference among the three.


 

 


Copyright © 2025 Thomas A. Doan