%% Calculate Zero Rates for parametercurve Object
% Create a parametercurve object using parametercurve.

PCobj = parametercurve('zero',datetime(2019,9,15),@(t)polyval([-0.0001 0.003 0.02],t),'Compounding',4,'Basis',5,'Parameters',[-0.0001 0.003 0.02])

% Compute the zero rates using zerorates.

CurveSettle = datetime(2019,9,15);
outRates = zerorates(PCobj,CurveSettle+30:30:CurveSettle+720)

% Copyright 2019 The MathWorks, Inc.