Re: Yield curve bootstrapping

Posted by mihai.bunea on
URL: http://quantlib.414.s1.nabble.com/Yield-curve-bootstrapping-tp5711p5713.html

Hello Luigi,

thanks for answering.

Looking over the code again helped and i found the problem: 2012 is a leap year.
I used 1-Mar-2011 as reference date, Unadjusted business day convention and Actual365Fixed day counter. Then added 365 days, respectively 2 * 365 days to obtain maturities of 1, respective 2 years.

The problem is the calendar-based year fraction is not exactly 1 or 2 in this case.
When i replaced the reference date with 1-Mar-2012 (after the leap day of 29-Feb-2012), it worked by the book.

That is, 1y tenor with 10% rate => 1$ after 1y -> 1.1$ => discount =~ 0.909091
           2y tenor with 20% rate => 1$ after 1y -> 1.4$ => discount =~ 0.714286