固定收益证券 - 久期与凸度的matlab计算

发布时间 : 星期四 文章固定收益证券 - 久期与凸度的matlab计算更新完毕开始阅读

吴氏金融工程第二讲:久期与凸度

?PdPBdi?1d2PBB?*?i2di2 (公式2-7)把上式同时除以价格PB,

dP2BdP?PBBP?di*?i?1di2(?i)2 (公式2-8) Bdi2PBd2PBCB?di2P (公式2-9)CB表示凸度。 BdPB由于didi??D,所以有:?PBP??D*?i?12CB(?i)2 (公式2-10)

B?P1B?[?D*?i?2CB(?i)2]*PB (公式2-11)

C?1d2PB1?Tt(t?1)CiBP*2?BdiP2B(1?i)(1?i)i (公式2-12)

参考资料:

25

吴氏金融工程第二讲:久期与凸度

(1)EXCEL算法

例7:一种债券的的面值为100元,票息额为每年9元。债券的到期期限为6年。计算市场利率为3%, 5%,8%和10%情况下及市场利率增加0.5%,请用excel计算该债券的久期和凸度以及债券市场价格的估计变化。

解:详细计算见《久期与凸度的计算.xls》 这里给出结果汇总表:

利率 △i i 债券价格PB PB 132.5 修正债券价格的变久期 化 D* 4.9 △PB=-D*PB△i 凸债券价格的变化 度 CB 公式2-11 -3.1883 -2.809 -2.3317 0.03 0.005 0.05 0.005 -3.24625 35 -2.86314 36 -2.380105 37 120.3 4.76 0.08 0.005 104.62 4.55 26

吴氏金融工程第二讲:久期与凸度

0.1 0.005 95.64 4.42 -2.113644 38 -2.0682

凸度的特性:

① 非含权债券的凸性都是正数,这对于持有人而言,当利率上升时,债券价格下跌幅度没有久期估计的那么大,而当市场利率上升时,价格上升的幅度大于久期的估计水平。 (见上面的图) ②凸性会随着到期收益率的增加而降低。因为到期收益率增加,折现因子减小,考虑到债券的现金流是固定的,所以凸度降低。 ③ 当到期收益率与久期不变的情况下,票面利率越低债的凸性越小。

(2)计算现金流凸度

调用方式:Convexity =cfconv(CashFlow, Yield)

例8:nine payments of $2.50 and a final payment of $102.50 with a yield of 2.5% returns a convexity of 90.45 periods.(Matlab原例)

解:>> Cashflow=[2.50, 2.50, 2.50,2.50, 2.50, 2.50,2.50, 2.50, 2.50, 102.50]; >> Convex=cfconv(Cashflow, 0.025) Convex = 90.4493

例9:一种债券的的面值为100元,票息额连续9年为每年2.4元。第10年还本付息。求该现金流凸度。

解:>> Cashflow=[2.40, 2.40, 2.40,2.40, 2.40, 2.40,2.40, 2.40, 2.40, 102.40]; >> Convex=cfconv(Cashflow, 0.024) Convex = 91.1452

(3)根据债券收益率计算凸度

调用方式:[YearConvexity, PerConvexity] = bndcony(Yield, CouponRate, Settle, Maturity, Period, Basis, EndMonthRule, IssueDate, FisrtCouponDate, LastCouponDate, StartDate, Face)

27

张氏教材上有误,不是0.025是0.024 吴氏金融工程第二讲:久期与凸度

输入参数同bnddury.

其中:YearConvexity指根据年为单位的凸度,PerConvexity是以半年为单位的债券凸度,为YearConvexity的4倍。

例10:三种债券到期收益率分别为5%,5.5%和6%,票息率都为5.5%,结算日为1999年8月2日,到期日为2004年6月15日,每年付2次息,应计天数法则为ACT/ACT。求凸度。 解:

>> Yield=[0.05, 0.05, 0.06]; >> CouponRate = 0.055; 此处张树德的书>> Settle = '02-Aug-1999'; 上是用的分号,>> Maturity='15-Jun-2004'; 我用逗号一样通过。 >> Period =2; >> Basis=0;

>> [YearConvexity, PerConvexity] = bndconvy(Yield, CouponRate, Settle, Maturity, Period, Basis) YearConvexity = PerConvexity = 21.1839 84.7357 21.1839 84.7357 20.8885 83.5541

(4)根据债券价格计算凸度

调用方式:[YearConvexity, PerConvexity] = bndconvp(Yield, CouponRate, Settle, Maturity, Period, Basis, EndMonthRule, IssueDate, FisrtCouponDate, LastCouponDate, StartDate, Face) 输入参数同bnddurp

例11:假设有三种债券,其价格分别为106元,100元、98元,票息率都为5%,结算日都为1999年8月2日,到期日为2004年6月15日。半年付一次息,ACT/ACT。请计算三种债券的凸度。

28

联系合同范文客服:xxxxx#qq.com(#替换为@)