Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
TermInterpolatedDefaultCurve Class Reference

#include <qle/termstructures/terminterpolateddefaultcurve.hpp>

+ Inheritance diagram for TermInterpolatedDefaultCurve:
+ Collaboration diagram for TermInterpolatedDefaultCurve:

Public Member Functions

 TermInterpolatedDefaultCurve (const Handle< DefaultProbabilityTermStructure > &c1, const Handle< DefaultProbabilityTermStructure > &c2, const Real alpha)
 
Date maxDate () const override
 
Time maxTime () const override
 
const Date & referenceDate () const override
 
Calendar calendar () const override
 
Natural settlementDays () const override
 
Probability survivalProbabilityImpl (Time t) const override
 

Private Attributes

Handle< DefaultProbabilityTermStructure > c1_
 
Handle< DefaultProbabilityTermStructure > c2_
 
Real alpha_
 

Detailed Description

Definition at line 30 of file terminterpolateddefaultcurve.hpp.

Constructor & Destructor Documentation

◆ TermInterpolatedDefaultCurve()

TermInterpolatedDefaultCurve ( const Handle< DefaultProbabilityTermStructure > &  c1,
const Handle< DefaultProbabilityTermStructure > &  c2,
const Real  alpha 
)

Definition at line 32 of file terminterpolateddefaultcurve.hpp.

34 : SurvivalProbabilityStructure(c1->dayCounter()), c1_(c1), c2_(c2), alpha_(alpha) {
35 registerWith(c1_);
36 registerWith(c2_);
37 }
Handle< DefaultProbabilityTermStructure > c1_
Handle< DefaultProbabilityTermStructure > c2_

Member Function Documentation

◆ maxDate()

Date maxDate ( ) const
override

Definition at line 38 of file terminterpolateddefaultcurve.hpp.

38{ return std::min(c1_->maxDate(), c2_->maxDate()); }

◆ maxTime()

Time maxTime ( ) const
override

Definition at line 39 of file terminterpolateddefaultcurve.hpp.

39{ return std::min(c1_->maxTime(), c2_->maxTime()); }

◆ referenceDate()

const Date & referenceDate ( ) const
override

Definition at line 40 of file terminterpolateddefaultcurve.hpp.

40{ return c1_->referenceDate(); }

◆ calendar()

Calendar calendar ( ) const
override

Definition at line 41 of file terminterpolateddefaultcurve.hpp.

41{ return c1_->calendar(); }

◆ settlementDays()

Natural settlementDays ( ) const
override

Definition at line 42 of file terminterpolateddefaultcurve.hpp.

42{ return c1_->settlementDays(); }

◆ survivalProbabilityImpl()

Probability survivalProbabilityImpl ( Time  t) const
override

Definition at line 43 of file terminterpolateddefaultcurve.hpp.

43 {
44 return std::pow(c1_->survivalProbability(t), alpha_) * std::pow(c2_->survivalProbability(t), 1.0 - alpha_);
45 }

Member Data Documentation

◆ c1_

Handle<DefaultProbabilityTermStructure> c1_
private

Definition at line 48 of file terminterpolateddefaultcurve.hpp.

◆ c2_

Handle<DefaultProbabilityTermStructure> c2_
private

Definition at line 48 of file terminterpolateddefaultcurve.hpp.

◆ alpha_

Real alpha_
private

Definition at line 49 of file terminterpolateddefaultcurve.hpp.