21using QuantLib::Calendar;
23using QuantLib::DayCounter;
24using QuantLib::DiscountFactor;
25using QuantLib::Handle;
26using QuantLib::Natural;
28using QuantLib::YieldTermStructure;
33 const Handle<YieldTermStructure>& numCurve,
34 const Handle<YieldTermStructure>& denCurve)
35 : baseCurve_(baseCurve), numCurve_(numCurve), denCurve_(denCurve) {
41 enableExtrapolation(
true);
61 YieldTermStructure::update();
69 QL_REQUIRE(!
baseCurve_.empty(),
"DiscountRatioModifiedCurve: base curve should not be empty");
70 QL_REQUIRE(!
numCurve_.empty(),
"DiscountRatioModifiedCurve: numerator curve should not be empty");
71 QL_REQUIRE(!
denCurve_.empty(),
"DiscountRatioModifiedCurve: denominator curve should not be empty");
QuantLib::Calendar calendar() const override
Returns the calendar from the base curve.
void check() const
Check that none of the underlying term structures are empty.
QuantLib::Handle< YieldTermStructure > numCurve_
const QuantLib::Date & referenceDate() const override
Returns the reference date from the base curve.
QuantLib::Natural settlementDays() const override
Returns the settlement days from the base curve.
QuantLib::DayCounter dayCounter() const override
Returns the day counter from the base curve.
DiscountRatioModifiedCurve(const QuantLib::Handle< QuantLib::YieldTermStructure > &baseCurve, const QuantLib::Handle< QuantLib::YieldTermStructure > &numCurve, const QuantLib::Handle< QuantLib::YieldTermStructure > &denCurve)
Constructor providing the three underlying yield curves.
QuantLib::Handle< YieldTermStructure > baseCurve_
QuantLib::DiscountFactor discountImpl(QuantLib::Time t) const override
Perform the discount factor calculation using the three yield curves.
QuantLib::Handle< YieldTermStructure > denCurve_
discount curve modified by the ratio of two other discount curves