開始使用免費開始

同時運用 duration 與 convexity

現在把前幾章所學綜合起來,用 duration 與 convexity 一起預測債券價格的變動。考慮一檔 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 = ____
編輯並執行程式碼