25#include <ql/math/comparison.hpp>
26#include <ql/termstructures/credit/survivalprobabilitystructure.hpp>
33 const Handle<DefaultProbabilityTermStructure>& c2,
const Real alpha)
38 Date
maxDate()
const override {
return std::min(
c1_->maxDate(),
c2_->maxDate()); }
39 Time
maxTime()
const override {
return std::min(
c1_->maxTime(),
c2_->maxTime()); }
41 Calendar
calendar()
const override {
return c1_->calendar(); }
44 return std::pow(
c1_->survivalProbability(t),
alpha_) * std::pow(
c2_->survivalProbability(t), 1.0 -
alpha_);
48 Handle<DefaultProbabilityTermStructure>
c1_,
c2_;
Calendar calendar() const override
Handle< DefaultProbabilityTermStructure > c1_
TermInterpolatedDefaultCurve(const Handle< DefaultProbabilityTermStructure > &c1, const Handle< DefaultProbabilityTermStructure > &c2, const Real alpha)
const Date & referenceDate() const override
Handle< DefaultProbabilityTermStructure > c2_
Probability survivalProbabilityImpl(Time t) const override
Natural settlementDays() const override
Date maxDate() const override
Time maxTime() const override