Posted by
Ferdinando M. Ametrano-2 on
Jun 20, 2002; 6:55am
URL: http://quantlib.414.s1.nabble.com/swaps-tp2084p2088.html
At 10:48 AM 6/20/2002 +0200, Ilja Chagalov wrote:
>If you try to compute zero yields with the constant 4% term structure in the
>Jens's example (TermStructure is fed with four DepositRateHelpers: 1w, 1y,
>5y, 10y and the
>rate is set to 4% everywhere) ...
>[...]
>... you get the following results:
>
>zeroYield(1) =3.9755%
>zeroYield(2) =3.7999%
>zeroYield(3) =3.7413%
>zeroYield(4) =3.7121%
>zeroYield(5) =3.6945%
>zeroYield(6) =3.5983%
>zeroYield(7) =3.5296%
>zeroYield(8) =3.4781%
>zeroYield(9) =3.4380%
>
>I get similar results using act/365 day counter.
>In my understanding it should be appr. =4% everywhere, but it looks
>different.
>Why is it so? Why is the zero yield going down as t inscreases?
the zero curve is decreasing since depo rates are simple compounding while
zero rate in QuantLib are continuously compounded.
I attach here a simple Excel spreadsheet with the following calculation:
A B C D E
-------------------------------------------------------------------
time act/365 depo rate discount=1/(1+C*B) zero=LN(1/D)/B
1w 0.019 4% 0.999233465 4.00%
1y 1.000 4% 0.961538462 3.92%
5y 5.000 4% 0.833333333 3.65%
10y 10.000 4% 0.714285714 3.36%
The residual difference with the QuantLib output is because my simple
example doesn't take into account the correct (act/360) deposit daycount.
That is the time used in column D should be different (act/360) from the
time used in column E (act/365)
QuantLib::TermStructure::PiecewiseFlatForward does "interpolate" on the 4
discounts bootstrapped from the 4 deposit rates using constant
_continuously_compounded_ forward rates.
Namely:
0-1w 4.00%
1w-1y 3.92%
1y-5y 3.58%
5y-10y 3.08%
The conclusion is that 4% flat deposit rate doesn't mean flat zero/forward,
as long as the zero/forward use a different compounding rule. Besides a
flat forward curve doesn't provide a flat swap (par rate) curve
Market convention are a mess, I know, but this is not QuantLib fault ;-)
hope this helps
ciao -- Nando
PS It's sometime now I'm thinking about posting a short review of "Capital
Market Instruments: Analysis and Valuation"
by Moorad Choudhry, Didier Joannas, Richard Pereira, Rod Pienaar.
I think it is a great introductory book for someone approaching the
complexity of financial market with a strong math background, that is
someone who doesn't really need an introduction to finite difference or
stochastic processes as much as he needs an introduction to market
conventions, products, etc.