|
From: Luigi B. <lui...@gm...> - 2011-12-15 12:27:45
|
On Wed, Nov 23, 2011 at 12:11 AM, barba dos <bar...@ho...> wrote:
> Hi all, I am looking in the file cashflows.cpp. the piece of code is the
> ZSpreadFinder constructor.
>
> It is about the piece of code that says:
> curve_(Handle<YieldTermStructure>(discountCurve)
> For the discount curve that is being used, extrapolation is enabled [...] However [...]
> the extrapolation property is not copied correctly.
Ok, I see. The above is not all; the complete call is
curve_(Handle<YieldTermStructure>(discountCurve),
Handle<Quote>(zSpread_), comp, freq, dc),
curve_ is not a copy of discountCurve, it is a spreaded curve that
contains discountCurve.
The extrapolation property of curve_ is never set, so it defaults to
false. Try adding
curve_->enableExtrapolation(discountCurve->allowsExtrapolation());
and see if that works for you.
Later,
Luigi
|