BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
amanjot_42
Fluorite | Level 6

Hello Everyone,

I am trying to come up with the predicted values of conditional variance by using the following code:

 

proc autoreg data = want;
by year;
model stock_returns = / garch = ( q=1,p=1 );
output out=var predicted=variance;
run;
quit;

 

My data contains daily observations of Stock X returns. I want to run this GARCH model on yearly basis. The problem is this code generates predicted values of stock returns and not the predicted values of conditional variance. Can you please help in this regard?

Regards,

Aman

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
sbxkoenk
SAS Super FREQ

Hello @amanjot_42 ,

 

The CEV= option in the OUTPUT statement stores the estimated conditional error variance at each time period in the variable VHAT in an output data set named OUT.

The below is just an example (not related to your data!).

 

proc autoreg data=c;
  model y = time / nlag=2 garch=(q=1,p=1) maxit=50;
  output out=out cev=vhat;
run;

Kind regards,

Koen

View solution in original post

3 REPLIES 3
Ksharp
Super User
Plz post it at Forecast Forum , proc autoreg is under SAS/ETS module .
sbxkoenk
SAS Super FREQ

Hello @amanjot_42 ,

 

The CEV= option in the OUTPUT statement stores the estimated conditional error variance at each time period in the variable VHAT in an output data set named OUT.

The below is just an example (not related to your data!).

 

proc autoreg data=c;
  model y = time / nlag=2 garch=(q=1,p=1) maxit=50;
  output out=out cev=vhat;
run;

Kind regards,

Koen

amanjot_42
Fluorite | Level 6
Thank you so much, Koen,
This works perfectly well!
Regards,
Aman

sas-innovate-2024.png

 

Secure your spot at the must-attend AI and analytics event of 2024: SAS Innovate 2024! Get ready for a jam-packed agenda featuring workshops, super demos, breakout sessions, roundtables, inspiring keynotes and incredible networking events.

 

Register by March 1 to snag the Early Bird rate of just $695! Don't miss out on this exclusive offer. 

 

Register now!

Multiple Linear Regression in SAS

Learn how to run multiple linear regression models with and without interactions, presented by SAS user Alex Chaplin.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 3 replies
  • 1511 views
  • 1 like
  • 3 in conversation