|
From: Plamen N. <Pla...@re...> - 2005-07-28 11:12:51
|
Hi all,
I'm using the PiecewiseFlatForward and accounted some strange behaviour the=
re=20
=2D I think it is just because the PiecewiseYieldCurve class had not=20
overwritten the DiscountFactor discountImpl(Time) const method and therefor=
e=20
the calculate() method of the LazyObject (resp. the=20
PiecewiseYieldCurve<C,I>::performCalculations() method) got never called.
I've added the following implementation in the PiecewiseYieldCurve and it=20
solved my problem:
template <class C, class I>
inline DiscountFactor PiecewiseYieldCurve<C,I>::discountImpl(Time t) const {
calculate();
return base_curve::discountImpl(t);
}
Am I seeing this correct or is there something other going wrong?
cheers
Plamen
|