Re: enableExtrapolation error?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Re: enableExtrapolation error?

Luigi Ballabio
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. This I
> can confirm by hoovering over discountCurve which tells me:
>
> QuantLib::TermStructure -->>> QuantLib::Extrapolator -->>> { extrapolate_ =
> true }
>
> However, after this has been assigned to the private member curve_ , and I
> hoover over curve_ it shows:
>
> QuantLib::ZeroYieldStructure -->>> QuantLib::YieldTermStructure -->>>
> QuantLib::TermStructure -->>> QuantLib::Extrapolator -->>> { extrapolate_ =
> false }
>
>
> So basically the extrpolation property is not copied correctly.

That's strange.  The curve is not copied at all; assigning to curve_
just copies a pointer, so the two inner TermStructure objects should
be not only identical, but actually the same.  May you try calling the
allowsExtrapolation() method and seeing what it returns, instead of
just hovering over the variable?

Luigi

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure
contains a definitive record of customers, application performance,
security threats, fraudulent activity, and more. Splunk takes this
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev