Get forward rates for input dates for IRDataCurve
F = getForwardRates(CurveObj,InpDates) F = getForwardRates(CurveObj,InpDates,Name,Value)
CurveObj | Interest-rate curve object that is constructed using |
InpDates | Vector of input dates using MATLAB® date format. The input dates must be after the settle date. |
Compounding | (Optional) Scalar that sets the compounding frequency
per year for forward rates. The default
|
Basis | (Optional) Day-count basis values for the forward rates:
For more information, see Basis. |
F = getForwardRates(CurveObj,InpDates,Name,Value)
returns forward rates for
the input dates. getForwardRates
returns discrete forward rates for
the intervals input into this method. For example, running the following
code:
getForwardRates(irdc, {Date1, Date2, Date3})
[Settle, Date1]
,
[Date1, Date2]
, and [Date2, Date3]
. You must enter the optional arguments for Basis
and
Compounding
as comma-separated pairs of
Name
,Value
arguments. Name
is the argument name and Value
is the corresponding value.
Name
must appear inside quotes. You can specify several name and
value pair arguments in any order as
Name1
,Value1
,...,NameN
,ValueN
.
The getForwardRates
method returns forward rates corresponding to
the periodicity of the dates input to getForwardRates
. For example,
where the dates are monthly, monthly forward rates are returned. The first element of
the output is the forward rate from the Settle
to one month, the
second element is the forward rate from one month to two months, and so on.