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
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
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
Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.
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.