Products & Services Solutions Academia Support User Community Company

Learn more about Fixed-Income Toolbox   

getParYields - Get par yields for input dates for IRFunctionCurve

Class

@IRFunctionCurve

Syntax

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

Arguments

CurveObj

Interest-rate curve object that is constructed using IRFunctionCurve.

InpDates

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

Compounding

(Optional) Compounding values for par yield rates:

  • -1

  • 1

  • 2

  • 3

  • 4

  • 6

  • 12

Basis

(Optional) Day-count basis values for par yield rates:

  • 0 = actual/actual

  • 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)

  • 13 = BUS/252

Description

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

Examples

irfc = IRFunctionCurve('Forward',today,@(t) polyval([-0.0001 0.003 0.02],t));
irfc.getParYields(today+30:30:today+720)
ans =

    0.0202
    0.0205
    0.0205
    0.0207
    0.0207
    0.0209
    0.0210
    0.0209
    0.0211
    0.0212
    0.0213
    0.0214
    0.0216
    0.0217
    0.0218
    0.0220
    0.0220
    0.0222
    0.0223
    0.0223
    0.0225
    0.0226
    0.0227
    0.0228

See Also

@IRFunctionCurve

  


Free Interactive Computational Finance CD

View demos and recorded presentations led by industry experts.

Now On Demand
Network with industry peers and learn the latest applications of the leading software product for computational finance.

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