FundTreynorMeasure(IndexId,BegT,EndT,Rf,DataSelect)
简述
返回Treynor指数(与系统股票pn_stock()相关)
FundTreynorMeasure(IndexId:String,BegT:Date,EndT:Date,Rf:Real,DataSelect:Integer):Real
IndexId:指数代码
BegT:开始日期
EndT:截止日期
Rf:无风险年收益率(%)
DataSelect:所选取的数据
返回:实数, Treynor指数
算法:Treynor=(Rp-Rf_)/Beta
Rp是基金收益率的均值
Rf_是无风险收益率(折算)
beta是基金收益率序列与基准收益率序列的回归系数
范例:
//取华安创新2003年03月14日到2012年10月19日之间的Treynor指数
Setsysparam(pn_stock(),'OF040001');
Return FundTreynorMeasure("SH000001",inttodate(20030314),inttodate(20121019),1.98,0);
//结果:0.35