30 Size index,
bool indexIsInterpolated)
31 : YoYInflationTermStructure(
35 model_(model), index_(index), indexIsInterpolated_(indexIsInterpolated),
47 return Date::maxDate();
63 return inflationPeriod(
referenceDate_ - observationLag_, frequency()).first;
85 bool extrapolate)
const {
86 return yoyRates({ d }, obsLag).at(d);
90 QL_FAIL(
"YoYInflationModelTermStructure::yoyRateImpl cannot be called.");
QuantLib::Real yoyRateImpl(QuantLib::Time t) const override
This cannot be called. The implementation is set to throw an exception.
virtual std::map< QuantLib::Date, QuantLib::Real > yoyRates(const std::vector< QuantLib::Date > &dates, const QuantLib::Period &obsLag=-1 *QuantLib::Days) const =0
virtual void checkState() const
QuantLib::Date baseDate() const override
const QuantLib::Date & referenceDate() const override
bool indexIsInterpolated_
void state(const QuantLib::Array &s)
Set the current state variables.
void move(const QuantLib::Date &d, const QuantLib::Array &s)
Set the current state and move the reference date to date d.
QuantLib::ext::shared_ptr< CrossAssetModel > model_
QuantLib::Date maxDate() const override
QuantLib::Date referenceDate_
YoYInflationModelTermStructure(const QuantLib::ext::shared_ptr< CrossAssetModel > &model, QuantLib::Size index, bool indexIsInterpolated)
QuantLib::Real yoyRate(const QuantLib::Date &d, const QuantLib::Period &obsLag=-1 *QuantLib::Days, bool forceLinearInterpolation=false, bool extrapolate=false) const
QuantLib::Time maxTime() const override
QuantLib::Time relativeTime_
Handle< ZeroInflationTermStructure > inflationTermStructure(const QuantLib::ext::shared_ptr< CrossAssetModel > &model, Size index)
year-on-year inflation term structure implied by a cross asset model