%% Compute Par Yields From a Curve With Simple Interest Compounding
% This example shows how set the compounding of an IRDataCurve to Zero (simple interest) and then compute par yields from that curve.

CurveSettle = datenum('2-Mar-2016');
Data = [2.09 2.47 2.71 3.12 3.43 3.85 4.57 4.58]/100;
Dates = datemnth(CurveSettle,12*[1 2 3 5 7 10 20 30]);
irdc = IRDataCurve('Zero',CurveSettle,Dates,Data,'Compounding',0);
SimpleInt = irdc.getParYields(Dates(1), 'Basis', 2, 'Compounding', 1)

% Copyright 2018 The MathWorks, Inc.