IRDataCurve - Construct interest-rate curve object from dates and data

Class

@IRDataCurve

Syntax

CurveObj = IRDataCurve(Type, Settle)
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 or column vector of settlement dates.

Dates

(Optional) Dates corresponding to rate data.

Data

(Optional) Interest-rate data for the curve object.

Compounding

(Optional) Compounding value for the IRDataCurve object:

  • -1

  • 1

  • 2 (default)

  • 3

  • 4

  • 6

  • 12

Basis

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

  • 0 = actual/actual (default)

  • 1 = 30/360 (SIA)

  • 2 = actual/360

  • 3 = actual/365

  • 4 = 30/360 (PSA)

  • 5 = 30/360 (ISDA)

  • 6 = 30/360 (European)

  • 7 = actual/365 (Japanese)

  • 8 = actual/actual (ISMA)

  • 9 = actual/360 (ISMA)

  • 10 = actual/365 (ISMA)

  • 11 = 30/360E (ISMA)

  • 12 = actual/365 (ISDA)

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 optionally 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 Derivatives 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

See Also

@IRCurve

  


 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS