Financial Derivatives Toolbox | ![]() ![]() |
Syntax
InstSet = instswap(InstSet, LegRate, Settle, Maturity, LegReset, Basis, Principal, LegType) [FieldList, ClassList, TypeString] = instswap
Arguments
InstSet |
Instrument variable. This argument is specified only when adding a swap to an existing instrument set. See instget for more information on the InstSet variable. |
LegRate |
Number of instruments (NINST )-by-2 matrix, with each row defined as: [CouponRate Spread] or [Spread CouponRate] CouponRate is the decimal annual rate. Spread is the number of basis points over the reference rate. The first column represents the receiving leg, while the second column represents the paying leg. |
Settle |
Settlement date. NINST -by-1 vector of serial date numbers or date strings. Settle must be earlier than or equal to Maturity . |
Maturity |
Maturity date. NINST -by-1 vector of dates representing the maturity date for each swap. |
LegReset |
(Optional) NINST -by-2 matrix representing the reset frequency per year for each swap. Default = [1 1] . |
Basis | (Optional) NINST -by-1 vector representing the basis used when annualizing the input forward rate tree. Default = 0 (actual/actual). |
Principal |
(Optional) NINST -by-1 vector of the notional principal amounts. Default = 100 . |
LegType |
(Optional) NINST -by-2 matrix. Each row represents an instrument. Each column indicates if the corresponding leg is fixed (1 ) or floating (0 ). This matrix defines the interpretation of the values entered in LegRate . Default is [1,0] for each instrument. |
Data arguments are number of instruments (NINST
)-by-1
vectors, scalar, or empty. Fill unspecified entries in vectors with NaN
. Only one data argument is required to create the instrument; the others may be omitted or passed as empty matrices []
.
Description
creates a new instrument set containing swap instruments or adds swap instruments to an existing instrument set.InstSet
= instswap(InstSet, LegRate, Settle, Maturity, LegReset,
Basis, Principal, LegType)
[FieldList, ClassList, TypeString] = instswap
displays the classes.
FieldList
is a number of fields (NFIELDS
)-by-1
cell array of strings listing the name of each data field for this instrument type.
ClassList
is an NFIELDS
-by-1
cell array of strings listing the data class of each field. The class determines how arguments are parsed. Valid strings are 'dble'
, 'date',
and 'char'
.
TypeString
is a string specifying the type of instrument added. For a swap instrument, TypeString = 'Swap'
.
See Also
hjmprice
, instaddfield
, instbond
, instcap
, instdisp
, instfloor
, intenvprice
![]() | instsetfield | insttypes | ![]() |