# inflationcurve

Create `inflationcurve` object for interest-rate curve from dates and data

## Description

Build an `inflationcurve` object using `inflationcurve`.

After creating a `inflationcurve` object, you can use the associated object function `indexvalues`.

To price an `InflationBond`, `YearYearInflationSwap`, or `ZeroCouponInflationSwap` instrument, you must create an `inflationcurve` object and then create an `Inflation` pricer object.

For more information on this workflow, see Get Started with Workflows Using Object-Based Framework for Pricing Financial Instruments.

For more information on the available instruments, models, and pricing methods, see Choose Instruments, Models, and Pricers.

## Creation

### Syntax

``inflationcurve_obj = inflationcurve(Dates,InflationIndexValues)``
``inflationcurve_obj = inflationcurve(___,Name,Value)``

### Description

example

````inflationcurve_obj = inflationcurve(Dates,InflationIndexValues)` creates an `inflationcurve` object. ```

example

````inflationcurve_obj = inflationcurve(___,Name,Value)` creates an `inflationcurve` object using name-value pairs and any of the arguments in the previous syntax. For example, ```myInflationCurve = inflationcurve(InflationDates,InflationIndexValues,'Basis',4)``` creates an `inflationcurve` object. You can specify multiple name-value pair arguments.```

### Input Arguments

expand all

Dates corresponding to `InflationIndexValues`, specified as a datetime array, serial date numbers, cell array of date character vectors, or date string array. The first date is the base date.

If you use a date character vector or date string, the format must be recognizable by `datetime` because the `Dates` property is stored as a datetime.

Data Types: `double` | `char` | `cell` | `string` | `datetime`

Inflation index values for the curve, specified as a vector of positive values. The first value is the base index value.

Data Types: `double`

Name-Value Pair Arguments

Specify optional comma-separated pairs of `Name,Value` arguments. `Name` is the argument name and `Value` is the corresponding value. `Name` must appear inside quotes. You can specify several name and value pair arguments in any order as `Name1,Value1,...,NameN,ValueN`.

Example: ```myInflationCurve = inflationcurve(InflationDates,InflationIndexValues,'Basis',4)```

Day count basis, specified as the comma-separated pair consisting of `'Basis'` and a scalar integer.

• 0 — actual/actual

• 1 — 30/360 (SIA)

• 2 — actual/360

• 3 — actual/365

• 4 — 30/360 (PSA)

• 5 — 30/360 (ISDA)

• 6 — 30/360 (European)

• 7 — actual/365 (Japanese)

• 8 — actual/actual (ICMA)

• 9 — actual/360 (ICMA)

• 10 — actual/365 (ICMA)

• 11 — 30/360E (ICMA)

• 12 — actual/365 (ISDA)

• 13 — BUS/252

Data Types: `double`

Seasonal adjustment rates, specified as the comma-separated pair consisting of `'Seasonality'` and a `12`-by-`1` vector in decimals for each month ordered from January to December. The rates are annualized and continuously compounded seasonal rates that are internally corrected to add to `0`.

Data Types: `double`

## Properties

expand all

Day count basis of the instrument, returned as a scalar integer.

Data Types: `double`

Dates corresponding to `InflationIndexValues`, returned as a datetime array.

Data Types: `datetime`

Inflation index values for the curve, returned as vector.

Data Types: `double`

Forward inflation rates, returned as vector.

Data Types: `double`

Seasonal adjustment rates, returned as a `12`-by-`1` vector.

Data Types: `double`

## Object Functions

 `indexvalues` Calculate index values for `inflationcurve` object

## Examples

collapse all

Create an `inflationcurve` object using `inflationcurve`.

```BaseDate = datetime(2020, 9, 20); InflationTimes = [0 calyears([1 2 3 4 5 7 10 20 30])]'; InflationIndexValues = [100 102 103.5 105 106.8 108.2 111.3 120.1 130.4 150.2]'; InflationDates = BaseDate + InflationTimes; myInflationCurve = inflationcurve(InflationDates,InflationIndexValues)```
```myInflationCurve = inflationcurve with properties: Basis: 0 Dates: [10x1 datetime] InflationIndexValues: [10x1 double] ForwardInflationRates: [9x1 double] Seasonality: [12x1 double] ```

## Algorithms

Build an inflation curve from a series of breakeven zero-coupon inflation swap (ZCIS) rates:

`$\begin{array}{l}I\left(0,{T}_{1Y}\right)=I\left({T}_{0}\right){\left(}^{1}\\ I\left(0,{T}_{2Y}\right)=I\left({T}_{0}\right){\left(}^{1}\\ I\left(0,{T}_{3Y}\right)=I\left({T}_{0}\right){\left(}^{1}\\ ...\\ I\left(0,{T}_{i}\right)=I\left({T}_{0}\right){\left(}^{1}\end{array}$`

where

• $I\left(0,{T}_{i}\right)$ is the breakeven inflation index reference number for maturity date Ti.

• $I\left({T}_{0}\right)$ is the base inflation index value for the starting date T0.

• $b\left(0;{T}_{0},{T}_{i}\right)$ is the breakeven inflation rate for the ZCIS maturing on Ti.

The ZCIS rates typically have maturities that increase in whole number of years. So the inflation curve is built on an annual basis. From the annual basis inflation curve, the annual unadjusted (that is, not seasonally adjusted) forward inflation rates are computed as follows:

`${f}_{i}=\frac{1}{\left({T}_{i}-{T}_{i-1}\right)}\mathrm{log}\left(\frac{I\left(0,{T}_{i}\right)}{I\left(0,{T}_{i-1}\right)}\right)$`

The unadjusted forward inflation rates are used for interpolating and also for incorporating seasonality to the inflation curve.

For monthly periods that are not a whole number of years, seasonal adjustments can be made to reflect seasonal patterns of inflation within the year. These 12 monthly seasonal adjustments are annualized and they add up to zero to ensure that the cumulative seasonal adjustments are reset to zero every year.

`$\begin{array}{l}I\left(0,{T}_{i}\right)=I\left({T}_{0}\right)\mathrm{exp}\left(\underset{{T}_{0}}{\overset{{T}_{i}}{\int }}f\left(u\right)du\right)\right)\mathrm{exp}\left(\underset{{T}_{0}}{\overset{{T}_{i}}{\int }}s\left(u\right)du\right)\right)\\ I\left(0,{T}_{i}\right)=I\left(0,{T}_{i-1}\right)\mathrm{exp}\left(\left({T}_{i}-{T}_{i-1}\right)\left({f}_{i}+{s}_{i}\right)\right)\end{array}$`

where

• $I\left(0,{T}_{i}\right)$ is the breakeven inflation index reference number.

• $I\left(0,{T}_{i-1}\right)$ is the previous inflation reference number.

• fi is the annual unadjusted forward inflation rate.

• si is the annualized seasonal component for the period $\left[{T}_{i-1},{T}_{i}\right]$.

The first year seasonal adjustment may need special treatment, because typically, the breakeven inflation reference number of the first month is already known. If that is the case, the unadjusted forward inflation rate for the first year needs to be recomputed for the remaining 11 months.

## References

[1] Brody, D. C., Crosby, J., and Li, H. "Convexity Adjustments in Inflation-Linked Derivatives." Risk Magazine. November 2008, pp. 124–129.

[2] Kerkhof, J. "Inflation Derivatives Explained: Markets, Products, and Pricing." Fixed Income Quantitative Research, Lehman Brothers, July 2005.

[3] Zhang, J. X. "Limited Price Indexation (LPI) Swap Valuation Ideas." Wilmott Magazine. no. 57, January 2012, pp. 58–69.