天软金融分析.NET函数大全 > 金融函数 > 基金 > 基金收益率

FundCorr    

简述
返回某基金与IndexId的相关系数,与系统证券pn_stock()相关。
定义
FundCorr(IndexId:String;BegT:Date;EndT:Date;DataSelect:Integer):Real
参数
名称类型说明
IndexIdString指数代码
BegTDate开始日期
EndTDate截止日期
DataSelectInteger所选取的数据
返回Real实数,相关系数
  • 范例

    //获得华安创新与上证指数从20110101到20110910之间的收益率的相关系数
    setsysparam(pn_stock(),'OF040001');
      begt:=inttodate(20110101);
      endt:=inttodate(20110910);
    return FundCorr('SH000001',begt,endt,0);
    //结果:0.3
相关