开始使用免费开始使用

凸性调整

在同时使用久期和凸性来预测债券价格变动时,下一步就是求取债券的凸性调整。本练习中,您将计算一只期限为 10 年、收益率为 5%、面值为 100 美元的零息债券的凸性调整。

回忆凸性调整的公式:

\( Convexity \ Adjustment = 0.5 \times \ Dollar \ Convexity \times 100^2 \times (\Delta y)^2\)

numpy_financial 已为您导入为 npf

本练习是课程的一部分

用 Python 进行债券定价与分析

查看课程

练习说明

  • 计算 10 年期零息债券的凸性调整,并打印结果。

交互式实操练习

通过完成这段示例代码来试试这个练习。

# Find price of 10 year zero coupon bond with a 5% yield, shift yields, and reprice
price = ____
price_up = ____
price_down = ____

# Calculate convexity and dollar convexity of the bond
convexity = ____
dollar_convexity = ____

# Find the convexity adjustment and print the result
convexity_adjustment = ____
print("Convexity adjustment: ", ____)
编辑并运行代码