Quantcast

Documentation Center

  • Trial Software
  • Product Updates

instoptstock

Construct stock option

Syntax

InstSet = instoptstock(InstSet, OptSpec, Strike,
Settle, ExerciseDates)
InstSet = instoptstock(InstSet, OptSpec, Strike,
Settle, ExerciseDates, AmericanOpt)
[FieldList, ClassList, TypeString] = instoptstock

Arguments

InstSet

Instrument variable. This argument is specified only when adding stock option 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'.

    Note   The interpretation of the Strike and ExerciseDates arguments depends upon the setting of the AmericanOpt argument. If AmericanOpt = 0, NaN, or is unspecified, the option is a European or Bermuda option. If AmericanOpt = 1, the option is an American option.

Strike

European option: NINST-by-1 vector of strike price values.

Bermuda option: NINST by number of strikes (NSTRIKES) matrix of strike price values.

Each row is the schedule for one option. If an option has fewer than NSTRIKES exercise opportunities, the end of the row is padded with NaNs.

American option: NINST-by-1 vector of strike price values for each option.

Settle

NINST-by-1 vector of settlement dates.

ExerciseDates

NINST-by-1 (European option) or NINST-by-NSTRIKES (Bermuda option) matrix 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:

NINST-by-2 vector of exercise date boundaries. For each instrument, the option can be exercised on any coupon 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 underlying bond Settle and the single listed exercise date.

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 = instoptstock(InstSet, OptSpec, Strike,
Settle, ExerciseDates)
specifies a European or Bermuda option.

InstSet = instoptstock(InstSet, OptSpec, Strike,
Settle, ExerciseDates, AmericanOpt)
specifies an American option if AmericanOpt is set to 1. If AmericanOpt is not set to 1, the function specifies a European or Bermuda option.

[FieldList, ClassList, TypeString] = instoptstock 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 stock option instrument, TypeString = 'OptStock'.

Examples

expand all

Create a Stock Option Instrument

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

OptSpec = {'put';'call'};
Strike = [95;98];
Settle = '01-May-2012';
ExerciseDates = {'01-May-2014';'01-May-2015'};
AmericanOpt = [0;1];

Create the stock option instruments.

InstSet = instoptstock(OptSpec, Strike,Settle, ExerciseDates, AmericanOpt)
InstSet = 

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

Display the instrument set.

instdisp(InstSet)
Index Type     OptSpec Strike Settle         ExerciseDates  AmericanOpt
1     OptStock put     95     01-May-2012    01-May-2014    0          
2     OptStock call    98     01-May-2012    01-May-2015    1          
 

See Also

| |

Was this topic helpful?