|
From: barba d. <bar...@ho...> - 2011-11-22 23:11:06
|
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. My question: is this a bug or is there a reason for this? If this is on purpose, what would you suggest to turn on extrapolation for the z-spread solver? Thanks,Barbados. |