|
From: Luigi B. <lui...@gm...> - 2005-03-04 09:50:33
|
On 03/04/05 10:39:01, Adjriou Belak wrote:
> there is a problem when I want to extrapolate a yield at one date which =20
> is not in the spreaded curve. The problem comes from :
>=20
> inline Rate ZeroSpreadedTermStructure::zeroYieldImpl(Time t) const {
> // return originalCurve_->zeroYield(t, true) + spread_->value();
> return originalCurve_->zeroRate(t, Continuous, NoFrequency) +
> spread_->value();
> }
>=20
> It should be used with a boolean extrapolate :
>=20
> return originalCurve_->zeroRate(t, Continuous,
> NoFrequency,extrapolate) +
> spread_->value();
>=20
> It's missing a parameter in the zeroYieldImpl function.
zeroYieldImpl is not missing a parameter as such: that method is called =20
internally, and by the time it is called the extrapolation check has been =20
performed already.
But your bug report is correct: we have to add a 'true' to the call to =20
zeroRate. I'll fix it in CVS presently.
Thanks,
Luigi
----------------------------------------
I have yet to see any problem, however complicated, which, when you
looked at it in the right way, did not become still more complicated.
-- Poul Anderson=20
|