Posted by
Luigi Ballabio on
Dec 20, 2011; 5:31pm
URL: http://quantlib.414.s1.nabble.com/Re-enableExtrapolation-error-tp12468p12469.html
Ok, I've made the change on the 1.2 branch.
Thanks for the heads-up.
Luigi
On Thu, Dec 15, 2011 at 1:27 PM, Luigi Ballabio
<
[hidden email]> wrote:
> 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
------------------------------------------------------------------------------
Write once. Port to many.
Get the SDK and tools to simplify cross-platform app development. Create
new or port existing apps to sell to consumers worldwide. Explore the
Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
http://p.sf.net/sfu/intel-appdev_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev