Main Content

indexvalues

Calculate index values for inflationcurve object

Description

example

outIndexValues = indexvalues(inpInflationCurve,inpDates) calculates the inflation index values for the inflationcurve object (inpInflationCurve) based on the Inflation index end dates (inpDates).

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);

Compute the index values using indexvalues.

outIndexValues = indexvalues(myInflationCurve,datetime(2023,9,20))
outIndexValues = 105

Input Arguments

collapse all

Inflation curve, specified using a previously created inflationcurve object.

Data Types: object

Inflation index end dates, specified as a vector of datetimes, serial date numbers, cell array of date character vectors, or string array.

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

Output Arguments

collapse all

Output inflation index values, returned as a numeric.

Introduced in R2021a