Login  Register

Passing on a discount curve without interpolating

Posted by teejayu on Oct 21, 2015; 8:54pm
URL: http://quantlib.414.s1.nabble.com/Passing-on-a-discount-curve-without-interpolating-tp16956.html

Hi All,

I have question regarding the YieldTermStructure instance in QuantLib. Basically, I would like to  construct a YieldTermStructure instance by feeding in a vector of discount factors and corresponding dates. What is the simplest way to do that?

Currently I am doing is by constructing an InterpolatedDiscountCurve but that has to come with interpolation, and since my inputs are already daily discount factors I would like to avoid this step and thus save some calculation.

The code looks like this:
boost::shared_ptr<YieldTermStructure> discountingCrv(new InterpolatedDiscountCurve<Linear>(dates, discounts, Actual365Fixed()));

where dates and discounts are vector of type Date and DiscountFactors respectively.

Thank you,
Teejayu