Survival probability curve traits.
More...
#include <qle/termstructures/probabilitytraits.hpp>
|
typedef QuantLib::BootstrapHelper< QuantLib::DefaultProbabilityTermStructure > | helper |
|
|
static QuantLib::Date | initialDate (const QuantLib::DefaultProbabilityTermStructure *c) |
|
static QuantLib::Real | initialValue (const QuantLib::DefaultProbabilityTermStructure *) |
|
template<class C > |
static QuantLib::Real | guess (QuantLib::Size i, const C *c, bool validData, QuantLib::Size) |
|
template<class C > |
static QuantLib::Real | minValueAfter (QuantLib::Size i, const C *c, bool validData, QuantLib::Size) |
|
template<class C > |
static QuantLib::Real | maxValueAfter (QuantLib::Size i, const C *c, bool validData, QuantLib::Size) |
|
static void | updateGuess (std::vector< QuantLib::Real > &data, QuantLib::Probability p, QuantLib::Size i) |
|
static QuantLib::Size | maxIterations () |
|
Survival probability curve traits.
Definition at line 39 of file probabilitytraits.hpp.
◆ helper
typedef QuantLib::BootstrapHelper<QuantLib::DefaultProbabilityTermStructure> helper |
◆ initialDate()
static QuantLib::Date initialDate |
( |
const QuantLib::DefaultProbabilityTermStructure * |
c | ) |
|
|
static |
◆ initialValue()
static QuantLib::Real initialValue |
( |
const QuantLib::DefaultProbabilityTermStructure * |
| ) |
|
|
static |
◆ guess()
static QuantLib::Real guess |
( |
QuantLib::Size |
i, |
|
|
const C * |
c, |
|
|
bool |
validData, |
|
|
QuantLib::Size |
|
|
) |
| |
|
static |
Definition at line 56 of file probabilitytraits.hpp.
56 {
57
58
59 if (validData)
60 return c->data()[i];
61
62
63 if (i == 1)
65
66
67 Date d = c->dates()[i];
68 return c->survivalProbability(d, true);
69 }
const QuantLib::Real avgHazardRate
◆ minValueAfter()
static QuantLib::Real minValueAfter |
( |
QuantLib::Size |
i, |
|
|
const C * |
c, |
|
|
bool |
validData, |
|
|
QuantLib::Size |
|
|
) |
| |
|
static |
Definition at line 73 of file probabilitytraits.hpp.
73 {
74
75 if (validData) {
76 return c->data().back() / 2.0;
77 }
78
79 Time dt = c->times()[i] - c->times()[i - 1];
81 }
const QuantLib::Real maxHazardRate
◆ maxValueAfter()
static QuantLib::Real maxValueAfter |
( |
QuantLib::Size |
i, |
|
|
const C * |
c, |
|
|
bool |
validData, |
|
|
QuantLib::Size |
|
|
) |
| |
|
static |
◆ updateGuess()
static void updateGuess |
( |
std::vector< QuantLib::Real > & |
data, |
|
|
QuantLib::Probability |
p, |
|
|
QuantLib::Size |
i |
|
) |
| |
|
static |
◆ maxIterations()
static QuantLib::Size maxIterations |
( |
| ) |
|
|
static |