Skip to main content
1 of 2
Sithered
  • 808
  • 1
  • 11
  • 20

Bootstrap yield curve with QLNet / Quantlib

I am trying to grasp QLNet (C# version of Quantlib, all the functions of Quantlib have the same name and work the same way), especially for pricing bonds. So I dug into the official examples, downloaded in the same time than the QLNet dll. The example called "Bonds" prices three bond types : zero coupon, fixed coupon rate, and floating coupon rate.

For the two last types, this example use two different yield curve :

  • The first one called discountingTermStructure for the fixed rate bond, made up of zero coupon bonds for the short end and of bonds (I'm not sure here what these simple bonds are) for the long end
  • The second one called forecastingTermStructure for the floating rate bond, made up of deposit for the short end and of swaps for the long end

My first question is why do they use different yield curve?

I am also trying to return a yield from a bootstrapped yield curve. For example, if I build the yield curve with 3 ZC bonds of 3 months, 6 months and 1 year maturities, I want to get the interpolated yield at 9 months. How could I do that?

Many thanks for your help

Sithered
  • 808
  • 1
  • 11
  • 20