turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Find a Community

- Home
- /
- Analytics
- /
- Forecasting
- /
- Variance Model in PROC MODEL

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

06-12-2009 03:19 AM

Hi,

I am trying to implement various GARCH models using the PROC model statement, but having problems.

I am comparing the results from some examples provided in SAS Support:

rsubmit;

%let df = 7.5;

%let sig1 = 1;

%let sig2 = 0.1 ;

%let var2 = 2.5;

%let nobs = 1000 ;

%let nobs2 = 2000 ;

%let arch0 = 0.1 ;

%let arch1 = 0.2 ;

%let garch1 = 0.75 ;

%let intercept = 0.5 ;

data normal;

lu = &var2;

lh = &var2;

do i= -500 to &nobs ;

/* GARCH(1,1) with normally distributed residuals */

h = &arch0 + &arch1*lu**2 + &garch1*lh;

u = sqrt(h) * rannor(12345) ;

y = &intercept + u;

lu = u;

lh = h;

if i > 0 then output;

end;

run;

proc autoreg data = normal ;

/* Estimate GARCH(1,1) with normally distributed residuals with AUTOREG*/

model y = / garch = ( q=1,p=1 ) ;

output out = normal p = pred r = resid cev = vhat;

run ;

quit ;

/* Estimate GARCH(1,1) with normally distributed residuals with MODEL*/

proc model data = normal ;

/* mean model */

y = intercept ;

/* variance model */

h.y = arch0 + arch1*xlag(resid.y**2,mse.y) +

garch1*xlag(h.y,mse.y) ;

/* fit the model */

fit y / method = marquardt outall outest = ests out = NORMALB fiml ; ;

run ;

quit ;

endrsubmit;

When I look at the Residuals in NORMALB, they do not appear to make sense. So, I was expecting RESIDUAL to equal PREDICTED - EXPECTED = 0.479 - -1.035 = 1.51 vs the output in NORMALB = -0.864. Where does this value come from?

Also, the PROC AUTOREG model has a nice output parameter cev = zzz which outputs the volatility estimate - is there an equivalend method of extracting volatility estimates from the PROC MODEL h.zzz model for variance.

I need to use the PROC MODEL approach rather than PROC AUTOREG as PROC MODEL allows more exotic GARCH models than PROC AUTOREG.

Hope somebody can help.

Thanks!

I am trying to implement various GARCH models using the PROC model statement, but having problems.

I am comparing the results from some examples provided in SAS Support:

rsubmit;

%let df = 7.5;

%let sig1 = 1;

%let sig2 = 0.1 ;

%let var2 = 2.5;

%let nobs = 1000 ;

%let nobs2 = 2000 ;

%let arch0 = 0.1 ;

%let arch1 = 0.2 ;

%let garch1 = 0.75 ;

%let intercept = 0.5 ;

data normal;

lu = &var2;

lh = &var2;

do i= -500 to &nobs ;

/* GARCH(1,1) with normally distributed residuals */

h = &arch0 + &arch1*lu**2 + &garch1*lh;

u = sqrt(h) * rannor(12345) ;

y = &intercept + u;

lu = u;

lh = h;

if i > 0 then output;

end;

run;

proc autoreg data = normal ;

/* Estimate GARCH(1,1) with normally distributed residuals with AUTOREG*/

model y = / garch = ( q=1,p=1 ) ;

output out = normal p = pred r = resid cev = vhat;

run ;

quit ;

/* Estimate GARCH(1,1) with normally distributed residuals with MODEL*/

proc model data = normal ;

/* mean model */

y = intercept ;

/* variance model */

h.y = arch0 + arch1*xlag(resid.y**2,mse.y) +

garch1*xlag(h.y,mse.y) ;

/* fit the model */

fit y / method = marquardt outall outest = ests out = NORMALB fiml ; ;

run ;

quit ;

endrsubmit;

When I look at the Residuals in NORMALB, they do not appear to make sense. So, I was expecting RESIDUAL to equal PREDICTED - EXPECTED = 0.479 - -1.035 = 1.51 vs the output in NORMALB = -0.864. Where does this value come from?

Also, the PROC AUTOREG model has a nice output parameter cev = zzz which outputs the volatility estimate - is there an equivalend method of extracting volatility estimates from the PROC MODEL h.zzz model for variance.

I need to use the PROC MODEL approach rather than PROC AUTOREG as PROC MODEL allows more exotic GARCH models than PROC AUTOREG.

Hope somebody can help.

Thanks!

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

07-31-2012 09:52 AM

Hey,

I would like to use the proc model for estimating a garch model, but I don't know how to extract the volatility estimated.

DO you find the solution to extract the volatility with this procedure?

Thanks a lot,

Anaïs

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

09-06-2014 02:19 PM

As for the cev, I think there is an easy way to get. Under PROC MODEL, in FIT statement, check "**OUTRESID**":

"...If the h.var equation is specified, the residual values written to the OUT= data set are the normalized residuals, defined as , divided by the square root of the h.var value..."

note that H.*name* variable specifies the functional form for the variance of the named equation

That means that you can derive h.var (cev) by using actual, predicted, and residual outputs.

Hope helpful.