Documentation

getDiscountFactors

Get discount factors for input dates for IRDataCurve

Syntax

F = getDiscountFactors(CurveObj, InpDates)

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.

Description

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

Examples

collapse all

Get Discount Factors For Input Dates for an IRDataCurve

This example shows how to get discount factors for input dates for an IRDataCurve.

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

    0.9986
    0.9971
    0.9956
    0.9940
    0.9924
    0.9907
    0.9890
    0.9873
    0.9854
    0.9836
    0.9817
    0.9798
    0.9778
    0.9757
    0.9736
    0.9715
    0.9693
    0.9671
    0.9649
    0.9626
    0.9602
    0.9578
    0.9554
    0.9529

Related Examples

See Also

Introduced in R2008b

Was this topic helpful?