data c1;
set c1 nobs=nobs;
call symput ('nobs1',nobs);
run;
data c2;
set c2 nobs=nobs;
call symput ('nobs2',nobs);
run;
data c3;
set c3 nobs=nobs;
call symput ('nobs3',nobs);
run;
data c4;
set c4 nobs=nobs;
call symput ('nobs4',nobs);
run;
data b;
set b nobs=nobs;
call symput ('nobsb',nobs);
run;
data trade&d;
set b;
com=1;trade=1;
pb=(&nobs1 /(&nobsb -1))*high+(&nobs2 /(&nobsb -1))*low+(&nobs3 /(&nobsb -1))*(0.5*high+0.5*low)+(&nobs4 /(&nobsb -1))*low;
ps=1.02*pb;
if pb<nlow then suc=0;income=0;
if pb>=nlow & ps>=n2high then suc=0;income=(n2low-pb)/pb;
if pb>=nlow & ps<n2high then suc=1;income=(max(ps,n2low)-pb)/pb;
run;



雷达卡






京公网安备 11010802022788号







