### A free/open-source library for quantitative finance

Protected Member Functions
YoYInflationTermStructure Class Reference

Base class for year-on-year inflation term structures. More...

`#include <ql/termstructures/inflationtermstructure.hpp>`

Inheritance diagram for YoYInflationTermStructure:
[legend]

List of all members.

## Public Member Functions

Constructors
| YoYInflationTermStructure (const DayCounter &dayCounter, Rate baseYoYRate, const Period &lag, Frequency frequency, bool indexIsInterpolated, const Handle< YieldTermStructure > &yieldTS, const boost::shared_ptr< Seasonality > &seasonality=boost::shared_ptr< Seasonality >())
| YoYInflationTermStructure (const Date &referenceDate, const Calendar &calendar, const DayCounter &dayCounter, Rate baseYoYRate, const Period &lag, Frequency frequency, bool indexIsInterpolated, const Handle< YieldTermStructure > &yieldTS, const boost::shared_ptr< Seasonality > &seasonality=boost::shared_ptr< Seasonality >())
| YoYInflationTermStructure (Natural settlementDays, const Calendar &calendar, const DayCounter &dayCounter, Rate baseYoYRate, const Period &lag, Frequency frequency, bool indexIsInterpolated, const Handle< YieldTermStructure > &yieldTS, const boost::shared_ptr< Seasonality > &seasonality=boost::shared_ptr< Seasonality >())
Inspectors
Rate | yoyRate (const Date &d, const Period &instObsLag=Period(-1, Days), bool forceLinearInterpolation=false, bool extrapolate=false) const
| year-on-year inflation rate.
Rate | yoyRate (Time t, bool extrapolate=false) const
| year-on-year inflation rate.

## Protected Member Functions

virtual Rate | yoyRateImpl (Time time) const =0
| to be defined in derived classes

## Detailed Description

Base class for year-on-year inflation term structures.

## Member Function Documentation

Rate yoyRate | ( | const Date & | d,
|  | const Period & | instObsLag = `Period(-1, Days)`,
|  | bool | forceLinearInterpolation = `false`,
|  | bool | extrapolate = `false`
| ) |  | const

year-on-year inflation rate.

The forceLinearInterpolation parameter is relative to the frequency of the TS.

Note:
  this is not the year-on-year swap (YYIIS) rate.

Rate yoyRate | ( | Time | t,
|  | bool | extrapolate = `false`
| ) |  | const

year-on-year inflation rate.

Warning:
  Since inflation is highly linked to dates (lags, interpolation, months for seasonality, etc) this method cannot account for all effects. If you call it, You'll have to manage lag, seasonality etc. yourself.