Hi dear Stata usrs,
I am new to this program and would really appreciate any help/ advice I could get fom you.
Currently I am trying to replicate results form the Lettau Paper: Reserruceting the (C)CAPM
however I have run into some difficulty with the code asreg...with Fama Macbeth with further extensions to the fama-french factors
I have panel data, portfolio*25, 141 quaters, panel variable PortfolioID and time variable qdate
I understand from other posts that my data structure is flat? Meaning for all the portfolios my Factors will not change, it only changes by year...
So the way i understood it, I could not directly use
Instead in my first pass I do the first step of FMB by using code
to generate 25 betas of market premium like the CAPM
[CODE]
CAPM beta as _b_RmRf for each portfolio... However with this code I get 141 Observations each Portfolio which leads to me getting 141*25 estimates
I would now like to generate the second pass regression which uses the beta as independent variable,
does not give me the same result as the paper R2is totally off, now I am wondering what I did wrong...
Your help is deeply appreciated and desperately needed! thanks in advance!
I am new to this program and would really appreciate any help/ advice I could get fom you.
Currently I am trying to replicate results form the Lettau Paper: Reserruceting the (C)CAPM
however I have run into some difficulty with the code asreg...with Fama Macbeth with further extensions to the fama-french factors
I have panel data, portfolio*25, 141 quaters, panel variable PortfolioID and time variable qdate
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input float qdate double RmRf long PortfolioId float ExcessReturn double _b_RmRf 14 .030600000000000002 1 .015731012 1.6249410533570916 15 .0355 1 -.0529796 1.6249410533570916 16 .0541 1 .06708822 1.6249410533570916 17 .028300000000000002 1 -.01749055 1.6249410533570916 18 .0302 1 .06054076 1.6249410533570916 19 .0059 1 -.008875915 1.6249410533570916 20 .026000000000000002 1 .10884585 1.6249410533570916 21 -.0325 1 -.1095675 1.6249410533570916 22 .0721 1 .07718258 1.6249410533570916 23 .0361 1 .1580933 1.6249410533570916 24 -.0309 1 .12119982 1.6249410533570916 25 -.0506 1 -.04876373 1.6249410533570916 26 -.10439999999999999 1 -.16779438 1.6249410533570916 27 .05480000000000001 1 .026802344 1.6249410533570916 28 .1328 1 .3746144 1.6249410533570916 29 .0172 1 .22967845 1.6249410533570916 30 .06860000000000001 1 .2037378 1.6249410533570916 31 .0013000000000000002 1 .12816793 1.6249410533570916 32 -.07200000000000001 1 -.09860197 1.6249410533570916 33 .1211 1 .31857675 1.6249410533570916 34 .0262 1 .0519401 1.6249410533570916 35 .0182 1 .07524841 1.6249410533570916 36 -.043899999999999995 1 -.11570775 1.6249410533570916 37 -.0576 1 -.14388427 1.6249410533570916 38 -.0564 1 -.12933554 1.6249410533570916 39 -.0165 1 -.05872784 1.6249410533570916 40 -.0415 1 -.1080084 1.6249410533570916 41 -.2182 1 -.417579 1.6249410533570916 42 .16570000000000001 1 .3361435 1.6249410533570916 43 .0819 1 -.10758695 1.6249410533570916 44 .1054 1 .3385534 1.6249410533570916 45 -.0099 1 -.07216685 1.6249410533570916 46 -.0169 1 -.05716282 1.6249410533570916 47 .034100000000000005 1 .00927644 1.6249410533570916 48 .05940000000000001 1 .19291367 1.6249410533570916 49 -.0094 1 -.07765593 1.6249410533570916 50 .013500000000000002 1 -.14067286 1.6249410533570916 51 .0588 1 -.06695006 1.6249410533570916 52 -.08560000000000001 1 -.27592877 1.6249410533570916 53 -.0898 1 -.26883635 1.6249410533570916 54 .0593 1 .23699278 1.6249410533570916 55 -.1315 1 -.3164497 1.6249410533570916 56 -.034300000000000004 1 .08278478 1.6249410533570916 57 -.1247 1 -.17736764 1.6249410533570916 58 -.26789999999999997 1 -.30288 1.6249410533570916 59 .07110000000000001 1 .00250248 1.6249410533570916 60 .2331 1 .458694 1.6249410533570916 61 .15 1 .25176707 1.6249410533570916 62 -.13240000000000002 1 -.1482514 1.6249410533570916 63 .0644 1 -.007918526 1.6249410533570916 64 .1528 1 .3058284 1.6249410533570916 65 .0116 1 -.0042286133 1.6249410533570916 66 .0033000000000000004 1 -.04640281 1.6249410533570916 67 .035 1 .12683548 1.6249410533570916 68 -.0718 1 .013305895 1.6249410533570916 69 .0333 1 .04078316 1.6249410533570916 70 -.0371 1 .032719567 1.6249410533570916 71 -.0025 1 .08024173 1.6249410533570916 72 -.047400000000000005 1 .09057652 1.6249410533570916 73 .079 1 .18903707 1.6249410533570916 74 .0763 1 .14273192 1.6249410533570916 75 -.0876 1 -.1970072 1.6249410533570916 76 .0626 1 .17219386 1.6249410533570916 77 .0158 1 .03856019 1.6249410533570916 78 .057800000000000004 1 .08902875 1.6249410533570916 79 -.0159 1 .07220654 1.6249410533570916 80 -.0917 1 -.14477758 1.6249410533570916 81 .1295 1 .1673029 1.6249410533570916 82 .107 1 .3138375 1.6249410533570916 83 .0596 1 .1389413 1.6249410533570916 84 -.0128 1 -.04334942 1.6249410533570916 85 -.041100000000000005 1 -.031451404 1.6249410533570916 86 -.1542 1 -.3176091 1.6249410533570916 87 .045 1 .014312462 1.6249410533570916 88 -.1077 1 -.151824 1.6249410533570916 89 -.0375 1 -.04637446 1.6249410533570916 90 .0908 1 .007857897 1.6249410533570916 91 .1718 1 .2972317 1.6249410533570916 92 .0929 1 .1848355 1.6249410533570916 93 .10550000000000001 1 .23082162 1.6249410533570916 94 -.034 1 -.16788845 1.6249410533570916 95 -.027700000000000002 1 -.14269365 1.6249410533570916 96 -.057800000000000004 1 -.12566718 1.6249410533570916 97 -.0425 1 -.11388296 1.6249410533570916 98 .0671 1 -.017584154 1.6249410533570916 99 -.0079 1 -.11242592 1.6249410533570916 100 .0819 1 .1532007 1.6249410533570916 101 .05480000000000001 1 -.011048486 1.6249410533570916 102 -.062000000000000006 1 -.09134184 1.6249410533570916 103 .1522 1 .08163154 1.6249410533570916 104 .1303 1 .13537428 1.6249410533570916 105 .043899999999999995 1 .05558895 1.6249410533570916 106 -.0922 1 -.1845279 1.6249410533570916 107 .0265 1 -.07165623 1.6249410533570916 108 .19340000000000002 1 .2431364 1.6249410533570916 109 .0206 1 -.04031385 1.6249410533570916 110 .047400000000000005 1 -.016991561 1.6249410533570916 111 -.2432 1 -.3941709 1.6249410533570916 112 .0667 1 .15586843 1.6249410533570916 113 .0512 1 .022955963 1.6249410533570916 end format %tq qdate label values PortfolioId Portfolio label def Portfolio 1 "ME1BM1", modify
So the way i understood it, I could not directly use
Code:
bys PortfolioId: asreg ExcessReturn RmRf, fmb
Instead in my first pass I do the first step of FMB by using code
Code:
bys PortfolioId: asreg ExcessReturn RmRf
[CODE]
CAPM beta as _b_RmRf for each portfolio... However with this code I get 141 Observations each Portfolio which leads to me getting 141*25 estimates
I would now like to generate the second pass regression which uses the beta as independent variable,
Code:
asreg ExcessReturn _b_RmRf, fmb
Your help is deeply appreciated and desperately needed! thanks in advance!