bdV_YieldToMaturity
简述
债券到期收益率,与系统参数Pn_Stock(),Pn_date()相关。取数结果与函数BondYieldToMaturity(SettlementDate)是一样的。区别在于两个函数给定日期和数据提供商的方式不同。BondYieldToMaturity(SettlementDate)的数据提供商由系统参数Pn_bonddataprovider()给定,而日期由用户参数SettlementDate给定。
DBType为2时天软算法见函数BondYieldToMaturity的说明。
bdV_YieldToMaturity (SettlementDate:TDateTime) :Real
DBType:整数类型,数据提供商,DBType0:中证;1:中债登;2:天软计算
返回:实数
范例:
//提取SH019405在20150630的到期收益率数据
setsysparam(pn_stock(),"SH019405");
setsysparam(pn_date(),20150630T);
return bdV_YieldToMaturity (0);//数据提供商:中证