25#ifndef quantlib_inflation_index_hpp
26#define quantlib_inflation_index_hpp
36 class ZeroInflationIndex;
37 class YoYInflationIndex;
61 const Period& observationLag,
78 const Period& observationLag,
90 const Period& availabilitiyLag,
95 std::string
name()
const override;
113 Real fixing(
const Date& fixingDate,
bool forecastTodaysFixing =
false)
const override = 0;
169 Real fixing(
const Date& fixingDate,
bool forecastTodaysFixing =
false)
const override;
205 [[deprecated(
"Use the similar overload without the interpolated parameter")]]
228 [[deprecated(
"Use the similar overload without the interpolated parameter")]]
245 Rate fixing(
const Date& fixingDate,
bool forecastTodaysFixing =
false)
const override;
272 namespace detail::CPI {
281 const ext::shared_ptr<YoYInflationIndex>& index);
288 const ext::shared_ptr<YoYInflationIndex>& index);
Shared handle to an observable.
purely virtual base class for indexes
Base class for inflation-rate indexes,.
Real pastFixing(const Date &fixingDate) const override=0
returns a past fixing at the given date
Calendar fixingCalendar() const override
std::string name() const override
Returns the name of the index.
void addFixing(const Date &fixingDate, Rate fixing, bool forceOverwrite=false) override
bool isValidFixingDate(const Date &) const override
returns TRUE if the fixing date is a valid one
Currency currency() const
Frequency frequency() const
Period availabilityLag() const
std::string familyName() const
Real fixing(const Date &fixingDate, bool forecastTodaysFixing=false) const override=0
Linear-interpolation factory and traits
Region class, used for inflation applicability.
Base class for year-on-year inflation indices.
Handle< YoYInflationTermStructure > yoyInflation_
ext::shared_ptr< YoYInflationIndex > clone(const Handle< YoYInflationTermStructure > &h) const
bool interpolated() const
Date lastFixingDate() const
Rate forecastFixing(const Date &fixingDate) const
Handle< YoYInflationTermStructure > yoyInflationTermStructure() const
Rate fixing(const Date &fixingDate, bool forecastTodaysFixing=false) const override
ext::shared_ptr< ZeroInflationIndex > underlyingIndex() const
ext::shared_ptr< ZeroInflationIndex > underlyingIndex_
bool needsForecast(const Date &fixingDate) const
Real pastFixing(const Date &fixingDate) const override
returns a past fixing at the given date
Base class for zero inflation indices.
ext::shared_ptr< ZeroInflationIndex > clone(const Handle< ZeroInflationTermStructure > &h) const
Handle< ZeroInflationTermStructure > zeroInflation_
Date lastFixingDate() const
Real forecastFixing(const Date &fixingDate) const
Handle< ZeroInflationTermStructure > zeroInflationTermStructure() const
bool needsForecast(const Date &fixingDate) const
Real pastFixing(const Date &fixingDate) const override
returns a past fixing at the given date
Real fixing(const Date &fixingDate, bool forecastTodaysFixing=false) const override
Frequency
Frequency of events.
Globally accessible relinkable pointer.
virtual base class for indexes
Base classes for inflation term structures.
bool isInterpolated(const QuantLib::CPI::InterpolationType &type)
QuantLib::CPI::InterpolationType effectiveInterpolationType(const QuantLib::CPI::InterpolationType &type)
Region, i.e. geographical area, specification.
static Real laggedYoYRate(const ext::shared_ptr< YoYInflationIndex > &index, const Date &date, const Period &observationLag, InterpolationType interpolationType)
interpolated year-on-year inflation rate
static Real laggedFixing(const ext::shared_ptr< ZeroInflationIndex > &index, const Date &date, const Period &observationLag, InterpolationType interpolationType)
interpolated inflation fixing
InterpolationType
when you observe an index, how do you interpolate between fixings?
@ AsIndex
same interpolation as index
@ Flat
flat from previous fixing