This is not only a question about a code and you probably need to know the paper "A five-factor asset pricing model" but maybe somebody can help me anyway.
How did FF assign each stock to one of the 25 Size-BM, Size-OP & Size-Inv portfolio groups at the end of each June?
I already created the relevant variables (Book-to-market, operating profitability, investment, and additionally momentum).
Code:
** generate book-to-market ratio generate bm = e/mv ** generate operating profitability generate op = (s-cogs-i-sga)/e ** generate investment by company: gen inv = (ta- ta[_n-12])/ta[_n-12] ** generate momentum by company: gen mom = (mv[_n-1]/mv[_n-13])-1 ** sort for 5 size and 5 B/M-, op-, inv-, & mom-groups egen size_group = xtile(mv), by(date2) p(20 40 60 80) egen bm_group = xtile(bm), by(date2) p(20 40 60 80) egen op_group = xtile(op), by(date2) p(20 40 60 80) egen inv_group = xtile(inv), by(date2) p(20 40 60 80) egen mom_group = xtile(mom), by(date2) p(20 40 60 80)
I already tried something with this code to use the month.
Code:
gen month = month(date2)
Thanks in advance!
Pascal
0 Response to Portfolio construction Fama & French
Post a Comment