Dual-Curve Bootstrapping with Separate Discount and Forecast Curves
Summary
The answer explains how to bootstrap a forecasting curve separately from an overnight-indexed discount curve in QuantLib. In the example, an OIS curve is built first for discounting, while a LIBOR curve is bootstrapped for forecasting. Swap-rate helpers for the forecasting curve must receive the previously built discount curve so that each curve serves its distinct purpose.
The response contrasts this setup with a single-curve helper, which uses the curve being built for both forecasting and discounting. It also notes that extra placeholder arguments are required in the Python interface because the SWIG wrapper does not support keyword arguments for this constructor. The discussion provides the construction principle, but not a complete worked example or details for a particular market’s instruments, conventions, or subsequent rate queries.
Key ideas
- Build the OIS discount curve before bootstrapping the LIBOR forecasting curve.
- Pass the discount curve into the swap-rate helpers used for the forecasting curve.
- The forecasting curve then supplies projections while the OIS curve discounts cash flows.
- QuantLib’s Python wrapper requires positional placeholder arguments for this helper setup.
Tags
Full text
# Quantlib python dual curve bootstrapping example
# Quantlib python dual curve bootstrapping example
Apologies if this has been asked in the forum (I couldn't find any examples)- Can someone please point me to a worked example in python using Quantlib for dual curve bootstrapping (using EONIA for discounting and EUR 3M Libor as forecasting).
Also using the bootstrapped curve, I would then call the fair swaprate / forwardRate() / zeroRate() etc.
If someone can point me to some examples, that would be great. I have looked at : QuantLib Python Swap Yield Curve Bootstrapping Dates and Maturities
However, not too sure how to use this OIS bootstrapped curve into my forecasting curve bootstrapping
Thanks, Sumit
## Answer by Luigi Ballabio (score 10, accepted)
https://quant.stackexchange.com/a/32363
I reproduce the Ametrano-Bianchetti paper on dual-curve bootstrapping in Python with QuantLib in a chapter of the QuantLib Python Cookbook. (Note: I'm not sure what the etiquette is about plugging one's own for-sale book. Moderators, please let me know if that's out of line.) That includes both OIS and LIBOR bootstrapping with different tenors, and it's way too long to describe here.
However, the gist of it is that the swap-rate helpers used to bootstrap the LIBOR curve can take a discount curve to use. In the old single-curve examples, a `SwapRateHelper` instance would be created as
```
helper = SwapRateHelper(quoted_rate, tenor, calendar,
fixedLegFrequency, fixedLegAdjustment,
fixedLegDayCounter, Euribor6M())
```
and use the curve being bootstrapped for both forecast and discounting. To use dual-curve bootstrapping, instead, you'll have to build it as
```
helper = SwapRateHelper(quoted_rate, tenor, calendar,
fixedLegFrequency, fixedLegAdjustment,
fixedLegDayCounter, Euribor6M(),
QuoteHandle(), Period(0,Days),
discountCurve)
```
In the above, the additional `QuoteHandle()` and `Period(0,Days)` arguments are, unfortunately, needed because the SWIG wrappers don't support keyword arguments for this constructor; and the `discountCurve` argument would be a handle to the OIS curve that you bootstrapped previously. When the swap-rate helpers are instantiated as above, they will use the LIBOR curve being bootstrapped for forecast and the OIS curve for discounting.Shown 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.