美元凸性与债券价格预测

用 Python 进行债券定价与分析

Joshua Mayhew

Options Trader

美元凸性

  • 凸性 = 收益率变动1%时久期的百分比变动

  • 美元凸性 = 收益率变动1%时久期的美元变动:

$ \text{Dollar Convexity} = \text{Convexity} \times \text{Bond Price} \times 0.01^2$

用 Python 进行债券定价与分析

美元凸性示例

  • 10年期债券,3%票息,5%到期收益率,面值USD 100,其美元凸性是多少?
price = -npf.pv(rate=0.05, nper=10, pmt=3, fv=100)
price_up = -npf.pv(rate=0.06, nper=10, pmt=3, fv=100)
price_down = -npf.pv(rate=0.04, nper=10, pmt=3, fv=100)
convexity = (price_down + price_up - 2 * price) / (price * 0.01 ** 2)
dollar_convexity = convexity * price * 0.01 ** 2
print("Dollar Convexity: ", dollar_convexity)
Dollar Convexity:  0.69
用 Python 进行债券定价与分析

凸性调整

  • 凸性可用于改进债券价格预测
  • 凸性调整 = 价格因凸性而变动的部分

$ \text{Convexity Adjustment} = 0.5 \times \text{Dollar Convexity} \times 100^2 \times (\Delta y)^2$

用 Python 进行债券定价与分析

凸性调整示例

  • 10年期债券,3%票息,5%到期收益率,面值USD 100
  • 其凸性调整是多少?
price = -npf.pv(rate=0.05, nper=10, pmt=3, fv=100)
price_up = -npf.pv(rate=0.06, nper=10, pmt=3, fv=100)
price_down = -npf.pv(rate=0.04, nper=10, pmt=3, fv=100)
convexity = (price_down + price_up - 2 * price) / (price * 0.01 ** 2)

dollar_convexity = convexity * price * 0.01 ** 2
convexity_adjustment = 0.5 * dollar_convexity * 100 ** 2 * 0.01 ** 2 print("Convexity Adjustment: ", convexity_adjustment)
Convexity Adjustment:  0.35
用 Python 进行债券定价与分析

结合久期与凸性

  • 仅用久期预测价格变动:

$ \text{Price Change} = -100 \times \text{Dollar Duration} \times \Delta y$

  • 同时用久期与凸性预测价格变动:

$ \text{Price Change} = -100 \times \text{Dollar Duration} \times \Delta y \ + \ \text{Convexity Adjustment}$

$ = -100 \times \text{Dollar Duration} \times \Delta y \ + \ 0.5 \times \text{Dollar Convexity} \times 100^2 \times (\Delta y)^2$

  • 结合久期与凸性可提升价格估计
用 Python 进行债券定价与分析

久期与凸性示例

  • 10年期债券,3%票息,5%到期收益率,面值USD 100:
price = -npf.pv(rate=0.05, nper=10, pmt=3, fv=100)
price_up = -npf.pv(rate=0.06, nper=10, pmt=3, fv=100)
price_down = -npf.pv(rate=0.04, nper=10, pmt=3, fv=100)
duration = (price_down - price_up) / (2 * price * 0.01)
dollar_duration = duration * price * 0.01
convexity = (price_down + price_up - 2 * price) / (price * 0.01 ** 2)
dollar_convexity = convexity * price * 0.01
convexity_adjustment = dollar_convexity * 100 ** 2 * 0.01 ** 2
combined_prediction = -100 * dollar_duration * 0.01 + convexity_adjustment
print("Predicted Price Change: ", combined_prediction)
Predicted Price Change:  -6.64
用 Python 进行债券定价与分析

Passons à la pratique !

用 Python 进行债券定价与分析

Preparing Video For Download...