建構收益率曲線 Yield Curve (1) 工作日調整 Business Day Convention - 用 Python 和 QuantLib

建構收益率曲線 Yield Curve -- 工作日調整 Business Day Convention - 用 Python 和 QuantLib


建構收益率曲線是 IRS 估值課程的第一部份, 把它獨立出來成為單獨的一篇. 收益率曲線是利率產品估值最重要的工具, 在此我不多做介紹基礎知識, 有興趣可以網上搜一下相關信息.

我們來逐步建立收益率曲線. 分別是

  1. 工作日 Business Day Convention
  2. 天數計算 Day Count Convention
  3. 市場利率 Market Rate
  4. 插值方法 Interpolation/Extrapolation
  5. 零息利率 Zero Rate
  6. 折現因子 Discount Factor
  7. 遠期利率 Forward Rate

最後我們要計算三個月的遠期利率來供 IRS 估值使用. 我們從 Business Day Convention 開始吧

什麼是 Business Day Convention

利率產品會定期有現金流量在買賣雙方支付, 例如約定每個月或每三個月付一次, 但有可會發生預定付款的日期是周末或假日. 假日銀行不上班是沒辦法付款的, 所以在預定付款日不是工作日的話, 就需要做一些調整.

舉例來說, 約定好在未來一年內的每月一日付款, 而其中有幾個月的一日是周六或周日, 也有放假日, 這時候必須把這些月份的付款日往前或往後調整. 調整的方式就是 Business Day Convention.

這些調整適用於所有利率產品的付款日期, 不只是 IRS, 對所有利率類產品都很重要.

Business Day Convention 在 QuantLib 和 FpML 的定義

QuantLib 和 FpML 都有定義一些工作日調整的方法, 可以參考 QuantLib參考文件 和 FpML Schema 裡的 fpml-enum.xsd. 以下是這兩個定義的說明:

QuantLib Code QuantLib 說明 FpML Code FpML 說明
Following Choose the first business day after the given holiday FOLLOWING The non-business date will be adjusted to the first following day that is a business day
ModifiedFollowing Choose the first business day after the given holiday unless it belongs to a different month, in which case choose the first business day before the holiday. MODFOLLOWING The non-business date will be adjusted to the first following day that is a business day unless that day falls in the next calendar month, in which case that date will be the first preceding day that is a business day
Preceding Choose the first business day before the given holiday. PRECEDING The non-business day will be adjusted to the first preceding day that is a business day.
ModifiedPreceding Choose the first business day before
  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值