Dear all,
I am currently working with panel data that contains stock market information for numerous companies from 2001-2013. A snap shot of my data is below
I would like to be able to calculate the Jensen alpha by regressing the return(vwretd) on the the Fama-French 3 factors (MktRF, SMB, HML) from years 2001 to 2003. I have researched others who have posted a similar question, however, I cannot seem to fit my data into their code.
An example
Will something similar to this work with my data?
Thank you in advance!
I am currently working with panel data that contains stock market information for numerous companies from 2001-2013. A snap shot of my data is below
|
An example
Code:
gen alpha = . gen b_mktrf = . gen b_smb = . gen b_hml = . gen b_umd = . qui forval p = 1/`=_N' { capture ereturn clear capture regress VW_ExcRet_Gr mktrf smb hml umd if crsp_fundno == crsp_fundno[`p'] & inrange(r_year,r_year[`p']-2,r_year[`p']) capture replace alpha = _b[_cons] in `p' capture replace b_mktrf = _b[mktrf] in `p' capture replace b_smb = _b[smb] in `p' capture replace b_hml = _b[hml] in `p' capture replace b_umd = _b[umd] in `p' }
Thank you in advance!
Comment