BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Junyong
Pyrite | Level 9

The following code (1) downloads McDonald's stock prices from July 5, 1966 to November 1, 2021, (2) computes its percent returns, and (3) estimates the GARCH(1,1) model.

filename mcd url 'https://query1.finance.yahoo.com/v7/finance/download/
mcd?period1=-999999999&period2=9999999999';

proc import file=mcd dbms=csv replace out=mcd;
run;

proc expand out=mcd;
	id date;
	convert adj_close=return/tout=(pctdif);
run;

proc autoreg;
	model return=/garch=(q=1,p=1);
	output ht=variance out=mcd;
run;

Because ARCH1+GARCH1=0.0485+0.9539=1.0024>1, the unconditional variance is undefined. However, the output data set assigns 3.8592488163 as the variance of the first observation—how does AUTOREG compute this value of 3.8592488163 here? It seems this is not documented in The AUTOREG Procedure.

1 ACCEPTED SOLUTION

Accepted Solutions
Ksharp
Super User
It would be better if you post it at Forecasting forum,since it is about SAS/ETS

View solution in original post

1 REPLY 1
Ksharp
Super User
It would be better if you post it at Forecasting forum,since it is about SAS/ETS

SAS Innovate 2025: Register Today!

 

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.


Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 618 views
  • 0 likes
  • 2 in conversation