Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
Public Member Functions | List of all members
InterpolatedSurvivalProbabilityCurve< Interpolator > Class Template Reference

DefaultProbabilityTermStructure based on interpolation of survival probabilities. More...

#include <qle/termstructures/interpolatedsurvivalprobabilitycurve.hpp>

+ Inheritance diagram for InterpolatedSurvivalProbabilityCurve< Interpolator >:
+ Collaboration diagram for InterpolatedSurvivalProbabilityCurve< Interpolator >:

Public Member Functions

 InterpolatedSurvivalProbabilityCurve (const std::vector< Date > &dates, const std::vector< Probability > &probabilities, const DayCounter &dayCounter, const Calendar &calendar=Calendar(), const std::vector< Handle< Quote > > &jumps=std::vector< Handle< Quote > >(), const std::vector< Date > &jumpDates=std::vector< Date >(), const Interpolator &interpolator=Interpolator(), const bool allowNegativeRates=false)
 
TermStructure interface
Date maxDate () const override
 

DefaultProbabilityTermStructure implementation

std::vector< Date > dates_
 
bool allowNegativeRates_
 
Probability survivalProbabilityImpl (Time) const override
 
Real defaultDensityImpl (Time) const override
 

other inspectors

const std::vector< Time > & times () const
 
const std::vector< Date > & dates () const
 
const std::vector< Real > & data () const
 
const std::vector< Probability > & survivalProbabilities () const
 
std::vector< std::pair< Date, Real > > nodes () const
 
 InterpolatedSurvivalProbabilityCurve (const DayCounter &, const std::vector< Handle< Quote > > &jumps=std::vector< Handle< Quote > >(), const std::vector< Date > &jumpDates=std::vector< Date >(), const Interpolator &interpolator=Interpolator(), const bool allowNegativeRates=false)
 
 InterpolatedSurvivalProbabilityCurve (const Date &referenceDate, const DayCounter &, const std::vector< Handle< Quote > > &jumps=std::vector< Handle< Quote > >(), const std::vector< Date > &jumpDates=std::vector< Date >(), const Interpolator &interpolator=Interpolator(), const bool allowNegativeRates=false)
 
 InterpolatedSurvivalProbabilityCurve (Natural settlementDays, const Calendar &, const DayCounter &, const std::vector< Handle< Quote > > &jumps=std::vector< Handle< Quote > >(), const std::vector< Date > &jumpDates=std::vector< Date >(), const Interpolator &interpolator=Interpolator(), const bool allowNegativeRates=false)
 

Detailed Description

template<class Interpolator>
class QuantExt::InterpolatedSurvivalProbabilityCurve< Interpolator >

DefaultProbabilityTermStructure based on interpolation of survival probabilities.

Definition at line 54 of file interpolatedsurvivalprobabilitycurve.hpp.

Constructor & Destructor Documentation

◆ InterpolatedSurvivalProbabilityCurve() [1/4]

InterpolatedSurvivalProbabilityCurve ( const std::vector< Date > &  dates,
const std::vector< Probability > &  probabilities,
const DayCounter &  dayCounter,
const Calendar &  calendar = Calendar(),
const std::vector< Handle< Quote > > &  jumps = std::vector< Handle< Quote > >(),
const std::vector< Date > &  jumpDates = std::vector< Date >(),
const Interpolator &  interpolator = Interpolator(),
const bool  allowNegativeRates = false 
)

◆ InterpolatedSurvivalProbabilityCurve() [2/4]

InterpolatedSurvivalProbabilityCurve ( const DayCounter &  ,
const std::vector< Handle< Quote > > &  jumps = std::vector< Handle< Quote > >(),
const std::vector< Date > &  jumpDates = std::vector< Date >(),
const Interpolator &  interpolator = Interpolator(),
const bool  allowNegativeRates = false 
)
protected

◆ InterpolatedSurvivalProbabilityCurve() [3/4]

InterpolatedSurvivalProbabilityCurve ( const Date &  referenceDate,
const DayCounter &  ,
const std::vector< Handle< Quote > > &  jumps = std::vector< Handle< Quote > >(),
const std::vector< Date > &  jumpDates = std::vector< Date >(),
const Interpolator &  interpolator = Interpolator(),
const bool  allowNegativeRates = false 
)
protected

◆ InterpolatedSurvivalProbabilityCurve() [4/4]

InterpolatedSurvivalProbabilityCurve ( Natural  settlementDays,
const Calendar &  ,
const DayCounter &  ,
const std::vector< Handle< Quote > > &  jumps = std::vector< Handle< Quote > >(),
const std::vector< Date > &  jumpDates = std::vector< Date >(),
const Interpolator &  interpolator = Interpolator(),
const bool  allowNegativeRates = false 
)
protected

Member Function Documentation

◆ maxDate()

Date maxDate
override

Definition at line 114 of file interpolatedsurvivalprobabilitycurve.hpp.

114 {
115 return dates_.back();
116 }

◆ times()

const std::vector< Time > & times

Definition at line 120 of file interpolatedsurvivalprobabilitycurve.hpp.

120 {
121 return this->times_;
122 }

◆ dates()

const std::vector< Date > & dates

Definition at line 126 of file interpolatedsurvivalprobabilitycurve.hpp.

126 {
127 return dates_;
128 }

◆ data()

const std::vector< Real > & data

Definition at line 132 of file interpolatedsurvivalprobabilitycurve.hpp.

132 {
133 return this->data_;
134 }

◆ survivalProbabilities()

const std::vector< Probability > & survivalProbabilities

Definition at line 138 of file interpolatedsurvivalprobabilitycurve.hpp.

138 {
139 return this->data_;
140 }

◆ nodes()

std::vector< std::pair< Date, Real > > nodes

Definition at line 144 of file interpolatedsurvivalprobabilitycurve.hpp.

144 {
145 std::vector<std::pair<Date,Real> > results(dates_.size());
146 for (Size i=0; i<dates_.size(); ++i)
147 results[i] = std::make_pair(dates_[i],this->data_[i]);
148 return results;
149 }

◆ survivalProbabilityImpl()

Probability survivalProbabilityImpl ( Time  ) const
overrideprotected

◆ defaultDensityImpl()

Real defaultDensityImpl ( Time  ) const
overrideprotected

Member Data Documentation

◆ dates_

std::vector<Date> dates_
mutableprotected

Definition at line 106 of file interpolatedsurvivalprobabilitycurve.hpp.

◆ allowNegativeRates_

bool allowNegativeRates_
private

Definition at line 108 of file interpolatedsurvivalprobabilitycurve.hpp.