Dear all,
I have time-series of returns for 49 different industry stock portfolios. I want to regress each of the 49 time-series against 4 factors (IP, MktRF, HML, SMB). After that, I need to regress the returns against all the constants and betas which resulted from the first regression. The generated new betas would be called λs. Finally, I want to aggregate the λs by calculating the mean. So in the end I should have the 5 mean values λ_const, λ_IP, λ_MktRF, λ_HML and λ_SMB.
I already tried the following (Please note that I will not include the variables for all 49 Portfolios, but just a sample):
Now I get 49 regression tables. How can I procede with the aforementioned next steps? I could save each regression in a separate new .dta and merge them after that. But this seems not to be the most efficient solution.
Please see a data sample:
Any help would be much appreciated.
Kind regards,
Alex
I have time-series of returns for 49 different industry stock portfolios. I want to regress each of the 49 time-series against 4 factors (IP, MktRF, HML, SMB). After that, I need to regress the returns against all the constants and betas which resulted from the first regression. The generated new betas would be called λs. Finally, I want to aggregate the λs by calculating the mean. So in the end I should have the 5 mean values λ_const, λ_IP, λ_MktRF, λ_HML and λ_SMB.
I already tried the following (Please note that I will not include the variables for all 49 Portfolios, but just a sample):
Code:
foreach var of varlist Agric_eret Food_eret Soda_eret { asreg `var' IP MktRF HML SMB, fmb }
Please see a data sample:
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input float(date_adj Agric_eret Food_eret Soda_eret IP) double(MktRF HML SMB) 24 -3.66 -6.8 -100.23 -.8879781 -3.87 4.98 1.86 25 -4.2 -.07 -100.19 -.8879781 1.81 .89 -1.18 26 -13.01 1.58 -100.19 -.8879781 -.68 -1 .23 27 -1.98 -4.69 -100.21 -.8879781 -6.59 .48 -.99 28 -11.47 -11.24 -100.23 -.8879781 -8.65 2.32 -3.02 29 -10.68 -8.68 -100.19 -.8879781 -8.47 2.79 -.76 30 7.95 6.89 -100.26 -.8879781 6.28 -3.62 1.61 31 -.18 -.19 -100.22 -.8879781 2.13 -1.22 1.25 32 -6.15 -4.88 -100.2 -.8879781 -5.22 1.31 -2.49 33 -13.96 -2.57 -100.24 -.8879781 -.05 1.35 -4.01 34 15.12 11.95 -100.19 -.8879781 10.87 1.05 2.58 35 .55 2.65 -100.22 -.8879781 1.01 .34 -3.8 end format %tm date_adj
Any help would be much appreciated.
Kind regards,
Alex
Comment