pf_ExcessReturn
简述
组合-超额收益率
pf_ExcessReturn(t1:Array;fName1:String;t2:Array;fName2:String):Float
名称 | 类型 | 说明 |
---|
t1 | Array | 组合收益率序列 |
fName1 | String | t1数组中,代表收益率序列的字段名(涨幅、收益率等) |
t2 | Array | 基准收益率序列 |
fName2 | String | t2数组中,代表收益率序列的字段名(涨幅、收益率等) |
返回 | Float | 实数 |
组合累计收益率与基准累计收益率之差
//此处以浦发银行收益率序列作为用户组合的收益率序列,基准为上证指数
stockid := 'SH600000';
IndexId := 'SH000001';
BegT := inttodate(20110101);
EndT := inttodate(20110630);
setsysparam(pn_date(),EndT);
n := tradedays(begt,endt);
t := nday(n,'日期',sp_time(),
'涨幅1',spec(StockZf3(),stockid),
'涨幅2',spec(StockZf3(),IndexId));
returnpf_ExcessReturn(t,'涨幅1',t,'涨幅2');
//返回结果:6.13