Construct interest-rate curve object from dates and data
CurveObj = IRDataCurve(Type,Settle,Dates,Data) CurveObj = IRDataCurve(Type,Settle,Dates,Data,Name,Value)
Type | Type of interest-rate curve. Acceptable values are |
Settle | Scalar for the |
Dates | Dates corresponding to rate data. |
Data | Interest-rate data for the curve object. |
Compounding | (Optional) Scalar that sets the compounding frequency
per year for the
Note Simple interest can be specified for an instrument by specifying
the
|
Basis | (Optional) Day-count basis of the interest-rate curve. A scalar of integers.
For more information, see Basis. |
InterpMethod | (Optional) Values are:
|
CurveObj = IRDataCurve(Type,Settle,Dates,Data,Name,Value)
constructs an
interest-rate curve with the specified Dates
and
Data
. You must enter the optional arguments for
Basis
, Compounding
, and
InterpMethod
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
.
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.
Method | Description |
---|---|
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 |
bootstrap | Bootstraps an interest rate curve from market data. |
CurveSettle = datenum('2-Mar-2016'); Data = [2.09 2.47 2.71 3.12 3.43 3.85 4.57 4.58]/100; Dates = datemnth(CurveSettle,12*[1 2 3 5 7 10 20 30]); irdc = IRDataCurve('Zero',CurveSettle,Dates,Data)
irdc = Type: Zero Settle: 736391 (02-Mar-2016) Compounding: 2 Basis: 0 (actual/actual) InterpMethod: linear Dates: [8x1 double] Data: [8x1 double]