开始使用免费开始使用

美元凸性

计算债券的美元凸性,是利用凸性预测债券价格的重要第一步。在本练习中,您将计算一只期限为 10 年、票息 2%、到期收益率 3%、面值 USD 100 的债券的美元凸性。

回忆美元凸性的公式:

\( Dollar \ Convexity = Convexity \times Bond \ Price \times 0.01^2\)

numpy_financial 已为您导入为 npf

本练习是课程的一部分

用 Python 进行债券定价与分析

查看课程

练习说明

  • 计算一只 10 年期、年票息 2%、到期收益率 3% 的债券的美元凸性,并打印结果。

交互式实操练习

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

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

# Calculate convexity of the bond
convexity = ____

# Calculate dollar convexity and print the result
dollar_convexity = ____
print("Dollar convexity: ", ____)
编辑并运行代码