| Contents | Index |
InstSet = instswap(InstSet, LegRate,
Settle, Maturity)
InstSet = instswap(InstSet, LegRate,
Settle, Maturity,
InstSet, LegReset,
Basis, Principal, LegType,
EndMonthRule)
[FieldList, ClassList, TypeString]
= instswap
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. | |
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 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) Day-count basis of the instrument. A vector of integers.
For more information, see basis. |
Principal | (Optional) NINST-by-1 vector or NINST-by-1 cell array of the notional principal amounts or principal value schedules. For the latter case, each element of the cell array is a NumDates-by-2 matrix where the first column is dates and the second column is its associated notional principal value. The date indicates the last day that the principal value is valid.. 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. |
EndMonthRule | (Optional) NINST-by-1 vector representing the End-of-month rule. Default = 1. |
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 [].
InstSet = instswap(InstSet, LegRate, Settle, Maturity) creates a new instrument set containing swap instruments or adds swap instruments to an existing instrument set.
InstSet = instswap(InstSet, LegRate, Settle, Maturity,InstSet, LegReset, Basis, Principal, LegType, EndMonthRule) uses optional input arguments to create a new instrument set containing swap instruments or adds swap instruments to an existing instrument set.
[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'.
In an amortizing swap, the notional principal decreases periodically because it is tied to an underlying financial instrument with a declining (amortizing) principal balance, such as a mortgage.
Create a vanilla swap using market data.
Use the following market data to create a swap instrument.
LegRate = [0.065, 0] Settle = 'jan-1-2007'; Maturity = 'jan-1-2012'; LegReset = [1, 1]; Basis = 0 Principal = 100 LegType = [1, 0] InstSet = instswap(LegRate, Settle, Maturity, LegReset, Basis, Principal, LegType);
View the swap instrument using instdisp.
instdisp(InstSet)
Index Type LegRate Settle Maturity LegReset Basis Principal LegType 1 Swap [0.065 0] 01-Jan-2007 01-Jan-2012 1 1 0 100 [1 0]
Create an amortizing swap from market data.
TBD
hjmprice | instaddfield | instbond | instcap | instdisp | instfloor | intenvprice
View demos and recorded presentations led by industry experts.
Now On Demand
Network with industry peers and learn the latest applications of the leading software product for computational finance.
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |