Financial Derivatives Toolbox | ![]() ![]() |
Set properties of interest rate environment
Syntax
[RateSpec, RateSpecOld] = intenvset(RateSpec, 'Parameter1', Value1, 'Parameter2', Value2, ...) [RateSpec, RateSpecOld] = intenvset intenvset
Arguments
RateSpec |
(Optional) An existing interest rate specification structure to be changed, probably created from a previous call to intenvset . |
Parameters may be chosen from the table below and specified in any order.
It is sufficient to type only the leading characters that uniquely identify the parameter. Case is ignored for parameter names.
When creating a new RateSpec
, the set of parameters passed to intenvset
must include StartDates
, EndDates
, and either Rates
or Disc
.
Call intenvset
with no input or output arguments to display a list of parameter names and possible values.
Description
[RateSpec, RateSpecOld] = intenvset(RateSpec, 'Parameter1', Value1,
'Parameter2', Value2, ...)
creates an interest term structure (RateSpec
) in which the input argument list is specified as parameter name /parameter value pairs. The parameter name portion of the pair must be recognized as a valid field of the output structure RateSpec
; the parameter value portion of the pair is then assigned to its paired field.
If the optional argument RateSpec
is specified, intenvset
modifies an existing interest term structure RateSpec
by changing the named parameters to the specified values and recalculating the parameters dependent on the new values.
[RateSpec, RateSpecOld] = intenvset
creates an interest term structure RateSpec
with all fields set to []
.
with no input or output arguments displays a list of parameter names and possible values. intenvset
RateSpecOld
is a structure encapsulating the properties of an interest rate structure prior to the changes introduced by the call to intenvset
.
Examples
Use intenvset
to create a RateSpec
.
RateSpec = intenvset('Rates', 0.05, 'StartDates',... '20-Jan-2000', 'EndDates', '20-Jan-2001') RateSpec = FinObj: 'RateSpec' Compounding: 2 Disc: 0.9518 Rates: 0.0500 EndTimes: 2 StartTimes: 0 EndDates: 730871 StartDates: 730505 ValuationDate: 730505 Basis: 0 EndMonthRule: 1
Now change the Compounding
parameter to 1
(annual).
RateSpec = intenvset(RateSpec, 'Compounding', 1) RateSpec = FinObj: 'RateSpec' Compounding: 1 Disc: 0.9518 Rates: 0.0506 EndTimes: 1 StartTimes: 0 EndDates: 730871 StartDates: 730505 ValuationDate: 730505 Basis: 0 EndMonthRule: 1
Calling intenvset
with no input or output arguments displays a list of parameter names and possible values.
intenvset Compounding: [ 1 | {2} | 3 | 4 | 6 | 12 | 365 | -1 ] Disc: [ scalar | vector (NPOINTS x 1) ] Rates: [ scalar | vector (NPOINTS x 1) ] EndDates: [ scalar | vector (NPOINTS x 1) ] StartDates: [ scalar | vector (NPOINTS x 1) ] ValuationDate: [ scalar ] Basis: [ {0} | 1 | 2 | 3 ] EndMonthRule: [ 0 | {1} ]
See Also
![]() | intenvsens | isafin | ![]() |