24#ifndef quantlib_inflation_termstructure_hpp
25#define quantlib_inflation_termstructure_hpp
127 [[deprecated(
"Use the overload taking a pointer and pass an empty one to remove seasonality.")]]
138 [[deprecated(
"Do not use; set baseRate_ directly if needed.")]]
143 bool extrapolate)
const;
145 bool extrapolate)
const;
165 const ext::shared_ptr<Seasonality>&
seasonality = {});
171 const ext::shared_ptr<Seasonality>&
seasonality = {});
178 const ext::shared_ptr<Seasonality>&
seasonality = {});
189 const ext::shared_ptr<Seasonality>&
seasonality = {});
202 const ext::shared_ptr<Seasonality>&
seasonality = {});
215 const ext::shared_ptr<Seasonality>&
seasonality = {});
231 bool forceLinearInterpolation =
false,
232 bool extrapolate =
false)
const;
241 bool extrapolate =
false)
const;
259 const ext::shared_ptr<Seasonality>&
seasonality = {});
267 const ext::shared_ptr<Seasonality>&
seasonality = {});
276 const ext::shared_ptr<Seasonality>&
seasonality = {});
288 const ext::shared_ptr<Seasonality>&
seasonality = {});
302 const ext::shared_ptr<Seasonality>&
seasonality = {});
316 const ext::shared_ptr<Seasonality>&
seasonality = {});
328 bool forceLinearInterpolation =
false,
329 bool extrapolate =
false)
const;
338 bool extrapolate =
false)
const;
357 bool indexIsInterpolated,
Interface for inflation term structures.
bool hasExplicitBaseDate_
bool hasSeasonality() const
bool hasExplicitBaseDate() const
ext::shared_ptr< Seasonality > seasonality_
virtual Rate baseRate() const
ext::shared_ptr< Seasonality > seasonality() const
virtual Period observationLag() const
virtual Date baseDate() const
minimum (base) date
virtual void setBaseRate(const Rate &r)
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_
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.
Rate zeroRate(const Date &d, const Period &instObsLag=Period(-1, Days), bool forceLinearInterpolation=false, bool extrapolate=false) const
zero-coupon inflation rate.
virtual Rate zeroRateImpl(Time t) const =0
to be defined in derived classes
#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)
ext::shared_ptr< YieldTermStructure > r
Interest-rate term structure.