instcompound
Construct compound option
Syntax
Description
creates a new instrument set containing Compound option instruments. InstSet
= instcompound(UOptSpec
,UStrike
,USettle
,UExerciseDates
,UAmericanOpt
,COptSpec
,CStrike
,CSettle
,CExerciseDates
,CAmericanOpt
)
adds Compound option instruments to an existing instrument set.InstSet
= instcompound(InstSet
,UOptSpec
,UStrike
,USettle
,UExerciseDates
,UAmericanOpt
,COptSpec
,CStrike
,CSettle
,CExerciseDates
,CAmericanOpt
)
[
lists field meta-data for the Compound option instrument.FieldList
,ClassList
,TypeString
] = instcompound
Examples
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 = struct with fields:
FinObj: 'Instruments'
IndexTable: [1x1 struct]
Type: {'Compound'}
FieldName: {{10x1 cell}}
FieldClass: {{10x1 cell}}
FieldData: {{10x1 cell}}
InstSet = instcompound(UOptSpec, UStrike, USettle,UExerciseDates, ...
UAmericanOpt, COptSpec, CStrike, CSettle,CExerciseDates)
InstSet = struct with fields:
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
Input Arguments
InstSet
— Instrument variable
structure
Instrument variable, specified only when adding Compound option instruments to an
existing instrument set. For more information on the InstSet
variable, see instget
.
Data Types: struct
UOptSpec
— Definition of underlying option
character vector with value 'call'
or
'put'
Definition of underlying option, specified as 'call'
or
'put'
using a character vector.
Data Types: char
UStrike
— Underlying option strike price value
nonnegative integer
Underlying option strike price value, specified with a nonnegative integer using a
1
-by-1
vector.
Data Types: double
USettle
— Underlying option settlement date or trade date
serial date number | date character vector
Underlying option settlement date or trade date, specified as a
1
-by-1
vector using a serial date number or
character vector.
Data Types: double
| char
UExerciseDates
— Underlying option exercise date
serial date number | date character vector
Underlying option exercise date, specified as a serial date number or date character vector:
For a European option, use a
1
-by-1
vector of the underlying exercise date. For a European option, there is only oneExerciseDates
on the option expiry date.For an American option, use a
1
-by-2
vector of the underlying exercise date boundaries. The option can be exercised on any tree date. If only one non-NaN
date is listed, or ifExerciseDates
is1
-by-1
, the option can be exercised betweenValuationDate
of the stock tree and the single listedExerciseDates
.
Data Types: double
| char
UAmericanOpt
— Underlying option type
0
European (default) | scalar with values 0
or 1
Underlying option type, specified as
NINST
-by-1
positive integer scalar flags with
values:
0
— European1
— American
If UAmericanOpt
is a NaN
or is unspecified,
the option is a European option.
Data Types: double
COptSpec
— Definition of compound option
character vector with value 'call'
or
'put'
| cell array of character vectors with values 'call'
or
'put'
Definition of compound option, specified as 'call'
or
'put'
using a character vector or a cell array of character vectors
with values 'call'
or 'put'
.
Data Types: char
| cell
CStrike
— Compound option strike price values
nonnegative integers
Compound option strike price values for a European and American option, specified
with a nonnegative integer using a NINST
-by-1
matrix. Each row is the schedule for one option.
Data Types: double
CSettle
— Compound option settlement date or trade date
serial date number | date character vector
Compound option settlement date or trade date, specified as a
1
-by-1
vector using a serial date number or date
character vector.
Data Types: double
| char
CExerciseDates
— Compound option exercise dates
serial date number | date character vector
Compound option exercise dates, specified as serial date numbers or date character vectors:
For a European option, use a
NINST
-by-1
matrix of the compound exercise dates. Each row is the schedule for one option. For a European option, there is only oneExerciseDates
on the option expiry date.For an American option, use a
NINST
-by-2
vector of the compound 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 ifExerciseDates
isNINST
-by-1
, the option can be exercised betweenValuationDate
of the stock tree and the single listedExerciseDates
.
Data Types: double
| char
CAmericanOpt
— Compound option type
0
European (default) | scalar with values 0
or 1
(Optional) Compound option type, specified as
NINST
-by-1
positive integer scalar flags with
values:
0
— European1
— American
If CAmericanOpt
is a NaN
or is unspecified,
the option is a European option.
Data Types: double
Output Arguments
InstSet
— Variable containing a collection of instruments
structure
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
.
FieldList
— Name of each data field for Compound option instrument
cell array of character vectors
Name of each data field for a Compound option instrument, returned as an
NFIELDS
-by-1
cell array of character
vectors.
ClassList
— Data class for each field
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'
.
TypeString
— Type of instrument
character vector
Type of instrument, returned as a character vector. For a Compound option
instrument, TypeString = 'Compound'
.
More About
Compound Option
A compound option is basically an option on an option; it gives the holder the right to buy or sell another option.
With a compound option, a vanilla stock option serves as the underlying instrument. Compound options thus have two strike prices and two exercise dates. For more information, see Compound Option.
Version History
MATLAB コマンド
次の MATLAB コマンドに対応するリンクがクリックされました。
コマンドを MATLAB コマンド ウィンドウに入力して実行してください。Web ブラウザーは MATLAB コマンドをサポートしていません。
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)