百分比久期与美元久期
在实际业务中,美元久期与 DV01 更常用于快速衡量单只债券或投资组合的利率风险。它们也可用于包含利率风险的其他金融工具。
本练习中,您将计算一只债券的美元久期和 DV01。该债券到期年限为 30 年,票面利率为 3.5%,到期收益率为 5%,面值为 100 美元。
numpy_financial 已为您导入为 npf。
本练习是课程的一部分
用 Python 进行债券定价与分析
练习说明
- 按常规方法求一只期限 30 年、票面利率 3.5%、收益率 5% 的债券久期。
- 求该债券的美元久期。
- 求该债券的 DV01。
交互式实操练习
通过完成这段示例代码来试试这个练习。
# Find the duration of the bond
price = ____
price_up = ____
price_down = ____
duration = ____
# Find the dollar duration of the bond
dollar_duration = ____ * ____ * ____
print("Dollar Duration: ", ____)
# Find the DV01 of the bond
dv01 = ____ * ____ * ____
print("DV01: ", ____)