Posted by
Luigi Ballabio on
Dec 15, 2011; 12:27pm
URL: http://quantlib.414.s1.nabble.com/Re-enableExtrapolation-error-tp12468.html
On Wed, Nov 23, 2011 at 12:11 AM, barba dos <
[hidden email]> 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
------------------------------------------------------------------------------
10 Tips for Better Server Consolidation
Server virtualization is being driven by many needs.
But none more important than the need to reduce IT complexity
while improving strategic productivity. Learn More!
http://www.accelacomm.com/jaw/sdnl/114/51507609/_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev