0
$\begingroup$

I have created a piecewise linear zero curve using quantlib (c++). It's a NACA, modifiedFollowing swap curve. When I extract the zero rates on the pillar dates the rates line up with what is expected but when I call zero rates in between I get a slightly different linear interpolated rate to what I'm expecting. The discount factors are also different but I read quantlib uses NACC. My question is why are the zero rates different, and for the discount rates which method would I override to use annual compounding for the discount factors? Thanks.

To get a zero rate between pillar dates (benchmark instrument dates) linear interpolation should be used. Using Excel to do this manually I get a different zero rate to quantlib (not far out but starts to differ after the 5th decimal place which has an impact on swap pricing). So either the time period to the interpolated point should be different or quantlib isn't using linear interpolation.

$\endgroup$
1
  • 1
    $\begingroup$ Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. $\endgroup$
    – Community Bot
    Commented Feb 20, 2023 at 15:21

1 Answer 1

2
$\begingroup$

Found the answer eventually by manual calculation.

Even if the zero curve is an annual 365F compounded curve, Quantlib works in continuous terms. Therefore the dates between the pillar dates use linear interpolation on continuous zero rates and not compounded zero rates. It does calculate the implied compounded zero rate but in a number of steps:

  1. Linear interpolate on continuous zeros
  2. Calculate the discount factor (continuous i.e. exp(-rt))
  3. Pass compound value (1/df) to implied rate method which converts to annual 365F compounded.

It gives a slightly different answer to when you work with compound zeros only.

$\endgroup$
1
  • $\begingroup$ Nothing like tedious manual calculations to really understand how computations work $\endgroup$
    – nbbo2
    Commented Mar 27, 2023 at 18:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.