25#ifndef quantlib_inflation_index_hpp
26#define quantlib_inflation_index_hpp
28#include <ql/currency.hpp>
29#include <ql/handle.hpp>
30#include <ql/index.hpp>
31#include <ql/indexes/region.hpp>
32#include <ql/termstructures/inflationtermstructure.hpp>
36 class ZeroInflationIndex;
59 const Period& observationLag,
71 const Period& availabilitiyLag,
83 const Period& availabilitiyLag,
88 std::string
name()
const override;
109 Real fixing(
const Date& fixingDate,
bool forecastTodaysFixing =
false)
const override = 0;
210 Real fixing(
const Date& fixingDate,
bool forecastTodaysFixing =
false)
const override;
286 Rate fixing(
const Date& fixingDate,
bool forecastTodaysFixing =
false)
const override;
317 const ext::shared_ptr<ZeroInflationIndex>& index,
Shared handle to an observable.
purely virtual base class for indexes
Base class for inflation-rate indexes,.
Calendar fixingCalendar() const override
QL_DEPRECATED bool interpolated() const
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
QL_DEPRECATED bool interpolated_
Period availabilityLag() const
std::string familyName() const
Real fixing(const Date &fixingDate, bool forecastTodaysFixing=false) const override=0
Linear-interpolation factory and traits
Object that gets notified when a given observable changes.
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
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_
Base class for zero inflation indices.
ext::shared_ptr< ZeroInflationIndex > clone(const Handle< ZeroInflationTermStructure > &h) const
Handle< ZeroInflationTermStructure > zeroInflation_
Real forecastFixing(const Date &fixingDate) const
Handle< ZeroInflationTermStructure > zeroInflationTermStructure() const
bool needsForecast(const Date &fixingDate) const
Real fixing(const Date &fixingDate, bool forecastTodaysFixing=false) const override
Frequency
Frequency of events.
bool isInterpolated(const ext::shared_ptr< ZeroInflationIndex > &index, const QuantLib::CPI::InterpolationType &type=QuantLib::CPI::AsIndex)
QuantLib::CPI::InterpolationType effectiveInterpolationType(const ext::shared_ptr< ZeroInflationIndex > &index, const QuantLib::CPI::InterpolationType &type=QuantLib::CPI::AsIndex)
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
@ Linear
linearly between bracketing fixings
@ Flat
flat from previous fixing