25#include <ql/termstructures/bootstraphelper.hpp>
26#include <ql/termstructures/inflation/interpolatedyoyinflationcurve.hpp>
27#include <ql/termstructures/inflation/interpolatedzeroinflationcurve.hpp>
45 typedef QuantLib::BootstrapHelper<QuantLib::ZeroInflationTermStructure>
helper;
50 static QuantLib::Rate
initialValue(
const QuantLib::ZeroInflationTermStructure* t) {
return t->baseRate(); }
54 static QuantLib::Rate
guess(QuantLib::Size i,
const C* c,
bool validData,
69 static QuantLib::Rate
minValueAfter(QuantLib::Size i,
const C* c,
bool 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;
79 static QuantLib::Rate
maxValueAfter(QuantLib::Size i,
const C* c,
bool 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;
92 static void updateGuess(std::vector<QuantLib::Rate>& data, QuantLib::Rate level, QuantLib::Size i) {
virtual ~BootstrapFirstDateInitializer()=default
virtual QuantLib::Date initialDate() const =0
Bootstrap traits to use for PiecewiseZeroInflationCurve.
static QuantLib::Rate initialValue(const QuantLib::ZeroInflationTermStructure *t)
QuantLib::BootstrapHelper< QuantLib::ZeroInflationTermStructure > helper
static QuantLib::Rate minValueAfter(QuantLib::Size i, const C *c, bool validData, QuantLib::Size)
static QuantLib::Size maxIterations()
static QuantLib::Rate maxValueAfter(QuantLib::Size i, const C *c, bool validData, QuantLib::Size)
static QuantLib::Rate guess(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::Date initialDate(const BootstrapFirstDateInitializer *t)
const QuantLib::Rate avgInflation
const QuantLib::Rate maxInflation