%% Build Inflation Curve from Zero-Coupon Inflation Swap Rates
% This example shows the workflow to build an inflationcurve object from zero-coupon inflation swap (ZCIS) rates using inflationbuild.
% Define the inflation curve parameters.

BaseDate = datetime(2020,9,20);
BaseIndexValue = 100;
ZCISTimes = [calyears([1 2 3 4 5 7 10 20 30])]';
ZCISRates = [0.51 0.65 0.87 0.92 0.95 1.42 1.75 2.03 2.54]'./100;
ZCISDates = BaseDate + ZCISTimes;
SeasonalRates = [-0.19 -0.09 -0.04 0.1 0.16 0.11 0.26 0.17 -0.07 -0.08 -0.14 -0.19]'./100;

%
% Use inflationbuild to create an inflationcurve object.

myInflationCurve = inflationbuild(BaseDate,BaseIndexValue,ZCISDates,ZCISRates,'Seasonality',SeasonalRates)

% Copyright 2020 The MathWorks, Inc.