|
From: Ferdinando A. <fer...@am...> - 2002-04-25 09:31:14
|
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 |