Bootstrap traits to use for PiecewiseZeroInflationCurve.
More...
#include <qle/termstructures/inflation/inflationtraits.hpp>
|
typedef QuantLib::BootstrapHelper< QuantLib::ZeroInflationTermStructure > | helper |
|
|
static QuantLib::Date | initialDate (const BootstrapFirstDateInitializer *t) |
|
static QuantLib::Rate | initialValue (const QuantLib::ZeroInflationTermStructure *t) |
|
template<class C > |
static QuantLib::Rate | guess (QuantLib::Size i, const C *c, bool validData, QuantLib::Size) |
|
template<class C > |
static QuantLib::Rate | minValueAfter (QuantLib::Size i, const C *c, bool validData, QuantLib::Size) |
|
template<class C > |
static QuantLib::Rate | maxValueAfter (QuantLib::Size i, const C *c, bool validData, QuantLib::Size) |
|
static void | updateGuess (std::vector< QuantLib::Rate > &data, QuantLib::Rate level, QuantLib::Size i) |
|
static QuantLib::Size | maxIterations () |
|
Bootstrap traits to use for PiecewiseZeroInflationCurve.
Definition at line 37 of file inflationtraits.hpp.
◆ helper
typedef QuantLib::BootstrapHelper<QuantLib::ZeroInflationTermStructure> helper |
◆ initialDate()
◆ initialValue()
static QuantLib::Rate initialValue |
( |
const QuantLib::ZeroInflationTermStructure * |
t | ) |
|
|
static |
◆ guess()
static QuantLib::Rate guess |
( |
QuantLib::Size |
i, |
|
|
const C * |
c, |
|
|
bool |
validData, |
|
|
QuantLib::Size |
|
|
) |
| |
|
static |
Definition at line 54 of file inflationtraits.hpp.
56 {
57 if (validData)
58 return c->data()[i];
59
60 if (i == 1)
62
63
65 }
const QuantLib::Rate avgInflation
◆ minValueAfter()
static QuantLib::Rate minValueAfter |
( |
QuantLib::Size |
i, |
|
|
const C * |
c, |
|
|
bool |
validData, |
|
|
QuantLib::Size |
|
|
) |
| |
|
static |
Definition at line 69 of file inflationtraits.hpp.
71 {
72 if (validData) {
73 QuantLib::Rate r = *(std::min_element(c->data().begin(), c->data().end()));
74 return r < 0.0 ? r * 2.0 : r / 2.0;
75 }
77 }
const QuantLib::Rate maxInflation
◆ maxValueAfter()
static QuantLib::Rate maxValueAfter |
( |
QuantLib::Size |
i, |
|
|
const C * |
c, |
|
|
bool |
validData, |
|
|
QuantLib::Size |
|
|
) |
| |
|
static |
Definition at line 79 of file inflationtraits.hpp.
81 {
82 if (validData) {
83 QuantLib::Rate r = *(std::max_element(c->data().begin(), c->data().end()));
84 return r < 0.0 ? r / 2.0 : r * 2.0;
85 }
86
87
89 }
◆ updateGuess()
static void updateGuess |
( |
std::vector< QuantLib::Rate > & |
data, |
|
|
QuantLib::Rate |
level, |
|
|
QuantLib::Size |
i |
|
) |
| |
|
static |
◆ maxIterations()
static QuantLib::Size maxIterations |
( |
| ) |
|
|
static |