Documentation

This is machine translation

Translated by Microsoft
Mouse over text to see original. Click the button below to return to the English verison of the page.

getZeroRates

Get zero rates for input dates for IRDataCurve

Syntax

F = getZeroRates(CurveObj, InpDates)
F = getZeroRates(CurveObj, InpDates, 'Parameter1',
Value1, 'Parameter2', Value2, ...)

Arguments

CurveObj

Interest-rate curve object that is constructed using IRDataCurve.

InpDates

Vector of input dates using MATLAB® date format. The input dates must be after the settle date.

Compounding

(Optional) Scalar that sets the compounding frequency per year for zero rates. The default Compounding value is CurveObj.Compounding. Acceptable values are:

  • −1 = Continuous compounding

  • 0 = Simple interest (no compounding)

  • 1 = Annual compounding

  • 2 = Semiannual compounding

  • 3 = Compounding three times per year

  • 4 = Quarterly compounding

  • 6 = Bimonthly compounding

  • 12 = Monthly compounding

Basis

(Optional) Day-count basis values for zero rates:

  • 0 = actual/actual (default)

  • 1 = 30/360 (SIA)

  • 2 = actual/360

  • 3 = actual/365

  • 4 = 30/360 (BMA)

  • 5 = 30/360 (ISDA)

  • 6 = 30/360 (European)

  • 7 = actual/365 (Japanese)

  • 8 = actual/actual (ICMA)

  • 9 = actual/360 (ICMA)

  • 10 = actual/365 (ICMA)

  • 11 = 30/360E (ICMA)

  • 12 = actual/365 (ISDA)

  • 13 = BUS/252

For more information, see basis.

Description

F = getZeroRates(CurveObj, InpDates, 'Parameter1', Value1, 'Parameter2', Value2, ...) returns zero rates for the input dates. You must enter the optional arguments for Basis and Compounding as parameter/value pairs.

Examples

collapse all

This example shows how to get zero rates for input dates for an IRDataCurve.

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);
getZeroRates(irdc, CurveSettle+30:30:CurveSettle+720)
ans =

    0.0174
    0.0177
    0.0180
    0.0183
    0.0187
    0.0190
    0.0193
    0.0196
    0.0199
    0.0202
    0.0205
    0.0208
    0.0212
    0.0215
    0.0218
    0.0221
    0.0224
    0.0227
    0.0230
    0.0233
    0.0237
    0.0240
    0.0243
    0.0246

Related Examples

See Also

Introduced in R2008b

Was this topic helpful?