FundCorr
简述
返回某基金与IndexId的相关系数,与系统证券pn_stock()相关。
FundCorr(IndexId:String;BegT:Date;EndT:Date;DataSelect:Integer):Real
名称 | 类型 | 说明 |
---|
IndexId | String | 指数代码 |
BegT | Date | 开始日期 |
EndT | Date | 截止日期 |
DataSelect | Integer | 所选取的数据
 |
返回 | Real | 实数,相关系数 |
//获得华安创新与上证指数从20110101到20110910之间的收益率的相关系数
setsysparam(pn_stock(),'OF040001');
begt:=inttodate(20110101);
endt:=inttodate(20110910);
return FundCorr('SH000001',begt,endt,0);
//结果:0.3