AUTOREG Procedure

Example 8.7 Estimation of GARCH-Type Models

(View the complete code for this example.)

This example extends Example 8.6 to include more volatility models and to perform model selection and diagnostics.

Following are the data of daily IBM stock prices for the long period from 1962 to 2009:

data ibm_long;
   infile datalines;
   format date MMDDYY10.;
   input date:MMDDYY10. price_ibm;
   r = 100*dif( log( price_ibm ) );
datalines;
01/02/1962 2.68
01/03/1962 2.7
01/04/1962 2.67
01/05/1962 2.62
01/08/1962 2.57

   ... more lines ...   

08/12/2009 119.29
;

The time series of IBM returns is depicted graphically in Output 8.7.1.

Output 8.7.1: IBM Stock Returns: Daily

IBM Stock Returns: Daily


The following statements perform estimation of different kinds of GARCH-type models. First, ODS listing output that contains fit summary tables for each single model is captured by using an ODS OUTPUT statement with the appropriate ODS table name assigned to a new SAS data set. Along with these new data sets, another one that contains parameter estimates is created by using the OUTEST= option in the AUTOREG statement.

/* Capturing ODS tables into SAS data sets */
ods output Autoreg.ar_1.FinalModel.FitSummary
           =fitsum_ar_1;
ods output Autoreg.arch_2.FinalModel.Results.FitSummary
           =fitsum_arch_2;
ods output Autoreg.garch_1_1.FinalModel.Results.FitSummary
           =fitsum_garch_1_1;
ods output Autoreg.st_garch_1_1.FinalModel.Results.FitSummary
           =fitsum_st_garch_1_1;
ods output Autoreg.ar_1_garch_1_1.FinalModel.Results.FitSummary
           =fitsum_ar_1_garch_1_1;
ods output Autoreg.igarch_1_1.FinalModel.Results.FitSummary
           =fitsum_igarch_1_1;
ods output Autoreg.garchm_1_1.FinalModel.Results.FitSummary
           =fitsum_garchm_1_1;
ods output Autoreg.egarch_1_1.FinalModel.Results.FitSummary
           =fitsum_egarch_1_1;
ods output Autoreg.qgarch_1_1.FinalModel.Results.FitSummary
           =fitsum_qgarch_1_1;
ods output Autoreg.tgarch_1_1.FinalModel.Results.FitSummary
           =fitsum_tgarch_1_1;
ods output Autoreg.pgarch_1_1.FinalModel.Results.FitSummary
           =fitsum_pgarch_1_1;

/* Estimating multiple GARCH-type models */
title "GARCH family";
proc autoreg data=ibm_long outest=garch_family;
   ar_1 :           model r = / noint nlag=1 method=ml;
   arch_2 :         model r = / noint garch=(q=2);
   garch_1_1 :      model r = / noint garch=(p=1,q=1);
   st_garch_1_1 :   model r = / noint garch=(p=1,q=1,type=stationary);
   ar_1_garch_1_1 : model r = / noint nlag=1 garch=(p=1,q=1);
   igarch_1_1 :     model r = / noint garch=(p=1,q=1,type=integ,noint);
   egarch_1_1 :     model r = / noint garch=(p=1,q=1,type=egarch);
   garchm_1_1 :     model r = / noint garch=(p=1,q=1,mean=log);
   qgarch_1_1 :     model r = / noint garch=(p=1,q=1,type=qgarch);
   tgarch_1_1 :     model r = / noint garch=(p=1,q=1,type=tgarch);
   pgarch_1_1 :     model r = / noint garch=(p=1,q=1,type=pgarch);
run;

The following statements print partial contents of the data set GARCH_FAMILY. The columns of interest are explicitly specified in the VAR statement.

/* Printing summary table of parameter estimates */
title "Parameter Estimates for Different Models";
proc print data=garch_family;
   var _MODEL_ _A_1 _AH_0 _AH_1 _AH_2
       _GH_1  _AHQ_1 _AHT_1 _AHP_1 _THETA_ _LAMBDA_ _DELTA_;
run;

These statements produce the results shown in Output 8.7.2.

Output 8.7.2: GARCH-Family Estimation Results

Parameter Estimates for Different Models

Obs_MODEL__A_1_AH_0_AH_1_AH_2_GH_1_AHQ_1_AHT_1_AHP_1_THETA__LAMBDA__DELTA_
1ar_10.017112..........
2arch_2.1.602880.232350.21407.......
3garch_1_1.0.027300.06984.0.92294......
4st_garch_1_1.0.028310.06913.0.92260......
5ar_1_garch_1_1-0.0059950.027340.06994.0.92282......
6igarch_1_1..0.00000.1.00000......
7egarch_1_1.0.015410.12882.0.98914...-0.41706..
8garchm_1_1.0.028970.07139.0.92079.....0.094773
9qgarch_1_1.0.001200.05792.0.934580.66461.....
10tgarch_1_1.0.027060.02966.0.92765.0.074815....
11pgarch_1_1.0.016230.06724.0.93952..0.43445.0.53625.


The table shown in Output 8.7.2 is convenient for reporting the estimation result of multiple models and their comparison.

The following statements merge multiple tables that contain fit statistics for each estimated model, leaving only columns of interest, and rename them:

/* Merging ODS output tables and extracting AIC and SBC measures */
data sbc_aic;
   set fitsum_arch_2 fitsum_garch_1_1 fitsum_st_garch_1_1
       fitsum_ar_1 fitsum_ar_1_garch_1_1 fitsum_igarch_1_1
       fitsum_egarch_1_1 fitsum_garchm_1_1
       fitsum_tgarch_1_1 fitsum_pgarch_1_1 fitsum_qgarch_1_1;
   keep Model SBC AIC;
   if Label1="SBC" then do; SBC=input(cValue1,BEST12.4); end;
   if Label2="SBC" then do; SBC=input(cValue2,BEST12.4); end;
   if Label1="AIC" then do; AIC=input(cValue1,BEST12.4); end;
   if Label2="AIC" then do; AIC=input(cValue2,BEST12.4); end;
   if not (SBC=.) then output;
run;

Next, sort the models by one of the criteria—for example, by AIC:

/* Sorting data by AIC criterion */
proc sort data=sbc_aic;
   by AIC;
run;

Finally, print the sorted data set:

title "Selection Criteria for Different Models";
proc print data=sbc_aic;
   format _NUMERIC_ BEST12.4;
run;
title;

The result is given in Output 8.7.3.

Output 8.7.3: GARCH-Family Model Selection on the Basis of AIC and SBC

Selection Criteria for Different Models

ObsModelSBCAIC
1pgarch_1_142907.729242870.7722
2egarch_1_142905.961642876.3959
3tgarch_1_142995.489342965.9236
4qgarch_1_143023.10642993.5404
5garchm_1_143158.413943128.8483
6garch_1_143176.507443154.3332
7ar_1_garch_1_143185.522643155.957
8st_garch_1_143178.249743156.0755
9arch_244605.433244583.259
10ar_145922.072145914.6807
11igarch_1_145925.582845918.1914


According to the smaller-is-better rule for the information criteria, the PGARCH(1,1) model is the leader by AIC while the EGARCH(1,1) is the model of choice according to SBC.

Next, check whether the power GARCH model is misspecified, especially, if dependence exists in the standardized residuals that correspond to the assumed independently and identically distributed (iid) disturbance. The following statements reestimate the power GARCH model and use the BDS test to check the independence of the standardized residuals:

proc autoreg data=ibm_long;
   model r = / noint garch=(p=1,q=1,type=pgarch) BDS=(Z=SR,D=2.0);
run;

The partial results listing of the preceding statements is given in Output 8.7.4.

Output 8.7.4: Diagnostic Checking of the PGARCH(1,1) Model

The AUTOREG Procedure

BDS Test for Independence
DistanceEmbedding
Dimension
BDSPr > |BDS|
2.000022.96910.0030
 33.38100.0007
 43.12990.0017
 53.38050.0007
 63.33680.0008
 73.18880.0014
 82.95760.0031
 92.73860.0062
 102.55530.0106
 112.35100.0187
 122.15200.0314
 131.93730.0527
 141.72100.0852
 151.49190.1357
 161.25690.2088
 171.06470.2870
 180.96350.3353
 190.86780.3855
 200.76600.4437


The results in Output 8.7.4 indicate that when embedded size is greater than 9, you fail to reject the null hypothesis of independence at 1% significance level, which is a good indicator that the PGARCH model is not misspecified.

Last updated: June 19, 2025