Login  Register

Re: DiscountCurve

Posted by Ferdinando M. Ametrano-2 on Apr 25, 2002; 3:32am
URL: http://quantlib.414.s1.nabble.com/DiscountCurve-tp10053p10057.html

Hi all

At 09:23 PM 4/24/2002 +0200, Luigi wrote:
>>In TermStructure zero and forward rates are assumed to be continuous
>>compounded rates: this is probably an error we did in the original
>>design, but unless we fix it everywhere this is the way to go.
>I agree that the short-time goal is consistency with the present design.
>However, "everywhere" is just PiecewiseFlatForward and the formulas in
>DiscountCurve and such.
It's more deeper than that. Continuos compounding for zero and
instantaneous forward rates is assumed in:
ZeroYieldStructure::discountImpl
ZeroYieldStructure::forwardImpl
DiscountStructure::zeroYieldImpl
DiscountStructure::forwardImpl
ForwardRateStructure::discountImpl
ForwardRateStructure::zeroYieldImpl

[btw: I think I spotted a bug in ZeroYieldStructure::forwardImpl: shouldn't
'r1+t*(r2-r1)/dt' be 'r2+t*(r2-r1)/dt'?  ]

Also should we agree that discrete forwards must have the same compounding
rule as zeros (see my post to quantlib-users), then tmy proposed
implementation for TermStructure::forward(Date, Date) assumes continuos
compounding too

ciao -- Nando