“Each month, form ten decile portfolios sorted on OIBNUM. Then, calculate the value-weighted and equally-weghted ptf return in the next month (so if I sort on information at time t, calculate the return from t to t+1)”
附件是stata的样本数据,其中ret是return,val是value,date是月度时间,stock是股票代码,OIBNUM是用于sort的指标。
我不知道在stata中该怎么操作,想写个循环,但也不知道该怎么写,提前谢谢大家!
解释一下英文部分:就是每个月按照OIBNUM的大小把所有股票分成十个组,然后计算每个组股票在下个月的平均收益或加权平均收益。



雷达卡



京公网安备 11010802022788号







