Hazard-rate term structure. More...
#include <ql/termstructures/credit/hazardratestructure.hpp>
Public Member Functions | |
Constructors | |
See the TermStructure documentation for issues regarding constructors. | |
HazardRateStructure (const DayCounter &dayCounter=DayCounter(), const std::vector< Handle< Quote > > &jumps=std::vector< Handle< Quote > >(), const std::vector< Date > &jumpDates=std::vector< Date >()) | |
HazardRateStructure (const Date &referenceDate, const Calendar &cal=Calendar(), const DayCounter &dayCounter=DayCounter(), const std::vector< Handle< Quote > > &jumps=std::vector< Handle< Quote > >(), const std::vector< Date > &jumpDates=std::vector< Date >()) | |
HazardRateStructure (Natural settlementDays, const Calendar &cal, const DayCounter &dayCounter=DayCounter(), const std::vector< Handle< Quote > > &jumps=std::vector< Handle< Quote > >(), const std::vector< Date > &jumpDates=std::vector< Date >()) | |
![]() | |
DefaultProbabilityTermStructure (const DayCounter &dc=DayCounter(), const std::vector< Handle< Quote > > &jumps=std::vector< Handle< Quote > >(), const std::vector< Date > &jumpDates=std::vector< Date >()) | |
DefaultProbabilityTermStructure (const Date &referenceDate, const Calendar &cal=Calendar(), const DayCounter &dc=DayCounter(), const std::vector< Handle< Quote > > &jumps=std::vector< Handle< Quote > >(), const std::vector< Date > &jumpDates=std::vector< Date >()) | |
DefaultProbabilityTermStructure (Natural settlementDays, const Calendar &cal, const DayCounter &dc=DayCounter(), const std::vector< Handle< Quote > > &jumps=std::vector< Handle< Quote > >(), const std::vector< Date > &jumpDates=std::vector< Date >()) | |
Probability | survivalProbability (const Date &d, bool extrapolate=false) const |
Probability | survivalProbability (Time t, bool extrapolate=false) const |
Probability | defaultProbability (const Date &d, bool extrapolate=false) const |
Probability | defaultProbability (Time t, bool extrapolate=false) const |
Probability | defaultProbability (const Date &, const Date &, bool extrapolate=false) const |
probability of default between two given dates | |
Probability | defaultProbability (Time, Time, bool extrapo=false) const |
probability of default between two given times | |
Real | defaultDensity (const Date &d, bool extrapolate=false) const |
Real | defaultDensity (Time t, bool extrapolate=false) const |
Rate | hazardRate (const Date &d, bool extrapolate=false) const |
Rate | hazardRate (Time t, bool extrapolate=false) const |
const std::vector< Date > & | jumpDates () const |
const std::vector< Time > & | jumpTimes () const |
void | update () |
![]() | |
TermStructure (const DayCounter &dc=DayCounter()) | |
default constructor More... | |
TermStructure (const Date &referenceDate, const Calendar &calendar=Calendar(), const DayCounter &dc=DayCounter()) | |
initialize with a fixed reference date | |
TermStructure (Natural settlementDays, const Calendar &, const DayCounter &dc=DayCounter()) | |
calculate the reference date based on the global evaluation date | |
virtual | ~TermStructure () |
virtual DayCounter | dayCounter () const |
the day counter used for date/time conversion | |
Time | timeFromReference (const Date &date) const |
date/time conversion | |
virtual Date | maxDate () const =0 |
the latest date for which the curve can return values | |
virtual Time | maxTime () const |
the latest time for which the curve can return values | |
virtual const Date & | referenceDate () const |
the date at which discount = 1.0 and/or variance = 0.0 | |
virtual Calendar | calendar () const |
the calendar used for reference and/or option date calculation | |
virtual Natural | settlementDays () const |
the settlementDays used for reference date calculation | |
![]() | |
Observer (const Observer &) | |
Observer & | operator= (const Observer &) |
std::pair< iterator, bool > | registerWith (const ext::shared_ptr< Observable > &) |
void | registerWithObservables (const ext::shared_ptr< Observer > &) |
Size | unregisterWith (const ext::shared_ptr< Observable > &) |
void | unregisterWithAll () |
virtual void | deepUpdate () |
![]() | |
Observable (const Observable &) | |
Observable & | operator= (const Observable &) |
void | notifyObservers () |
![]() | |
void | enableExtrapolation (bool b=true) |
enable extrapolation in subsequent calls | |
void | disableExtrapolation (bool b=true) |
disable extrapolation in subsequent calls | |
bool | allowsExtrapolation () const |
tells whether extrapolation is enabled | |
Protected Member Functions | |
Calculations | |
This method must be implemented in derived classes to perform the actual calculations. When it is called, range check has already been performed; therefore, it must assume that extrapolation is required. | |
virtual Real | hazardRateImpl (Time) const =0 |
hazard rate calculation | |
DefaultProbabilityTermStructure implementation | |
Probability | survivalProbabilityImpl (Time) const |
Real | defaultDensityImpl (Time) const |
default density calculation | |
![]() | |
![]() | |
void | checkRange (const Date &d, bool extrapolate) const |
date-range check | |
void | checkRange (Time t, bool extrapolate) const |
time-range check | |
Additional Inherited Members | |
![]() | |
typedef boost::unordered_set< ext::shared_ptr< Observable > > | set_type |
typedef set_type::iterator | iterator |
![]() | |
bool | moving_ |
bool | updated_ |
Calendar | calendar_ |
Hazard-rate term structure.
This abstract class acts as an adapter to DefaultProbabilityTermStructure allowing the programmer to implement only the hazardRateImpl(Time)
method in derived classes.
Survival/default probabilities and default densities are calculated from hazard rates.
Hazard rates are defined with annual frequency and continuous compounding.
|
protectedvirtual |
survival probability calculation implemented in terms of the hazard rate \( h(t) \) as
\[ S(t) = \exp\left( - \int_0^t h(\tau) d\tau \right). \]
Implements DefaultProbabilityTermStructure.
Reimplemented in InterpolatedHazardRateCurve< Interpolator >.