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.