使用 Python 進行債券評價與分析
Joshua Mayhew
Options Trader
Duration=殖利率變動 1% 時,債券價格的%變動
Dollar duration=殖利率變動 1% 時,債券價格的美元變動:
告訴你利率變動時,會賺或賠多少錢
$ \text{Dollar Duration} = \text{Duration} \times \text{Bond Price} \times 0.01$
DV01=殖利率變動 0.01% 時,債券價格的美元變動。
0.01%=1% 的 1%=1 個基點
「dollar value of one basis point」的縮寫
$ \text{DV01} = \text{Duration} \times \text{Bond Price} \times 0.0001$
價格 USD 92.28、Duration 7.98% 的債券:
dollar_duration = 92.28 * 7.98 * 0.01
print("Dollar Duration: ", dollar_duration)
Dollar Duration: 7.36
DV01 = 92.28 * 7.98 * 0.0001
print("DV01: ", DV01)
DV01: 0.0736
portfolio_dv01 = 10000
bond_dv01 = 0.0736
hedge_quantity = portfolio_dv01 / bond_dv01
print("Number of bonds to sell: ", hedge_quantity)
Number of bonds to sell: 135,869
bond_price = 92.28
hedge_amount = hedge_quantity * bond_price
print("Dollar amount to sell: USD", hedge_amount)
Dollar amount to sell: USD 12,538,043
$ \text{Price Change} = -100 \times \text{Dollar Duration} \times \Delta y$
利率下跌 3% 的預估價格變動:
-100 * 7.36 * -0.03
22.08
以重訂價格計算的實際變動:
-npf.pv(rate=0.02, nper=10, pmt=4, fv=100) - 92.28
25.69
使用 Python 進行債券評價與分析