Financial Derivatives Toolbox    
intenvset

Set properties of interest rate environment

Syntax

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.

Compounding
Scalar value representing the rate at which the input zero rates were compounded when annualized. Default = 2. This argument determines the formula for the discount factors:
Compounding = 1, 2, 3, 4, 6, 12
Disc = (1 + Z/F)^(-T), where F is the compounding frequency, Z is the zero rate, and T is the time in periodic units, e.g. T = F is one year.
Compounding = 365
Disc = (1 + Z/F)^(-T), where F is the number of days in the basis year and T is a number of days elapsed computed by basis.
Compounding = -1
Disc = exp(-T*Z), where T is time in years.
Disc
Number of points (NPOINTS) by number of curves (NCURVES) matrix of unit bond prices over investment intervals from StartDates, when the cash flow is valued, to EndDates, when the cash flow is received.
Rates
Number of points (NPOINTS) by number of curves (NCURVES) matrix of rates in decimal form. For example, 5% is 0.05 in Rates. Rates are the yields over investment intervals from StartDates, when the cash flow is valued, to EndDates, when the cash flow is received.
EndDates
NPOINTS-by-1 vector or scalar of serial maturity dates ending the interval to discount over.
StartDates
NPOINTS-by-1 vector or scalar of serial dates starting the interval to discount over.
Default = ValuationDate.
ValuationDate
(Optional) Scalar value in serial date number form representing the observation date of the investment horizons entered in StartDates and EndDates. Default = min(StartDates).
Basis
(Optional) Day-count basis of the bond. A vector of integers.
0 = actual/actual (default), 1 = 30/360, 2 = actual/360,
3 = actual/365.
EndMonthRule
(Optional) End-of-month rule. A vector. This rule applies only when Maturity is an end-of-month date for a month having 30 or fewer days. 0 = ignore rule, meaning that a bond's coupon payment date is always the same numerical day of the month. 1 = set rule on (default), meaning that a bond's coupon payment date is always the last actual day of the month.

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 [].

intenvset with no input or output arguments displays a list of parameter names and possible values.

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.

Now change the Compounding parameter to 1 (annual).

Calling intenvset with no input or output arguments displays a list of parameter names and possible values.

See Also

intenvget


  intenvsens isafin