- /**作了一下语法的修改,至于能不能达到你的目的就不知道了,因为我也不知道超额收益率的计算公式***/
- %macro _group;
- %do np1=0 %to 4;
- %do np2=0 %to 4;
- data _G&np1.&np2.;
- set work.result00;
- where r_cvalue=&np1. and r_bm=&np2.;
- run;
- Proc univariate data=_G&np1.&np2.;
- var return;
- weight cvalue;
- output out=nRe&np1.&np2. mean=nReturn&np1.&np2.;
- run;
- data _null&np1.&np2.;
- set nRe&np1.&np2.;
- call symputx("nReturn&np1.&np2.",nReturn&np1.&np2.);
- run;
- data work._1G&np1.&np2.;
- set work._G&np1.&np2.;
- return1=return-&&&nReturn&np1.&np2.;
- drop return;
- rename return1=return;
- run;
- %end;
- %End;
- %mend _group;
- %_group


雷达卡





京公网安备 11010802022788号







