Main Content

instdisp

Display instruments

Description

CharTable = instdisp(InstSet) creates a character array displaying the contents of an instrument collection InstSet. If instdisp is called without an output argument, the table is displayed in the Command Window.

Note

When using instdisp, a value of NaN in one of the columns for an instrument indicates that the default value for that parameter will be used in the instrument’s pricing function.

example

Examples

collapse all

Retrieve the instrument set variable ExampleInst from the data file InstSetExamples.mat. ExampleInst contains three types of instruments: Option, Futures, and TBill.

load InstSetExamples; 
instdisp(ExampleInst)
Index Type   Strike Price Opt  Contracts
1     Option  95    12.2  Call     0    
2     Option 100     9.2  Call     0    
3     Option 105     6.8  Call  1000    
 
Index Type    Delivery       F     Contracts
4     Futures 01-Jul-1999    104.4 -1000    
 
Index Type   Strike Price Opt  Contracts
5     Option 105     7.4  Put  -1000    
6     Option  95     2.9  Put      0    
 
Index Type  Price Maturity       Contracts
7     TBill 99    01-Jul-1999    6        
 

Create a swap instrument and use instdisp to display the instrument. Notice that value of NaN in two columns for this instrument indicates that the default values for LegReset and LegType parameters will be used in the swap instrument’s pricing function.

LegRate1 = [0.065, 0];
Settle1 = datetime(2007,1,1);
Maturity1 = datetime(2012,1,1);

ISet = instswap(LegRate1, Settle1, Maturity1);
instdisp(ISet) 
Index Type LegRate    Settle         Maturity       LegReset Basis Principal LegType EndMonthRule StartDate
1     Swap [0.065  0] 01-Jan-2007    01-Jan-2012    [NaN]    0     100       [NaN]   1            NaN      
 

Input Arguments

collapse all

Instrument variable for a collection of instruments, specified as an instrument set structure. Instruments are classified by type; each type can have different data fields. The stored data field is a row vector or character vector for each instrument. For more information on the InstSet variable, see instget.

Data Types: struct

Output Arguments

collapse all

Table of instruments, returned as a character array. For each instrument row, the Index and Type are printed along with the field contents. Field headers are printed at the tops of the columns.

Version History

Introduced before R2006a