idiosyncratic volatility
Posted: 05 March 2016 05:23 PM   [ Ignore ]
Newbie
Rank
Total Posts:  6
Joined  2015-11-19

Hello everyone,

I was trying to use the %IDVOL macro from WRDS but having problems. Could anyone tell me what’s wrong here? Really appreciate your help!

%IDVOL (INSET=crsp , OUTSET=crsp1, DATEVAR=date, RETVAR= ret, FREQ=D, WINDOW=250,STEP=1, MIN=125, MODEL=m);
crsp is the crspa.dsf


Here is the link to the macro: https://wrds-web.wharton.upenn.edu/wrds/research/macros/sas_macros/idvol.cfm

Here is the log:
### DONE!
### MERGING IN THE RISK FACTORS
ERROR 180-322: Statement is not valid or it is used out of proper order.

ERROR: Libref FF is not assigned.
ERROR: File WORK._VOL.DATA does not exist.
### DONE!
8         data _caldates; set _caldates;    n+1;    if intnx(‘month’,beg_date,0,‘e’)=    intnx(‘month’,”&mindate;“d,0,‘e’) then call symput (‘start’,n);    if intnx(‘month’,end_date,0,‘e’)=    intnx(‘month’,”&maxdate;“d,0,‘e’) then call symput
                                                                        —————-
                                                                          77
ERROR 77-185: Invalid number conversion on “&mindate;“d.

8   ! data _caldates; set _caldates;    n+1;    if intnx(‘month’,beg_date,0,‘e’)=    intnx(‘month’,”&mindate;“d,0,‘e’) then call symput (‘start’,n);    if intnx(‘month’,end_date,0,‘e’)=    intnx(‘month’,”&maxdate;“d,0,‘e’) then call symput (‘finish’,n
                                                                                                                                              —————-
                                                                                                                                                77
WARNING: Apparent symbolic reference MINDATE not resolved.
ERROR: Invalid date/time/datetime constant “&mindate;“d.
WARNING: Apparent symbolic reference MAXDATE not resolved.
ERROR: Invalid date/time/datetime constant “&maxdate;“d.
ERROR 77-185: Invalid number conversion on “&maxdate;“d.

WARNING: The data set WORK._CALDATES may be incomplete.  When this step was stopped there were 0 observations and 3 variables.
WARNING: Data set WORK._CALDATES was not replaced because this step was stopped.
### ESTIMATING IDIOSYNCRATIC VOLATILITY

Thanks,
nsjb

Profile
 
 
Posted: 05 March 2016 08:51 PM   [ Ignore ]   [ # 1 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  901
Joined  2011-09-19

hi,

It looks like the code assumes that you have a library called FF (Fama French); do you have that library defined (and does it contain the factors?)

Best,

Joost

 Signature 

To reply/post new questions: Please use the group WRDS/SAS on Google Groups! http://groups.google.com/d/forum/wrdssas

Profile
 
 
Posted: 05 March 2016 09:48 PM   [ Ignore ]   [ # 2 ]
Newbie
Rank
Total Posts:  6
Joined  2015-11-19

Joost,

Thanks for the quick reply. I don’t have a library called FF. I thought WRDS will make a note that anyone uses this macro would need to download factors first.

nsjb

Joost Impink - 05 March 2016 08:51 PM

hi,

It looks like the code assumes that you have a library called FF (Fama French); do you have that library defined (and does it contain the factors?)

Best,

Joost

Profile