RATS 10.1
RATS 10.1

GARCHUVMAX.RPF provides examples of estimates of less-standard univariate GARCH models using MAXIMIZE. For standard models, see GARCHUV.RPF.
 

The list of models is from Cappiello, Engle & Sheppard(2006).

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 a GARCH(1,1) with an AR(1) mean model
*
garch(p=1,q=1,reg) / dlogdm
# constant dlogdm{1}
*
* Same model estimated using MAXIMIZE
*
linreg dlogdm
# constant dlogdm{1}
frml(lastreg,vector=beta) meanf
nonlin(parmset=meanparms) beta
*
set uu = %seesq
set h  = %seesq
set u  = 0.0
*
nonlin(parmset=garchparms) c a b
compute a=.05,b=.75,c=%seesq*(1-a-b)
frml varf = c+a*uu{1}+b*h{1}
*
* This computes the variance first, since the mean formula *can* depend upon
* current H (in an "M" model), while the variance has to be computed from lagged
* information.
*
frml logl = (h(t)=varf(t)),(u=dlogdm-meanf),$
    (uu(t)=u^2),%logdensity(h,u)
maximize(parmset=meanparms+garchparms) logl 3 *
*
* Parameter sets used in some of the models
*
nonlin(parmset=powerparms) lambda
nonlin(parmset=asymmparms) d
****************************************************************************
*
* AVGARCH (absolute value)
*
frml varf = (c+a*sqrt(uu{1})+b*sqrt(h{1}))^2
compute c=sqrt(%seesq)
maximize(parmset=meanparms+garchparms,title="Absolute Value GARCH") logl 3 *
****************************************************************************
*
* NGARCH (non-linear (power) GARCH)
*
compute lambda=2.0
frml varf = (c+a*uu{1}^(.5*lambda)+b*h{1}^(.5*lambda))^(2.0/lambda)
compute c=%seesq
maximize(parmset=meanparms+garchparms+powerparms,title="Non-linear GARCH") logl 3 *
****************************************************************************
*
* APARCH (asymmetric power GARCH)
*
compute lambda=2.0
frml varf = uupower=uu{1}^(.5*lambda),$
   (c+a*uupower+d*%if(u{1}<0,uupower,0.0)+b*h{1}^(.5*lambda))^(2.0/lambda)
compute c=%seesq,d=0.0
maximize(parmset=meanparms+garchparms+asymmparms+powerparms,title="Asymmetric power GARCH") logl 3 *
****************************************************************************
*
* ZARCH (threshold). This could be done as APARCH with lambda pegged to 1.0
*
frml varf = uupower=sqrt(uu{1}),(c+a*uupower+d*%if(u{1}<0,uupower,0.0)+b*sqrt(h{1}))^2.0
compute c=%seesq
maximize(parmset=meanparms+garchparms+asymmparms,title="ZARCH") logl 3 *
*****************************************************************************
*****************************************************************************
*
* Models with an recentering of the news impact curve can't use the
* lagged u^2 terms.
*
* AGARCH (asymmetric with recentering)
*
frml varf = (c+a*(u{1}+d)^2+b*h{1})
compute d=0.0
compute c=%seesq
maximize(parmset=meanparms+garchparms+asymmparms,title="AGARCH") logl 3 *
*****************************************************************************
*
* NAGARCH (non-linear asymmetric)
*
frml varf = (c+a*(u{1}+d*sqrt(h{1}))^2+b*h{1})
compute d=0.0
compute c=%seesq
maximize(parmset=meanparms+garchparms+asymmparms,title="NAGARCH") logl 3 *
 

Output

 

GARCH Model - Estimation by BFGS

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

Dependent Variable DLOGDM

Usable Observations                      1865

Log Likelihood                     -2063.0356

 

    Variable                        Coeff      Std Error      T-Stat      Signif

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

1.  Constant                     -0.022621703  0.015610504     -1.44913  0.14730032

2.  DLOGDM{1}                    -0.075889879  0.023563027     -3.22072  0.00127870
 

3.  C                             0.015799598  0.004710060      3.35444  0.00079527

4.  A                             0.110535373  0.015870409      6.96487  0.00000000

5.  B                             0.868634155  0.017976476     48.32060  0.00000000


 

Linear Regression - Estimation by Least Squares

Dependent Variable DLOGDM

Usable Observations                      1865

Degrees of Freedom                       1863

Centered R^2                        0.0035975

R-Bar^2                             0.0030627

Uncentered R^2                      0.0036039

Mean of Dependent Variable       -0.001964639

Std Error of Dependent Variable   0.777020180

Standard Error of Estimate        0.775829392

Sum of Squared Residuals         1121.3606491

Regression F(1,1863)                   6.7263

Significance Level of F             0.0095743

Log Likelihood                     -2171.9406

Durbin-Watson Statistic                1.9961
 

    Variable                        Coeff      Std Error      T-Stat      Signif

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

1.  Constant                     -0.002092808  0.017965051     -0.11649  0.90727417

2.  DLOGDM{1}                    -0.059974943  0.023124922     -2.59352  0.00957431


 

MAXIMIZE - Estimation by BFGS

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

Usable Observations                      1865

Function Value                     -2063.0240

 

    Variable                        Coeff      Std Error      T-Stat      Signif

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

1.  BETA(1)                      -0.022623391  0.016203039     -1.39624  0.16264112

2.  BETA(2)                      -0.075892034  0.026794253     -2.83240  0.00462001

3.  C                             0.015794165  0.004747697      3.32670  0.00087881

4.  A                             0.110520531  0.015950955      6.92877  0.00000000

5.  B                             0.868657113  0.018042122     48.14606  0.00000000


 

Absolute Value GARCH - Estimation by BFGS

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

Usable Observations                      1865

Function Value                     -2061.5041

 

    Variable                        Coeff      Std Error      T-Stat      Signif

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

1.  BETA(1)                      -0.026919813  0.012790471     -2.10468  0.03531942

2.  BETA(2)                      -0.079408104  0.011105814     -7.15014  0.00000000

3.  C                             0.023015729  0.005601336      4.10897  0.00003974

4.  A                             0.110630929  0.012570237      8.80102  0.00000000

5.  B                             0.885150425  0.013634391     64.92042  0.00000000


 

Non-linear GARCH - Estimation by BFGS

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

Usable Observations                      1865

Function Value                     -2060.8529

 

    Variable                        Coeff      Std Error      T-Stat      Signif

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

1.  BETA(1)                      -0.024384271  0.016403460     -1.48653  0.13713841

2.  BETA(2)                      -0.078483020  0.023028808     -3.40804  0.00065432

3.  C                             0.020323544  0.006069570      3.34843  0.00081270

4.  A                             0.115017348  0.014152503      8.12700  0.00000000

5.  B                             0.880155595  0.016038306     54.87834  0.00000000

6.  LAMBDA                        1.309962163  0.291926099      4.48731  0.00000721

 

## NL6. NONLIN Parameter D Has Not Been Initialized. Trying 0

 

Asymmetric power GARCH - Estimation by BFGS

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

Usable Observations                      1865

Function Value                     -2059.5575

 

    Variable                        Coeff      Std Error      T-Stat      Signif

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

1.  BETA(1)                      -0.030208846  0.016457843     -1.83553  0.06642736

2.  BETA(2)                      -0.079082987  0.024333247     -3.25000  0.00115406

3.  C                             0.017355530  0.005905951      2.93865  0.00329644

4.  A                             0.099436867  0.016570877      6.00070  0.00000000

5.  B                             0.886523720  0.016247909     54.56233  0.00000000

6.  D                             0.025615715  0.016750165      1.52928  0.12619471

7.  LAMBDA                        1.341885661  0.298443347      4.49628  0.00000692


 

ZARCH - Estimation by BFGS

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

Usable Observations                      1865

Function Value                     -2060.3065

 

    Variable                        Coeff      Std Error      T-Stat      Signif

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

1.  BETA(1)                      -0.032112685  0.015428720     -2.08136  0.03740118

2.  BETA(2)                      -0.080649265  0.023493793     -3.43279  0.00059740

3.  C                             0.020206127  0.006055521      3.33681  0.00084746

4.  A                             0.098293164  0.015300427      6.42421  0.00000000

5.  B                             0.891043847  0.015459736     57.63642  0.00000000

6.  D                             0.019852281  0.012532918      1.58401  0.11319121


 

AGARCH - Estimation by BFGS

Convergence in    28 Iterations. Final criterion was  0.0000065 <=  0.0000100

Usable Observations                      1865

Function Value                     -2062.1389

 

    Variable                        Coeff      Std Error      T-Stat      Signif

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

1.  BETA(1)                      -0.026033888  0.015509378     -1.67859  0.09323196

2.  BETA(2)                      -0.076276400  0.023559595     -3.23759  0.00120542

3.  C                             0.014603149  0.005032134      2.90198  0.00370813

4.  A                             0.108802103  0.015793791      6.88892  0.00000000

5.  B                             0.872234990  0.018760091     46.49418  0.00000000

6.  D                            -0.036439841  0.046844054     -0.77790  0.43662984


 

NAGARCH - Estimation by BFGS

Convergence in    58 Iterations. Final criterion was  0.0000009 <=  0.0000100

Usable Observations                      1865

Function Value                     -2061.8880

 

    Variable                        Coeff      Std Error      T-Stat      Signif

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

1.  BETA(1)                      -0.027072535  0.015942802     -1.69810  0.08948815

2.  BETA(2)                      -0.076891600  0.024073901     -3.19398  0.00140325

3.  C                             0.014337891  0.004348731      3.29703  0.00097713

4.  A                             0.108715550  0.014836108      7.32777  0.00000000

5.  B                             0.872723345  0.017346038     50.31255  0.00000000

6.  D                            -0.078073853  0.075084625     -1.03981  0.29842750

 


Copyright © 2025 Thomas A. Doan