24#ifndef quantlib_inflation_termstructure_hpp
25#define quantlib_inflation_termstructure_hpp
72 [[deprecated(
"Do not use; inflation curves always have an explicit base date now.")]]
90 [[deprecated(
"Do not use; inflation curves always have an explicit base date now.")]]
105 bool extrapolate)
const;
107 bool extrapolate)
const;
115 [[deprecated(
"Do not use; inflation curves always have an explicit base date now.")]]
133 const ext::shared_ptr<Seasonality>&
seasonality = {});
139 const ext::shared_ptr<Seasonality>&
seasonality = {});
146 const ext::shared_ptr<Seasonality>&
seasonality = {});
162 bool forceLinearInterpolation =
false,
163 bool extrapolate =
false)
const;
172 bool extrapolate =
false)
const;
189 const ext::shared_ptr<Seasonality>&
seasonality = {});
196 const ext::shared_ptr<Seasonality>&
seasonality = {});
204 const ext::shared_ptr<Seasonality>&
seasonality = {});
209 [[deprecated(
"Use an overload with an explicit base date and without indexIsInterpolated")]]
215 const ext::shared_ptr<Seasonality>&
seasonality = {});
220 [[deprecated(
"Use an overload with an explicit base date and without indexIsInterpolated")]]
227 const ext::shared_ptr<Seasonality>&
seasonality = {});
232 [[deprecated(
"Use an overload with an explicit base date and without indexIsInterpolated")]]
240 const ext::shared_ptr<Seasonality>&
seasonality = {});
256 bool forceLinearInterpolation =
false,
257 bool extrapolate =
false)
const;
266 bool extrapolate =
false)
const;
272 [[deprecated(
"This method will disappear. When it does, the curve will behave as if it returned false")]]
281 [[deprecated(
"This data member will disappear. When it does, the curve will behave as if it was false")]]
293 bool indexIsInterpolated,
Interface for inflation term structures.
bool hasSeasonality() const
bool hasExplicitBaseDate() const
ext::shared_ptr< Seasonality > seasonality_
void setSeasonality(const ext::shared_ptr< Seasonality > &seasonality)
virtual Rate baseRate() const
ext::shared_ptr< Seasonality > seasonality() const
QL_DEPRECATED_DISABLE_WARNING ~InflationTermStructure() override=default
virtual Period observationLag() const
virtual Date baseDate() const
minimum (base) date
virtual Frequency frequency() const
void checkRange(const Date &, bool extrapolate) const
template class providing a null value for a given type.
Basic term-structure functionality.
virtual Natural settlementDays() const
the settlementDays used for reference date calculation
virtual const Date & referenceDate() const
the date at which discount = 1.0 and/or variance = 0.0
virtual Calendar calendar() const
the calendar used for reference and/or option date calculation
virtual DayCounter dayCounter() const
the day counter used for date/time conversion
Base class for year-on-year inflation term structures.
virtual Rate yoyRateImpl(Time time) const =0
to be defined in derived classes
virtual bool indexIsInterpolated() const
bool indexIsInterpolated_
QL_DEPRECATED_DISABLE_WARNING ~YoYInflationTermStructure() override=default
Rate yoyRate(const Date &d, const Period &instObsLag=Period(-1, Days), bool forceLinearInterpolation=false, bool extrapolate=false) const
year-on-year inflation rate.
Interface for zero inflation term structures.
virtual Rate zeroRateImpl(Time t) const =0
to be defined in derived classes
Rate zeroRate(const Date &d, const Period &instObsLag=Period(-1, Days), bool forceLinearInterpolation=false, bool extrapolate=false) const
zero-coupon inflation rate.
#define QL_REQUIRE(condition, message)
throw an error if the given pre-condition is not verified
Frequency
Frequency of events.
Real Time
continuous quantity with 1-year units
unsigned QL_INTEGER Natural
positive integer
std::pair< Date, Date > inflationPeriod(const Date &d, Frequency frequency)
utility function giving the inflation period for a given date
Time inflationYearFraction(Frequency f, bool indexIsInterpolated, const DayCounter &dayCounter, const Date &d1, const Date &d2)
#define QL_DEPRECATED_DISABLE_WARNING
#define QL_DEPRECATED_ENABLE_WARNING
Interest-rate term structure.