QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
|
Piecewise default-probability term structure. More...
#include <piecewisedefaultcurve.hpp>
Public Types | |
typedef Traits | traits_type |
typedef Interpolator | interpolator_type |
typedef Bootstrap< this_curve > | bootstrap_type |
Public Types inherited from Observer | |
typedef set_type::iterator | iterator |
Public Member Functions | |
Constructors | |
PiecewiseDefaultCurve (const Date &referenceDate, std::vector< ext::shared_ptr< typename Traits::helper > > instruments, const DayCounter &dayCounter, const std::vector< Handle< Quote > > &jumps={}, const std::vector< Date > &jumpDates={}, const Interpolator &i={}, bootstrap_type bootstrap={}) | |
PiecewiseDefaultCurve (const Date &referenceDate, const std::vector< ext::shared_ptr< typename Traits::helper > > &instruments, const DayCounter &dayCounter, const Interpolator &i, const bootstrap_type &bootstrap=bootstrap_type()) | |
PiecewiseDefaultCurve (const Date &referenceDate, std::vector< ext::shared_ptr< typename Traits::helper > > instruments, const DayCounter &dayCounter, bootstrap_type bootstrap) | |
PiecewiseDefaultCurve (Natural settlementDays, const Calendar &calendar, std::vector< ext::shared_ptr< typename Traits::helper > > instruments, const DayCounter &dayCounter, const std::vector< Handle< Quote > > &jumps={}, const std::vector< Date > &jumpDates={}, const Interpolator &i={}, bootstrap_type bootstrap={}) | |
PiecewiseDefaultCurve (Natural settlementDays, const Calendar &calendar, const std::vector< ext::shared_ptr< typename Traits::helper > > &instruments, const DayCounter &dayCounter, const Interpolator &i, const bootstrap_type &bootstrap=bootstrap_type()) | |
PiecewiseDefaultCurve (Natural settlementDays, const Calendar &calendar, const std::vector< ext::shared_ptr< typename Traits::helper > > &instruments, const DayCounter &dayCounter, const bootstrap_type &bootstrap) | |
PiecewiseDefaultCurve (const Date &referenceDate, const std::vector< ext::shared_ptr< typename Traits::helper > > &instruments, const DayCounter &dayCounter, const ext::shared_ptr< OneFactorAffineModel > &model, const Interpolator &i={}, const bootstrap_type &bootstrap={}) | |
TermStructure interface | |
Date | maxDate () const override |
base_curve interface | |
const std::vector< Time > & | times () const |
const std::vector< Date > & | dates () const |
const std::vector< Real > & | data () const |
std::vector< std::pair< Date, Real > > | nodes () const |
Observer interface | |
void | update () override |
Public Member Functions inherited from LazyObject | |
LazyObject () | |
~LazyObject () override=default | |
bool | isCalculated () const |
void | forwardFirstNotificationOnly () |
void | alwaysForwardNotifications () |
void | recalculate () |
void | freeze () |
void | unfreeze () |
Public Member Functions inherited from Observable | |
Observable () | |
Observable (const Observable &) | |
Observable & | operator= (const Observable &) |
Observable (Observable &&)=delete | |
Observable & | operator= (Observable &&)=delete |
virtual | ~Observable ()=default |
void | notifyObservers () |
Public Member Functions inherited from Observer | |
Observer ()=default | |
Observer (const Observer &) | |
Observer & | operator= (const Observer &) |
virtual | ~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 | update ()=0 |
virtual void | deepUpdate () |
Private Types | |
typedef Traits::template curve< Interpolator >::type | base_curve |
typedef PiecewiseDefaultCurve< Traits, Interpolator, Bootstrap > | this_curve |
LazyObject interface | |
std::vector< ext::shared_ptr< typename Traits::helper > > | instruments_ |
Real | accuracy_ |
Bootstrap< this_curve > | bootstrap_ |
class | Bootstrap< this_curve > |
class | BootstrapError< this_curve > |
void | performCalculations () const override |
Probability | survivalProbabilityImpl (Time) const override |
Real | defaultDensityImpl (Time) const override |
Real | hazardRateImpl (Time) const override |
Additional Inherited Members | |
Protected Member Functions inherited from LazyObject | |
virtual void | calculate () const |
Protected Attributes inherited from LazyObject | |
bool | calculated_ = false |
bool | frozen_ = false |
bool | alwaysForward_ |
Piecewise default-probability term structure.
This term structure is bootstrapped on a number of credit instruments which are passed as a vector of handles to DefaultProbabilityHelper instances. Their maturities mark the boundaries of the interpolated segments.
Each segment is determined sequentially starting from the earliest period to the latest and is chosen so that the instrument whose maturity marks the end of such segment is correctly repriced on the curve.
Definition at line 55 of file piecewisedefaultcurve.hpp.
|
private |
Definition at line 59 of file piecewisedefaultcurve.hpp.
|
private |
Definition at line 60 of file piecewisedefaultcurve.hpp.
typedef Traits traits_type |
Definition at line 62 of file piecewisedefaultcurve.hpp.
typedef Interpolator interpolator_type |
Definition at line 63 of file piecewisedefaultcurve.hpp.
typedef Bootstrap<this_curve> bootstrap_type |
Definition at line 64 of file piecewisedefaultcurve.hpp.
PiecewiseDefaultCurve | ( | const Date & | referenceDate, |
std::vector< ext::shared_ptr< typename Traits::helper > > | instruments, | ||
const DayCounter & | dayCounter, | ||
const std::vector< Handle< Quote > > & | jumps = {} , |
||
const std::vector< Date > & | jumpDates = {} , |
||
const Interpolator & | i = {} , |
||
bootstrap_type | bootstrap = {} |
||
) |
Definition at line 68 of file piecewisedefaultcurve.hpp.
PiecewiseDefaultCurve | ( | const Date & | referenceDate, |
const std::vector< ext::shared_ptr< typename Traits::helper > > & | instruments, | ||
const DayCounter & | dayCounter, | ||
const Interpolator & | i, | ||
const bootstrap_type & | bootstrap = bootstrap_type() |
||
) |
Definition at line 82 of file piecewisedefaultcurve.hpp.
PiecewiseDefaultCurve | ( | const Date & | referenceDate, |
std::vector< ext::shared_ptr< typename Traits::helper > > | instruments, | ||
const DayCounter & | dayCounter, | ||
bootstrap_type | bootstrap | ||
) |
Definition at line 95 of file piecewisedefaultcurve.hpp.
PiecewiseDefaultCurve | ( | Natural | settlementDays, |
const Calendar & | calendar, | ||
std::vector< ext::shared_ptr< typename Traits::helper > > | instruments, | ||
const DayCounter & | dayCounter, | ||
const std::vector< Handle< Quote > > & | jumps = {} , |
||
const std::vector< Date > & | jumpDates = {} , |
||
const Interpolator & | i = {} , |
||
bootstrap_type | bootstrap = {} |
||
) |
Definition at line 106 of file piecewisedefaultcurve.hpp.
PiecewiseDefaultCurve | ( | Natural | settlementDays, |
const Calendar & | calendar, | ||
const std::vector< ext::shared_ptr< typename Traits::helper > > & | instruments, | ||
const DayCounter & | dayCounter, | ||
const Interpolator & | i, | ||
const bootstrap_type & | bootstrap = bootstrap_type() |
||
) |
Definition at line 121 of file piecewisedefaultcurve.hpp.
PiecewiseDefaultCurve | ( | Natural | settlementDays, |
const Calendar & | calendar, | ||
const std::vector< ext::shared_ptr< typename Traits::helper > > & | instruments, | ||
const DayCounter & | dayCounter, | ||
const bootstrap_type & | bootstrap | ||
) |
Definition at line 135 of file piecewisedefaultcurve.hpp.
PiecewiseDefaultCurve | ( | const Date & | referenceDate, |
const std::vector< ext::shared_ptr< typename Traits::helper > > & | instruments, | ||
const DayCounter & | dayCounter, | ||
const ext::shared_ptr< OneFactorAffineModel > & | model, | ||
const Interpolator & | i = {} , |
||
const bootstrap_type & | bootstrap = {} |
||
) |
Definition at line 157 of file piecewisedefaultcurve.hpp.
|
override |
Definition at line 215 of file piecewisedefaultcurve.hpp.
const std::vector< Time > & times |
Definition at line 222 of file piecewisedefaultcurve.hpp.
const std::vector< Date > & dates |
Definition at line 229 of file piecewisedefaultcurve.hpp.
const std::vector< Real > & data |
Definition at line 236 of file piecewisedefaultcurve.hpp.
Definition at line 243 of file piecewisedefaultcurve.hpp.
|
overridevirtual |
This method must be implemented in derived classes. An instance of Observer does not call this method directly: instead, it will be called by the observables the instance registered with when they need to notify any changes.
Reimplemented from LazyObject.
Definition at line 249 of file piecewisedefaultcurve.hpp.
|
overrideprivatevirtual |
This method must implement any calculations which must be (re)done in order to calculate the desired results.
Implements LazyObject.
Definition at line 280 of file piecewisedefaultcurve.hpp.
|
overrideprivate |
Definition at line 262 of file piecewisedefaultcurve.hpp.
Definition at line 268 of file piecewisedefaultcurve.hpp.
Definition at line 274 of file piecewisedefaultcurve.hpp.
|
friend |
Definition at line 200 of file piecewisedefaultcurve.hpp.
|
friend |
Definition at line 200 of file piecewisedefaultcurve.hpp.
|
private |
Definition at line 199 of file piecewisedefaultcurve.hpp.
|
private |
Definition at line 200 of file piecewisedefaultcurve.hpp.
|
private |
Definition at line 208 of file piecewisedefaultcurve.hpp.