Building SOFR Floating-Rate Bonds with QuantLib Overnight Coupons
Summary
The document concerns modeling a floating-rate bond tied to SOFR in QuantLib. The question describes difficulties adapting a workflow used for Ibor indices, since SOFR coupons involve overnight fixings compounded over a period and fixing conventions that differ from Ibor. The answer says that QuantLib’s support has advanced and points to using OvernightLeg to construct the coupons, then using those coupons to build the bond. It notes support for conventions such as lockout and lookback periods.
This is a concise implementation pointer rather than a full worked example. It does not specify coupon schedules, calendars, day-count conventions, curve construction, or pricing steps, and the available features may depend on the QuantLib version. Users would need to check the library documentation for their setup and confirm that the chosen overnight coupon conventions match the bond terms.
Key ideas
- SOFR floating-rate coupons use overnight fixings compounded over a period.
- QuantLib provides OvernightLeg as a way to construct overnight-rate coupons for a bond.
- The cited answer notes support for lockout and lookback conventions.
- The document does not provide a complete bond-construction or pricing example.
Tags
Full text
# Does Quantlib FloatingRateBond support SOFR index? # Does Quantlib FloatingRateBond support SOFR index? I am trying to use Quantlib to price FloatingRateBond, Thanks to some other posts on the stack I managed to do it for Ibor indexes. I tried to use the SOFR, but I didn't succeed, I couldn't get around the SOFR being fixed at the end of the period as opposed to Ibor, as well as the compounding of the fixing. Is there a way to build a FloatingRateBond based on SOFR in QuantLib? ## Answer by Luigi Ballabio (score 2) https://quant.stackexchange.com/a/83987 QuantLib has made some progress since you posted the question — you can use `OvernightLeg` to build the coupons (it now supports lockout period, lookback period etc) and use them to create the bond. See https://www.quantlibguide.com/Vanilla%20bonds.html#floating-rate-bonds-on-risk-free-rates.
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.