Yield curve bootstrapping
Posted by mihai.bunea on
URL: http://quantlib.414.s1.nabble.com/Yield-curve-bootstrapping-tp5711.html
Could someone please explain the algorithm behind bootstrapping of a yield curve from deposit rates?
I have an example of a yield curve consisting of 2 legs with the following maturities and rates:
1) maturity: 1 year, rate: 10% per year.
2) maturity: 2 years, rate: 20% per year.
How is the zero-rate computed for the second leg?
Legs use simple compounding for interest rate, so the time value of money is F = S (1 + r * t).
F = future sum of money
S = spot (current) sum of money
r = yearly interest rate
t = time, in years
For the first leg: 1$ now becomes 1.1$ in one year. The zero-rate equation is: 1 * e^(r1 * 1) = 1.1, therefore r1 = Ln(1.1) = 0.0953102, which is precisely what Quantlib computes.
For the second leg however, my assumptions on the calculation no longer hold. 1$ becomes (1 + 0.2 * 2) = 1.4$ in 2 years.
The zero-rate equation would be 1 * e^(r2 * 2) = 1.4, so r2 = Ln(1.4) / 2 = 0.168236. Quantlib computes something close, 0.167967 but definitely not exactly the same thing.
Somehow the 1'st leg enters the zero-rate equation of the 2'nd leg, but couldn't find out a documentation on how it's done.