Documentation Center

  • Trial Software
  • Product Updates

IRDataCurve

Construct interest-rate curve object from dates and data

Syntax

CurveObj = IRDataCurve(Type, Settle,  Dates, Data)
CurveObj = IRDataCurve(Type, Settle, Dates, Data, 'Parameter1',
Value1, 'Parameter2', Value2, ...)

Arguments

Type

Type of interest-rate curve. Acceptable values are forward, zero, or discount.

Settle

Scalar for the Settle date of the curve.

Dates

Dates corresponding to rate data.

Data

Interest-rate data for the curve object.

Compounding

(Optional) Scalar that sets the compounding frequency per year for the IRDataCurve object:

  • -1 =  Continuous compounding

  • 1 = Annual compounding

  • 2 = Semiannual compounding (default)

  • 3 = Compounding three times per year

  • 4 = Quarterly compounding

  • 6 = Bimonthly compounding

  • 12 = Monthly compounding

Basis

(Optional) Day-count basis of the interest-rate curve. A scalar of integers.

  • 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/actual (ISDA)

  • 13 = BUS/252

For more information, see basis.

InterpMethod

(Optional) Values are:

  • 'linear' — Linear interpolation (default).

  • 'constant' — Piecewise constant interpolation.

  • 'pchip' — Piecewise cubic Hermite interpolation.

  • 'spline' — Cubic spline interpolation.

Description

CurveObj = IRDataCurve(Type, Settle, Dates, Data, 'Parameter1', Value1, 'Parameter2', Value2, ...) constructs an interest-rate curve with the specified Dates and Data. You must enter the optional arguments for Basis, Compounding, and InterpMethod as parameter/value pairs.

Alternatively, an IRDataCurve object can be bootstrapped from market data using the bootstrap method.

After an IRDataCurve curve object is constructed, you can use the following methods to determine the forward rates, zero rates, and discount factors. In addition, you can use the toRateSpec method to convert the interest-rate curve object to a RateSpec structure.

MethodDescription
getForwardRates

Returns forward rates for input dates.

getZeroRates

Returns zero rates for input dates.

getDiscountFactors

Returns discount factors for input dates.

getParYields

Returns par yields for input dates.

toRateSpec

Converts to be a RateSpec object; this structure is identical to the RateSpec produced by the Financial Instruments Toolbox™ function intenvset.

bootstrap

Bootstraps an interest rate curve from market data.

Examples

Data = [2.09 2.47 2.71 3.12 3.43 3.85 4.57 4.58]/100;
Dates = daysadd(today,[360 2*360 3*360 5*360 7*360 10*360 20*360 30*360],1);
irdc = IRDataCurve('Zero',today,Dates,Data)
irdc = 

  Properties:
           Dates: [8x1 double]
            Data: [8x1 double]
    InterpMethod: 'linear'
            Type: 'Zero'
          Settle: 733599
     Compounding: 2
           Basis: 0

More About

Was this topic helpful?