Main Content

YearYearInflationSwap

YearYearInflationSwap instrument object

Since R2021a

Description

Create and price a YearYearInflationSwap instrument object for one or more Year-on-Year Inflation-Indexed Swap instruments using either of these two workflows.

When using an Inflation pricing method:

  1. Use fininstrument to create a YearYearInflationSwap instrument object for one or more Year-on-Year Inflation-Indexed Swap instruments.

  2. Use ratecurve to specify an interest-rate model for the YearYearInflationSwap instrument object.

  3. Use inflationcurve to specify an inflation curve model.

  4. Use finpricer to specify an Inflation pricing method for one or more YearYearInflationSwap instruments.

  5. Use inflationCashflows to compute cash flows for each one of the YearYearInflationSwap instruments.

When using an JarrowYildirim pricing method:

  1. Use fininstrument to create a YearYearInflationSwap instrument object for one or more Year-on-Year Inflation-Indexed Swap instruments and specify the IssueIndex name-value argument.

  2. Use finmodel to specify a JarrowYildirim model object for the YearYearInflationSwap instrument object.

  3. Use ratecurve to specify a NominalCurve interest-rate model for the YearYearInflationSwap instrument object.

  4. Use ratecurve to specify a RealCurve interest-rate model for the YearYearInflationSwap instrument object.

  5. Use finpricer to specify a JarrowYildirim pricing method for one or more YearYearInflationSwap instruments.

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 models and pricing methods for a YearYearInflationSwap instrument, see Choose Instruments, Models, and Pricers.

Creation

Description

YYInflationSwap = fininstrument(InstrumentType,'Maturity',maturity_date,'Notional',notional_value,'FixedInflationRate',inflation_rate) creates a YearYearInflationSwap object for one or more Year-on-Year Inflation-Indexed Swap instruments by specifying InstrumentType and sets the properties for the required name-value pair arguments Maturity, Notional, and FixedInflationRate.

example

YYInflationSwap = fininstrument(___,Name,Value) sets optional properties using additional name-value pairs in addition to the required arguments in the previous syntax. For example, YYInflationSwap = fininstrument("YearYearInflationSwap",'Maturity',Maturity,'FixedInflationRate',FixedInflationRate,'Notional',Notional,'Basis',4,'Lag',4) creates a YearYearInflationSwap option. You can specify multiple name-value pair arguments.

example

Input Arguments

expand all

Instrument type, specified as a string with the value of "YearYearInflationSwap", a character vector with the value of 'YearYearInflationSwap', an NINST-by-1 string array with values of "YearYearInflationSwap", or an NINST-by-1 cell array of character vectors with values of 'YearYearInflationSwap'.

Data Types: char | cell | string

Name-Value Arguments

Specify required and optional pairs of arguments as Name1=Value1,...,NameN=ValueN, where Name is the argument name and Value is the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

Before R2021a, use commas to separate each name and value, and enclose Name in quotes.

Example: YYInflationSwap = fininstrument("YearYearInflationSwap",'Maturity',Maturity,'FixedInflationRate',FixedInflationRate,'Notional',Notional,'Basis',4,'Lag',4)

Required YearYearInflationSwap Name-Value Pair Arguments

expand all

Swap maturity date, specified as the comma-separated pair consisting of 'Maturity' and a scalar or an NINST-by-1 vector using a datetime array, string array, or date character vectors.

To support existing code, YearYearInflationSwap also accepts serial date numbers as inputs, but they are not recommended.

If you use date character vectors or strings, the format must be recognizable by datetime because the Maturity property is stored as a datetime.

Notional amount, specified as the comma-separated pair consisting of 'Notional' and a scalar numeric or an NINST-by-1 numeric vector.

Data Types: double

Inflation rate, specified as the comma-separated pair consisting of 'FixedInflationRate' and a scalar decimal or an NINST-by-1 vector of decimals.

Data Types: double

Optional YearYearInflationSwap Name-Value Pair Arguments

expand all

Day count basis for the fixed leg, specified as the comma-separated pair consisting of 'Basis' and a scalar integer or an NINST-by-1 vector of integers for the following:

  • 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

For more information, see Basis.

Data Types: double

Indexation lag in months, specified as the comma-separated pair consisting of 'Lag' and a scalar numeric or an NINST-by-1 numeric vector.

Data Types: double

Inflation index at issue date, specified as the comma-separated pair consisting of 'IssueIndex' and a scalar numeric or an NINST-by-1 vector of numeric values. For example, the IssueIndex for the inflation index depends on the country and can be from any of the following:

  • US — CPI (US Consumer Price Index Urban Consumers (CPI-U))

  • UK — RPI (UK Retail Price Index (RPI)

  • Canada — CPI (Canada All-Items Consumer Price Index)

  • European Union (EU) — HICP-ex Tobacco (EU Harmonized Indices of Consumer Prices (HICP) ex Tobacco)

  • Japan — CPI (Japan Consumer Price Index)

  • China — CPI (China Consumer Price Index)

Note

  • If you specify an Inflation pricing method with an YearYearInflationSwap instrument and you have specified an IssueIndex value, the Inflation pricing method overrides the index value (InflationIndexValues) for the issue date (Dates) in the inflationcurve model object.

  • If you use the JarrowYildirim pricing method with a YearYearInflationSwap instrument, you must specify an IssueIndex value. The only exception to this requirement that you must specify an IssueIndex value is when the NominalCurve.Settle date of the JarrowYildirim pricer is exactly one year from the next annual payoff date of the YearYearInflationSwap instrument.

Data Types: double

User-defined name for the instrument, specified as the comma-separated pair consisting of 'Name' and a scalar string or character vector or an NINST-by-1 cell array of character vectors or string array.

Data Types: char | cell | string

Properties

expand all

Swap maturity date, returned as a scalar datetime or an NINST-by-1 vector of datetimes.

Data Types: datetime

Notional amount, returned as a scalar numeric or an NINST-by-1 numeric vector.

Data Types: double

Inflation rate, returned as a scalar decimal or an NINST-by-1 vector of decimals.

Data Types: double

Day count basis for fixed leg, returned as a scalar integer or an NINST-by-1 vector of integers.

Data Types: double

Indexation lag in months, returned as a scalar numeric or an NINST-by-1 numeric vector.

Data Types: double

Inflation index at issue date, returned as a scalar numeric or an NINST-by-1 vector of numeric values.

Note

  • If you specify a JarrowYildirim pricing method, when pricing a YearYearInflationSwap instrument, you must specify the IssueIndex if the first accrual starting date occurs before the Settle date of the NominalCurve.

  • If you specify an Inflation pricing method with an ZeroCouponInflationSwap instrument and you have specified an IssueIndex value, the Inflation pricing method overrides the index value for the issue date in the inflationcurve model object.

Data Types: double

User-defined name for the instrument, returned as a scalar string or an NINST-by-1 string array.

Data Types: string

Object Functions

inflationCashflowsCompute cash flows for YearYearInflationSwap instrument

Examples

collapse all

This example shows the workflow to price a YearYearInflationSwap instrument when you use an inflationcurve object and an Inflation pricing method.

Create ratecurve Object

Create a ratecurve object using ratecurve.

Settle = datetime(2021,1,15);
Type = "zero";
ZeroTimes = [calmonths(6) calyears([1 2 3 4 5 7 10 20 30])]';
ZeroRates = [0.0052 0.0055 0.0061 0.0073 0.0094 0.0119 0.0168 0.0222 0.0293 0.0307]';
ZeroDates = Settle + ZeroTimes;
ZeroCurve = ratecurve('zero',Settle,ZeroDates,ZeroRates)
ZeroCurve = 
  ratecurve with properties:

                 Type: "zero"
          Compounding: -1
                Basis: 0
                Dates: [10x1 datetime]
                Rates: [10x1 double]
               Settle: 15-Jan-2021
         InterpMethod: "linear"
    ShortExtrapMethod: "next"
     LongExtrapMethod: "previous"

Create inflationcurve Object

Create an inflationcurve object using inflationcurve.

BaseDate = datetime(2020,10,1);
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]

Create YearYearInflationSwap Instrument Object

Use fininstrument to create a YearYearInflationSwap instrument object.

Maturity = datetime(2025,1,1);
FixedInflationRate = 0.015;
Notional = 2000;

YYInflationSwap = fininstrument("YearYearInflationSwap",'Maturity',Maturity,'FixedInflationRate',FixedInflationRate,'Notional',Notional,'Name',"YYInflationSwap_instrument")
YYInflationSwap = 
  YearYearInflationSwap with properties:

              Notional: 2000
    FixedInflationRate: 0.0150
                 Basis: 0
                   Lag: 3
              Maturity: 01-Jan-2025
            IssueIndex: NaN
                  Name: "YYInflationSwap_instrument"

Create Inflation Pricer Object

Use finpricer to create an Inflation pricer object and use the ratecurve object with the 'DiscountCurve' name-value pair argument and the inflationcurve object with the 'InflationCurve' name-value pair argument.

outPricer = finpricer("Inflation",'DiscountCurve',ZeroCurve,'InflationCurve',myInflationCurve)
outPricer = 
  Inflation with properties:

     DiscountCurve: [1x1 ratecurve]
    InflationCurve: [1x1 inflationcurve]

Price YearYearInflationSwap Instrument

Use price to compute the price and sensitivities for the YearYearInflationSwap instrument.

[Price,outPR] = price(outPricer,YYInflationSwap,"all")
Price = 
12.5035
outPR = 
  priceresult with properties:

       Results: [1x1 table]
    PricerData: []

outPR.Results
ans=table
    Price 
    ______

    12.504

This example shows the workflow to price multiple YearYearInflationSwap instruments when you use an inflationcurve object and an Inflation pricing method.

Create ratecurve Object

Create a ratecurve object using ratecurve.

Settle = datetime(2021,1,15);
Type = "zero";
ZeroTimes = [calmonths(6) calyears([1 2 3 4 5 7 10 20 30])]';
ZeroRates = [0.0052 0.0055 0.0061 0.0073 0.0094 0.0119 0.0168 0.0222 0.0293 0.0307]';
ZeroDates = Settle + ZeroTimes;
ZeroCurve = ratecurve('zero',Settle,ZeroDates,ZeroRates)
ZeroCurve = 
  ratecurve with properties:

                 Type: "zero"
          Compounding: -1
                Basis: 0
                Dates: [10x1 datetime]
                Rates: [10x1 double]
               Settle: 15-Jan-2021
         InterpMethod: "linear"
    ShortExtrapMethod: "next"
     LongExtrapMethod: "previous"

Create inflationcurve Object

Create an inflationcurve object using inflationcurve.

BaseDate = datetime(2019,10,1);
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]

Create YearYearInflationSwap Instrument Object

Use fininstrument to create a YearYearInflationSwap instrument object for three Year-on-Year Inflation-Indexed Swap instruments.

Maturity = datetime([2024,1,1 ; 2024,11,1 ; 2024,12,1]);
FixedInflationRate = 0.015;
Notional = [20000 ; 30000 ; 40000];

YYInflationSwap = fininstrument("YearYearInflationSwap",'Maturity',Maturity,'FixedInflationRate',FixedInflationRate,'Notional',Notional,'Name',"YYInflationSwap_instrument")
YYInflationSwap=3×1 YearYearInflationSwap array with properties:
    Notional
    FixedInflationRate
    Basis
    Lag
    Maturity
    IssueIndex
    Name

Create Inflation Pricer Object

Use finpricer to create an Inflation pricer object and use the ratecurve object with the 'DiscountCurve' name-value pair argument and the inflationcurve object with the 'InflationCurve' name-value pair argument.

outPricer = finpricer("Inflation",'DiscountCurve',ZeroCurve,'InflationCurve',myInflationCurve)
outPricer = 
  Inflation with properties:

     DiscountCurve: [1x1 ratecurve]
    InflationCurve: [1x1 inflationcurve]

Price YearYearInflationSwap Instruments

Use price to compute the prices and sensitivities for the YearYearInflationSwap instruments.

[Price,outPR] = price(outPricer,YYInflationSwap,"all")
Price = 3×1

   26.0701
   18.1540
    1.3201

outPR=1×3 priceresult array with properties:
    Results
    PricerData

outPR.Results
ans=table
    Price
    _____

    26.07

ans=table
    Price 
    ______

    18.154

ans=table
    Price 
    ______

    1.3201

This example shows the workflow to price a YearYearInflationSwap instrument when you use a JarrowYildirim model object and a JarrowYildirim pricing method.

Create YearYearInflationSwap Instrument Object

Use fininstrument to create a YearYearInflationSwap instrument object with an IssueIndex name-value argument. When pricing a YearYearInflationSwap instrument using a JarrowYildirim pricing method, you must specify an IssueIndex value.

Maturity = datetime(2025,1,1);
FixedInflationRate = 0.015;
Notional = 2000;

YYInflationSwap = fininstrument("YearYearInflationSwap",Maturity=Maturity,FixedInflationRate=FixedInflationRate,Notional=Notional,IssueIndex=0.045,Name="YYInflationSwap_instrument")
YYInflationSwap = 
  YearYearInflationSwap with properties:

              Notional: 2000
    FixedInflationRate: 0.0150
                 Basis: 0
                   Lag: 3
              Maturity: 01-Jan-2025
            IssueIndex: 0.0450
                  Name: "YYInflationSwap_instrument"

Create JarrowYildirim Object

Use finmodel to create an JarrowYildirim model object.

JarrowYildirimModelObj = finmodel("JarrowYildirim",NominalVolatility=0.008,RealVolatility=0.005,IndexVolatility=0.01,NominalConstant=0.04, ...
                          RealConstant=0.05,NominalRealCorrelation=0.015,RealIndexCorrelation=-0.32,NominalIndexCorrelation=0.08,CurrentIndex=101)
JarrowYildirimModelObj = 
  JarrowYildirim with properties:

          NominalVolatility: 0.0080
             RealVolatility: 0.0050
            IndexVolatility: 0.0100
            NominalConstant: 0.0400
               RealConstant: 0.0500
     NominalRealCorrelation: 0.0150
       RealIndexCorrelation: -0.3200
    NominalIndexCorrelation: 0.0800
               CurrentIndex: 101

Create JarrowYildirim Pricer Object

Use finpricer to create a JarrowYildirim pricer object and use a ratecurve object to create a NominalCurve and RealCurve and specify the JarrowYildirim object model object with the 'Model' name-value argument.

Settle = datetime(2023,10,1);
ZeroTimes = [calmonths(6) calyears([1 2 3 5 7 10 20 30])];
NominalRates = [4.70 4.68 4.14 3.83 3.56 3.51 3.48 3.77 3.66]'./100;
RealRates = [1.47 1.55 1.31 1.30 1.33 1.28 1.25 1.33 1.42]'./100;
ZeroDates = Settle + ZeroTimes;
NominalCurve = ratecurve("zero",Settle,ZeroDates,NominalRates);
RealCurve = ratecurve("zero",Settle,ZeroDates,RealRates);

JarrowYildirimPricer = finpricer("analytic",Model=JarrowYildirimModelObj, ...
                       NominalCurve=NominalCurve, RealCurve=RealCurve)
JarrowYildirimPricer = 
  JarrowYildirim with properties:

           Model: [1x1 finmodel.JarrowYildirim]
    NominalCurve: [1x1 ratecurve]
       RealCurve: [1x1 ratecurve]

Price YearYearInflationSwap Instrument

Use price to compute the price for the YearYearInflationSwap instrument.

Price = price(JarrowYildirimPricer,YYInflationSwap)
Price = 
4.4704e+06

This example shows the workflow to price multiple YearYearInflationSwap instruments when you use a JarrowYildirim model object and a JarrowYildirim pricing method.

Create YearYearInflationSwap Instrument Object

Use fininstrument to create a YearYearInflationSwap instrument object for three instances and include an IssueIndex name-value argument. When pricing YearYearInflationSwap instruments using a JarrowYildirim pricing method, you must specify an IssueIndex value.

Maturity = datetime([2024,1,1 ; 2024,11,1 ; 2024,12,1]);
FixedInflationRate = 0.015;
Notional = [20000 ; 30000 ; 40000];

YYInflationSwap = fininstrument("YearYearInflationSwap",Maturity=Maturity,FixedInflationRate=FixedInflationRate,Notional=Notional,IssueIndex=0.045,Name="YYInflationSwap_instrument")
YYInflationSwap=3×1 YearYearInflationSwap array with properties:
    Notional
    FixedInflationRate
    Basis
    Lag
    Maturity
    IssueIndex
    Name

Create JarrowYildirim Object

Use finmodel to create an JarrowYildirim model object.

JarrowYildirimModelObj = finmodel("JarrowYildirim",NominalVolatility=0.008,RealVolatility=0.005,IndexVolatility=0.01,NominalConstant=0.04, ...
                          RealConstant=0.05,NominalRealCorrelation=0.015,RealIndexCorrelation=-0.32,NominalIndexCorrelation=0.08,CurrentIndex=101)
JarrowYildirimModelObj = 
  JarrowYildirim with properties:

          NominalVolatility: 0.0080
             RealVolatility: 0.0050
            IndexVolatility: 0.0100
            NominalConstant: 0.0400
               RealConstant: 0.0500
     NominalRealCorrelation: 0.0150
       RealIndexCorrelation: -0.3200
    NominalIndexCorrelation: 0.0800
               CurrentIndex: 101

Create JarrowYildirim Pricer Object

Use finpricer to create a JarrowYildirim pricer object and use a ratecurve object to create a NominalCurve and RealCurve and specify the JarrowYildirim object model object with the 'Model' name-value argument.

Settle = datetime(2023,10,1);
ZeroTimes = [calmonths(6) calyears([1 2 3 5 7 10 20 30])];
NominalRates = [4.70 4.68 4.14 3.83 3.56 3.51 3.48 3.77 3.66]'./100;
RealRates = [1.47 1.55 1.31 1.30 1.33 1.28 1.25 1.33 1.42]'./100;
ZeroDates = Settle + ZeroTimes;
NominalCurve = ratecurve("zero",Settle,ZeroDates,NominalRates);
RealCurve = ratecurve("zero",Settle,ZeroDates,RealRates);

JarrowYildirimPricer = finpricer("analytic",Model=JarrowYildirimModelObj, ...
                       NominalCurve=NominalCurve, RealCurve=RealCurve)
JarrowYildirimPricer = 
  JarrowYildirim with properties:

           Model: [1x1 finmodel.JarrowYildirim]
    NominalCurve: [1x1 ratecurve]
       RealCurve: [1x1 ratecurve]

Price YearYearInflationSwap Instruments

Use price to compute the price for the three YearYearInflationSwap instruments.

Price = price(JarrowYildirimPricer,YYInflationSwap)
Price = 3×1
107 ×

    4.4703
    6.7220
    8.9518

More About

expand all

Algorithms

To price a year-on-year inflation-indexed swap (YYIIS), use an inflation curve and a nominal discount curve (model-free approach), where the cash flows are discounted using the nominal discount curve.

Cash flows for each year t={T1,...,Ti,...,TM}:FixedLeg=N×k×ΔtfixedInflationLeg=N×[I(Ti)I(Ti1)1]×Δtinflation

where

  • N is the reference notional of the swap.

  • k is the fixed inflation rate.

  • Δtfixed is the fixed leg fraction for the period.

  • Δtinflation is the inflation leg fraction for the period.

  • I(Ti) is the inflation index at the period end date with some lag (for example, three months).

  • I(Ti-1) is the inflation index at the start date with some lag (for example, three months).

To price a year-on-year inflation-indexed swap (YYIIS) using the JarrowYildirim and a JarrowYildirim pricing method:

YYIISFixedLeg(t,T,K,Ψ,N)=NKψι(t)Pn(t,Tι(t))+NKi=ι(t)+1MψiPn(t,Ti)YYIISInflationLeg(t,T,Ψ,N)=Nψι(t)[I(t)I(Tι(t)1)Pr(t,Tι(t))Pn(t,Tι(t))]+Ni=ι(t)+1Mψi[Pn(t,Ti1)Pr(t,Ti)Pr(t,Ti1)eC(t,Ti1,Ti)Pn(t,Ti)]C(t,Ti1,Ti)=σrBr(Ti1,Ti)×[Br(t,Ti1){ρr,IσIσrBr(t,Ti1)2+ρn,rσnan+ar[1+arBn(t,Ti1)]}ρn,rσnan+arBn(t,Ti1)]Br(Ti1,Ti)=1ear(TiTi1)arBr(t,Ti1)=1ear(Ti1t)arBn(t,Ti1)=1ean(Ti1t)an

where:

  • N is the notional value.

  • K is the fixed annual inflation rate.

  • T:={T1,...,TM} is the end dates for each period.

  • ψi is the year fraction between Ti-1 and Ti.

  • Ψ:={ψ1,...,ψM} is the year fractions for each period.

  • ι(t)=min{i:Ti>t} is the period index so that Tι(t)1t<Tι(t).

  • M is the maturity in years.

  • I(t) is the inflation index at t.

  • I(Tι(t)1) is the issue index at Tι(t)1.

  • Px(t,T) is the zero coupon price (where n is nominal and r is real).

  • σn is the nominal rate volatility (positive constant).

  • σr is the real rate volatility (positive constant).

  • σI is the inflation index volatility (positive constant).

  • ρr,I is the real rate and inflation index correlation.

  • ρn,r is the nominal rate and real rate correlation.

  • an, ar are the positive constants.

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] Mercurio, F. "Pricing Inflation-Indexed Derivatives." Quantitative Finance, Vol 5, Issue 3, pp.289-302, 2005.

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

Version History

Introduced in R2021a

expand all