Documentation

instbarrier

Construct barrier option

Syntax

InstSet = instbarrier(InstSet, OptSpec, Strike, Settle,
ExerciseDates, AmericanOpt, BarrierSpec, Barrier, Rebate)
[FieldList, ClassList, TypeString] = instbarrier

Arguments

InstSet

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

OptSpec

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

Strike

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

Settle

NINST-by-1 vector of Settle dates.

ExerciseDates

For a European option (AmericanOpt = 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 (AmericanOpt = 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.

AmericanOpt

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

BarrierSpec

List of string values:

'UI': Up Knock In

'UO': Up Knock Out

'DI': Down Knock In

'DO': Down Knock Out

Barrier

Vector of barrier values.

Rebate

(Optional) Vector of rebate values.

Data arguments are 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

InstSet = instbarrier(InstSet, OptSpec, Strike, Settle,
ExerciseDates, AmericanOpt, BarrierSpec, Barrier, Rebate)
specifies a barrier option.

[FieldList, ClassList, TypeString] = instbarrier 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 barrier option instrument, TypeString = 'Barrier'.

Examples

expand all

Create Two Barrier Option Instruments

Create an instrument set of two barrier options with the following data:

OptSpec = {'put';'call'};
Strike = 112;
Settle = '01-Jan-2012';
ExerciseDates = '01-Jan-2015';
BarrierSpec = {'do';'ui'};
Barrier = [101;102];
AmericanOpt = 0;

Create the instrument set (InstSet) for the two barrier options.

InstSet = instbarrier(OptSpec, Strike, Settle, ExerciseDates,AmericanOpt, BarrierSpec, Barrier);

Display the instrument set.

instdisp(InstSet)
Index Type    OptSpec Strike Settle         ExerciseDates  AmericanOpt BarrierSpec Barrier Rebate
1     Barrier put     112    01-Jan-2012    01-Jan-2015    0           do          101     0     
2     Barrier call    112    01-Jan-2012    01-Jan-2015    0           ui          102     0     
 
Was this topic helpful?