Skip to content
All library documents

Adding Missing Floating-Rate Bond Fixings in QuantLib

Article Quant Q&A · Author: Lisa Ann

Summary

The document explains how to supply a missing historical fixing when pricing floating-rate bonds in QuantLibXL. Its proposed workflow starts from a bond’s previous cash-flow date, converts that date to the relevant index fixing date, then adds a default rate for that fixing. The steps can be repeated for bonds that use the same Ibor index.

The author reports that the approach worked in a spreadsheet example across several evaluation dates advanced with the TARGET calendar, including dates months into the future. This is a practical software workflow rather than a general pricing analysis. The suggested rate is only a plausible placeholder, so it should not be mistaken for an observed historical fixing; the document also does not provide a C++ implementation or discuss cases with differing index conventions.

Key ideas

  • A floating-rate bond may need a prior index fixing to calculate its coupon and price.
  • Use the bond’s previous cash-flow date to determine the corresponding index fixing date.
  • Add the fixing through QuantLibXL and repeat as needed for bonds sharing an index.
  • The example reports successful pricing across multiple evaluation dates, but uses a placeholder rate.

Tags

Full text
# Automatic fixing of missing floating rate in QuantLib's addFixing()


# Automatic fixing of missing floating rate in QuantLib's addFixing()












Due to the periodic fixing of floating rate bonds's coupon rates, in order to calculate the bond clean price one must tell the pricing engine to account for previous LIBOR rate fixing.

If I am right (I'm a very QuantLib noob), here is an example of how it works: in the `BONDS TO BE PRICED` chapter you can see

```
...
libor3m->addFixing(Date(17, July, 2008),0.0278625);
...
```

which says that the last fixing date was on 17 July 2008 and the rate fixed by the central bank was equal to $2.79\%$ on annual basis.

Now let you are using QuantLibXL's qlIndexAddFixings() to practically make the same of the `C++` code (the fixing will then be used as trigger in qlBondSetCouponPricer()) but you're playing with the evaluation date and a dozen of bonds: in this case you cannot specify the fixings by hand, neither you need a true past value but just something which sounds likely.

How can I make the fixing of every bond to be equal to a default value whatever the bond and the evaluation date without setting it by hand?

It would be possibly sufficient a way to extract the required last fixing date from a `FloatingRateBond` object.

## Answer by Lisa Ann (score 4, accepted)

https://quant.stackexchange.com/a/8949

I think to have the answer:

- use qlBondPreviousCashFlowDate() pointing at your `FloatingRateBond` object to get the last date of payment;

- use qlInterestRateIndexFixingDate() to get the fixing date referring to the last payment date;

- use qlIndexAddFixings() to add a fixing rate to the fixing date you got above;

- repeat for each one of your bonds if they share the same `IborIndex`.

So far I've tried this proceedings using several evaluation dates amended through qlCalendarAdvance() (TARGET calendar) just with the `Bonds.xls` spreadsheet, but spacing from 2M to 12M in the future doesn't give any issue and the pricing engine has always been able to find a price for the floating rate bond of the example.

P.S.: if someone familiar with the `C++` version wanted to explain the proceedings in that language, I'm sure it would be really appreciated.

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.