开始使用免费开始使用

结合久期与凸性

现在,让我们把最近几章学到的内容结合起来,使用久期与凸性共同预测债券价格变动。考虑一只期限为 7 年、年付 3% 息票、到期收益率为 4% 的债券。

numpy_financial 已为您导入并命名为 npf

本练习是课程的一部分

用 Python 进行债券定价与分析

查看课程

交互式实操练习

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

# Find the price of 7 year bond with 3% coupon and 4% yield, shift yields and reprice
price = ____
price_up = ____
price_down = ____
编辑并运行代码