Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
List of all members
HazardSpreadedDefaultTermStructure Class Reference

Hazard Spreaded Default Term Structure. More...

#include <qle/termstructures/hazardspreadeddefaulttermstructure.hpp>

+ Inheritance diagram for HazardSpreadedDefaultTermStructure:
+ Collaboration diagram for HazardSpreadedDefaultTermStructure:

Public Member Functions

Constructors
 HazardSpreadedDefaultTermStructure (const Handle< DefaultProbabilityTermStructure > &source, const Handle< Quote > &spread)
 
TermStructure interface
virtual DayCounter dayCounter () const override
 
virtual Date maxDate () const override
 
virtual Time maxTime () const override
 
virtual const Date & referenceDate () const override
 
virtual Calendar calendar () const override
 
virtual Natural settlementDays () const override
 

Private Member Functions

HazardRateStructure interface
Rate hazardRateImpl (Time) const override
 

DefaultProbabilityTermStructure interface

Handle< DefaultProbabilityTermStructure > source_
 
Handle< Quote > spread_
 
Probability survivalProbabilityImpl (Time) const override
 

Detailed Description

Hazard Spreaded Default Term Structure.

Definition at line 37 of file hazardspreadeddefaulttermstructure.hpp.

Constructor & Destructor Documentation

◆ HazardSpreadedDefaultTermStructure()

HazardSpreadedDefaultTermStructure ( const Handle< DefaultProbabilityTermStructure > &  source,
const Handle< Quote > &  spread 
)

Definition at line 23 of file hazardspreadeddefaulttermstructure.cpp.

25 : source_(source), spread_(spread) {
26 if (!source_.empty())
27 enableExtrapolation(source_->allowsExtrapolation());
28 registerWith(source_);
29 registerWith(spread_);
30}

Member Function Documentation

◆ dayCounter()

DayCounter dayCounter ( ) const
overridevirtual

Definition at line 78 of file hazardspreadeddefaulttermstructure.hpp.

78{ return source_->dayCounter(); }

◆ maxDate()

Date maxDate ( ) const
overridevirtual

Definition at line 80 of file hazardspreadeddefaulttermstructure.hpp.

80{ return source_->maxDate(); }

◆ maxTime()

Time maxTime ( ) const
overridevirtual

Definition at line 82 of file hazardspreadeddefaulttermstructure.hpp.

82{ return source_->maxTime(); }

◆ referenceDate()

const Date & referenceDate ( ) const
overridevirtual

Definition at line 84 of file hazardspreadeddefaulttermstructure.hpp.

84{ return source_->referenceDate(); }

◆ calendar()

Calendar calendar ( ) const
overridevirtual

Definition at line 86 of file hazardspreadeddefaulttermstructure.hpp.

86{ return source_->calendar(); }

◆ settlementDays()

Natural settlementDays ( ) const
overridevirtual

Definition at line 88 of file hazardspreadeddefaulttermstructure.hpp.

88{ return source_->settlementDays(); }

◆ hazardRateImpl()

Rate hazardRateImpl ( Time  t) const
overrideprivate

Definition at line 70 of file hazardspreadeddefaulttermstructure.hpp.

70 {
71 return source_->hazardRate(t) + spread_->value();
72}

◆ survivalProbabilityImpl()

Probability survivalProbabilityImpl ( Time  t) const
overrideprivate

Definition at line 74 of file hazardspreadeddefaulttermstructure.hpp.

74 {
75 return source_->survivalProbability(t) * std::exp(-spread_->value() * t);
76}

Member Data Documentation

◆ source_

Handle<DefaultProbabilityTermStructure> source_
private

Definition at line 64 of file hazardspreadeddefaulttermstructure.hpp.

◆ spread_

Handle<Quote> spread_
private

Definition at line 65 of file hazardspreadeddefaulttermstructure.hpp.