Custom OIS Dates and Payment Lag in QuantLib
Summary
The document asks how to create an overnight indexed swap with a specified maturity date while retaining a payment lag in QuantLib. It contrasts a convenience builder that accepts a tenor and payment-lag setting with direct construction of the swap, which allows more control over dates but raises the question of how to set the lag.
The answer recommends building a Schedule to customize the swap dates and then passing it to OvernightIndexedSwap. It notes that the swap constructor accepts a payment-lag argument and that the argument is exposed in the Python interface. This is a concise API usage pointer rather than a worked example: it does not show the constructor call, specify all schedule conventions, or discuss how date choices affect valuation.
Key ideas
- A Schedule can be used to define custom dates for an overnight indexed swap.
- The OvernightIndexedSwap constructor accepts a payment lag.
- The payment-lag parameter is available through QuantLib’s Python bindings.
- The exchange does not provide a complete construction example or valuation discussion.
Tags
Full text
# PaymentLag in ql.OvernightIndexedSwap()
# PaymentLag in ql.OvernightIndexedSwap()
How do I use maturity date of an ois instead of its tenor, I am using the following QuantLib function:
ois = ql.MakeOIS(ql.Period('3Y'), index, 0.1, nominal=1000000, settlementDays=0, effectiveDate=ql.Date(28,6,2024), paymentLag=2, paymentAdjustmentConvention=ql.ModifiedFollowing)
Using the following function takes away the ability of paymentLag:
ql.OvernightIndexedSwap()
## Answer by user35980 (score 1)
https://quant.stackexchange.com/a/83812
u can use the `Schedule` class together with `OvernightIndexedSwap` to customize the dates of your OIS.
and u can specify a payment lag (it's the eight argument), see: https://www.quantlib.org/reference/class_quant_lib_1_1_overnight_indexed_swap.html
and it's exported to python, see: https://github.com/lballabio/QuantLib-SWIG/blob/master/SWIG/swap.iShown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.