Main Content

Inflation

Create Inflation pricer object for InflationBond, YearYearInflationSwap, or ZeroCouponInflationSwap instrument using inflationcurve model

Since R2021a

Description

Create and price an InflationBond, YearYearInflationSwap, or ZeroCouponInflationSwap instrument object with an inflationcurve model and an Inflation pricing method using this workflow:

  1. Use fininstrument to create an InflationBond, YearYearInflationSwap, or ZeroCouponInflationSwap instrument object.

  2. Use inflationcurve to specify an inflation curve object.

  3. Create an interest-rate curve object using ratecurve.

  4. Use finpricer to specify the Inflation pricer object for the InflationBond, YearYearInflationSwap, or ZeroCouponInflationSwap instrument 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 for an InflationBond, YearYearInflationSwap, or ZeroCouponInflationSwap instrument, see Choose Instruments, Models, and Pricers.

Creation

Description

InflationPricerObj = finpricer(PricerType,'DiscountCurve',ratecurve_obj,'InflationCurve',inflationcurve_obj) creates an Inflation pricer object by specifying PricerType and the required name-value pair arguments DiscountCurve and InflationCurve to set properties using name-value pairs. For example, InflationPricerObj = finpricer("Inflation",'DiscountCurve',ZeroCurve,'InflationCurve',myInflationCurve) creates an Inflation pricer object.

example

Input Arguments

expand all

Pricer type, specified as a string with the value of "Inflation" or a character vector with the value of 'Inflation'.

Data Types: char | string

Name-Value Arguments

Specify required 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: InflationPricerObj = finpricer("Inflation",'DiscountCurve',ZeroCurve,'InflationCurve',myInflationCurve)

ratecurve object for discounting cash flows, specified as the comma-separated pair consisting of 'DiscountCurve' and the name of a previously created ratecurve object.

Data Types: object

Inflation curve, specified as the comma-separated pair consisting of 'InflationCurve' and the name of the previously created inflationcurve.

Data Types: object

Properties

expand all

ratecurve object for discounting cash flows, returned as a ratecurve object.

Data Types: object

Inflation curve, returned as an inflationcurve object.

Data Types: object

Object Functions

priceCompute price for inflation instrument with Inflation pricer

Examples

collapse all

This example shows the workflow to price an InflationBond 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 InflationBond Instrument Object

Use fininstrument to create an InflationBond instrument object.

IssueDate = datetime(2021,1,1);
Maturity = datetime(2026,1,1);
CouponRate = 0.02;

InflationBond = fininstrument("InflationBond",'IssueDate',IssueDate,'Maturity',Maturity,'CouponRate',CouponRate,'Name',"inflation_bond_instrument")
InflationBond = 
  InflationBond with properties:

                  CouponRate: 0.0200
                      Period: 2
                       Basis: 0
                   Principal: 100
    DaycountAdjustedCashFlow: 0
                         Lag: 3
                  IssueIndex: NaN
       BusinessDayConvention: "actual"
                    Holidays: NaT
                EndMonthRule: 1
                   IssueDate: 01-Jan-2021
             FirstCouponDate: NaT
              LastCouponDate: NaT
                    Maturity: 01-Jan-2026
                        Name: "inflation_bond_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 InflationBond Instrument

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

[Price,outPR] = price(outPricer,InflationBond)
Price = 
112.1856
outPR = 
  priceresult with properties:

       Results: [1x1 table]
    PricerData: []

outPR.Results
ans=table
    Price 
    ______

    112.19

Version History

Introduced in R2021a