Skip to Main Content Skip to Search
Product Documentation

getDiscountFactors - Get discount factors for input dates for IRFunctionCurve

Class

@IRFunctionCurve

Syntax

F = getDiscountFactors(CurveObj, InpDates)

Arguments

CurveObj

Interest-rate curve object that is constructed using the IRFunctionCurve.

InpDates

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

Description

F = getDiscountFactors(CurveObj, InpDates) returns discount factors for the input dates.

Examples

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

    0.9984
    0.9967
    0.9950
    0.9933
    0.9916
    0.9899
    0.9881
    0.9864
    0.9846
    0.9828
    0.9810
    0.9792
    0.9773
    0.9755
    0.9736
    0.9717
    0.9698
    0.9679
    0.9660
    0.9641
    0.9621
    0.9602
    0.9582
    0.9562

How To

  


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-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS