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 |
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 |
Free forum by Nabble | Edit this page |