- sort stkcd year month
- by year, sort : egen monthsum = sum(month)
- tab monthsum
而最开始的8个月和最后的4个月肉眼之间可以筛选。
然后求年收益率,设月收益率的变量名为month_re
- gen id = ceil(_n/12)
- lnmonth_re = ln(1 + month_re)
- by id , sort : egen lnyear_re = sum(lnmonth_re)
- gen year_re = exp(lnyear_re) - 1


雷达卡





京公网安备 11010802022788号







