- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hello guys,
I'm working on estimating capm and FF-3-factor model alphas and betas. I downloaded data over 40-year period, and divided all data into ten deciles. I need to estimate the two models in every deciles. My codes are as follow, but the coefficients are all zeros in two models and intercept are the same. I dont know how to fix that problems, could anybody help me out?
proc sort data=aa03; by myrank date ; run;
proc reg noprint data=aa03 outest=ff;
by myrank date;
model exret= mkt_rf smb hml/sse;
quit;
proc means data=ff n mean t probt;
where 1972<=year(date)<=2017;
class myrank;
var intercept;
run;
proc sort data=aa03; by myrank date ; run;
data aa03; set aa03;
where 1972<=year(date)<=2017;
run;
proc reg noprint data=aa03 outest=capm;
model exret= mkt_rf / sse ;
by myrank date;
quit; proc means data=capm n mean t probt;where 1972<=year(date)<=2017;class myrank;var intercept;run;
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Yes, it works when there is only by rank, but because i'm doing momentum portfolios, I need (alpha in rank 10 - alpha in rank 1 )to calculate WML, if I only have one value for each rank, how could I get t-value for WML
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
I only have one for per rank/date combination. but my next stop is proc means class rank, to make sure i get one result for every rank
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
sorry, I meant my result had one for per combination.
Around 190 observations.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Your model
model exret= mkt_rf / sse ;
by myrank date;
doesn't make sense to me. The MKT_RF is market rate of return (commonly SP500 return) excess over risk-free assets, correct? This is a constant for each date. Using "by myrank date" means you are regressing EXRET for a collection of companies against a constant. You should not be surprised to get a zero coefficient for mkt_rf. And the intercept estimate should effectively be the mean of EXRET. if you want the CAPM (capital asset pricing model) for each company you have to run this regression for each company over the entire time span of interest. Then you will have CAPM alphas and betas for each company.
Also, I don't recall you reporting on what variables you were using to assign companies to deciles. What are they?
The hash OUTPUT method will overwrite a SAS data set, but not append. That can be costly. Consider voting for Add a HASH object method which would append a hash object to an existing SAS data set
Would enabling PROC SORT to simultaneously output multiple datasets be useful? Then vote for
Allow PROC SORT to output multiple datasets
--------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
I divided data into ten deciles based on past 1-year stock returns