Documentation Center

  • Trial Software
  • Product Updates

instcompound

Construct compound option

Syntax

InstSet = instcompound(InstSet, UOptSpec, UStrike, USettle,
UExerciseDates, UAmericanOpt, COptSpec, CStrike, CSettle,
CExerciseDates, CAmericanOpt)
[FieldList, ClassList, TypeString] = instcompound

Arguments

InstSet

Instrument variable. This argument is specified only when adding compound instruments to an existing instrument set. See instget for more information on the InstSet variable.

UOptSpec

String = 'Call' or 'Put'.

UStrike

1-by-1 vector of strike price values.

USettle

1-by-1 vector of Settle dates.

UExerciseDates

For a European option (UAmericanOpt = 0):

1-by-1 vector of exercise dates. For a European option, there is only one exercise date, the option expiry date.

For an American option (UAmericanOpt = 1):

1-by-2 vector of exercise date boundaries. The option can be exercised on any tree date. If only one non-NaN date is listed, or if ExerciseDates is 1-by-1, the option can be exercised between the valuation date of the stock tree and the single listed exercise date.

UAmericanOpt

If UAmericanOpt = 0, NaN, or is unspecified, the option is a European option. If UAmericanOpt = 1, the option is an American option.

COptSpec

NINST-by-1 list of string values 'Call' or 'Put' of the compound option.

CStrike

NINST-by-1 vector of strike price values. Each row is the schedule for one option.

CSettle

1-by-1 vector containing the settlement or trade date.

CExerciseDates

For a European option (CAmericanOpt = 0):

NINST-by-1 vector of exercise dates. Each row is the schedule for one option. For a European option, there is only one exercise date, the option expiry date.

For an American option (CAmericanOpt = 1):

NINST-by-2 vector of exercise date boundaries. For each instrument, the option can be exercised on any tree date between or including the pair of dates on that row. If only one non-NaN date is listed, or if ExerciseDates is NINST-by-1, the option can be exercised between the valuation date of the stock tree and the single listed exercise date.

CAmericanOpt

If CAmericanOpt = 0, NaN, or is unspecified, the option is a European option. If CAmericanOpt = 1, the option is an American option.

Description

InstSet = instcompound(InstSet, UOptSpec, UStrike, USettle,
UExerciseDates, UAmericanOpt, COptSpec, CStrike, CSettle,
CExerciseDates, CAmericanOpt)
specifies a compound option.

[FieldList, ClassList, TypeString] = instcompound 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 compound option instrument, TypeString = 'Compound'.

Examples

expand all

Create a Compound Option Instrument

Define a compound option instrument with the following data:

UOptSpec = 'Call';
UStrike = 130;
USettle = '01-Jan-2012';
UExerciseDates = '01-Jan-2015';
UAmericanOpt = 0;
COptSpec = 'Put';
CStrike = 5;
CSettle = '01-Jan-2012';
CExerciseDates = '01-Jan-2014';
CAmericanOpt = 0;

InstSet = instcompound(UOptSpec, UStrike, USettle,UExerciseDates, ...
UAmericanOpt, COptSpec, CStrike, CSettle,CExerciseDates, CAmericanOpt)

InstSet = instcompound(UOptSpec, UStrike, USettle,UExerciseDates, ...
UAmericanOpt, COptSpec, CStrike, CSettle,CExerciseDates)
InstSet = 

        FinObj: 'Instruments'
    IndexTable: [1x1 struct]
          Type: {'Compound'}
     FieldName: {{10x1 cell}}
    FieldClass: {{10x1 cell}}
     FieldData: {{10x1 cell}}


InstSet = 

        FinObj: 'Instruments'
    IndexTable: [1x1 struct]
          Type: {'Compound'}
     FieldName: {{10x1 cell}}
    FieldClass: {{10x1 cell}}
     FieldData: {{10x1 cell}}

Display the instrument set.

instdisp(InstSet)
Index Type     UOptSpec UStrike USettle        UExerciseDates UAmericanOpt COptSpec CStrike CSettle        CExerciseDates CAmericanOpt
1     Compound Call     130     01-Jan-2012    01-Jan-2015    0            Put      5       01-Jan-2012    01-Jan-2014    0           
 

See Also

| |

Was this topic helpful?