# instoptstock

Construct stock option

## Description

example

InstSet = instoptstock(OptSpec,Strike,Settle,ExerciseDates) creates a new instrument set containing stock option instruments.

example

InstSet = instoptstock(InstSet,OptSpec,Strike,Settle,ExerciseDates) adds stock option instruments to an existing instrument set.

example

InstSet = instoptstock(___,AmericanOpt) adds an optional argument for AmericanOpt.

example

[FieldList,ClassList,TypeString] = instoptstock lists field meta-data for the stock option instrument.

## Examples

collapse all

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 = struct with fields:
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

## Input Arguments

collapse all

Instrument variable, specified only when adding stock option instruments to an existing instrument set. For more information on the InstSet variable, see instget.

Data Types: struct

Definition of option, specified as a scalar 'call' or 'put' or an NINST-by-1 cell array of character vectors.

Data Types: char | cell

Option strike price value, specified with a scalar or an NINST-by-1 or an NINST-by-NSTRIKES depending on the option type:

• For a European option, use an NINST-by-1 vector of strike prices.

• For a Bermuda option, use an NINST-by-NSTRIKES matrix of strike prices. 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.

• For an American option, use an NINST-by-1 of strike prices.

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.

Data Types: double

Settlement date or trade date, specified as a scalar or an NINST-by-1 vector of date character vectors or serial date numbers.

Data Types: char | double

Option exercise dates, specified as a scalar or an NINST-by-1,NINST-by-2, or an NINST-by-NSTRIKES using serial date numbers or date character vectors, depending on the option type:

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

• For a Bermuda option, use an NINST-by-NSTRIKES vector of dates. Each row is the schedule for one option.

• For an American option, use an NINST-by-2 vector of exercise date boundaries. The option can be exercised on any date between or including the pair of dates on that row.

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.

Data Types: double | char

(Optional) Option type, specified as a scalar or an NINST-by-1 vector of integer flags with values:

• 0 — European or Bermuda

• 1 — American

Data Types: double

## Output Arguments

collapse all

Variable containing a collection of instruments, returned as a structure. Instruments are broken down by type and each type can have different data fields. Each stored data field has a row vector or string for each instrument. For more information on the InstSet variable, see instget.

Name of each data field for a stock option instrument, returned as an NFIELDS-by-1 cell array of character vectors.

Data class for each field, returned as an NFIELDS-by-1 cell array of character vectors. The class determines how arguments are parsed. Valid character vectors are 'dble', 'date', and 'char'.

Type of instrument, returned as a character vector. For a stock option instrument, TypeString = 'OptStock'.

collapse all

### Vanilla Option

A vanilla option is a category of options that includes only the most standard components.

A vanilla option has an expiration date and straightforward strike price. American-style options and European-style options are both categorized as vanilla options.

The payoff for a vanilla option is as follows:

• For a call: $\mathrm{max}\left(St-K,0\right)$

• For a put: $\mathrm{max}\left(K-St,0\right)$

where:

St is the price of the underlying asset at time t.

K is the strike price.