instlookback
Construct lookback option
Syntax
Description
creates a new instrument set containing Lookback instruments.InstSet
= instlookback(OptSpec
,Strike
,Settle
,ExerciseDates
)
adds an optional argument.InstSet
= instlookback(___,AmericanOpt
)
[
lists field meta-data for the Lookback instrument.FieldList
,ClassList
,TypeString
] = instlookback
Examples
Create a Lookback Option Instrument
Define a floating strike lookback instrument with the following data:
OptSpec = 'call'; Strike = NaN; Settle = '01-Jan-2012'; ExerciseDates = '01-Jan-2015';
Create the instrument set.
InstSet = instlookback(OptSpec, Strike, Settle, ExerciseDates);
Display the lookback instrument.
instdisp(InstSet)
Index Type OptSpec Strike Settle ExerciseDates AmericanOpt 1 Lookback call NaN 01-Jan-2012 01-Jan-2015 0
Input Arguments
InstSet
— Instrument variable
structure
Instrument variable, specified only when adding Lookback instruments to an existing
instrument set. For more information on the InstSet
variable, see
instget
.
Data Types: struct
OptSpec
— Definition of option
character vector with value 'call'
or
'put'
| cell array of character vectors with values 'call'
or
'put'
Definition of option, specified as a scalar 'call'
or
'put'
using a character vector or an
NINST
-by-1
cell array of character vectors for
'call'
or 'put'
.
Data Types: char
| cell
Strike
— Option strike price value
matrix of nonnegative integers
Option strike price value, specified as a scalar nonnegative integer or an
NINST
-by-1
matrix of strike price values. Each
row is the schedule for one option.
Data Types: double
Settle
— Settlement date or trade date
serial date number | date character vector
Settlement date or trade date for the lookback option, specified as a scalar or an
NINST
-by-1
matrix of settlement or trade dates
using serial date numbers or date character vectors.
Data Types: double
| char
ExerciseDates
— Option exercise dates
serial date number | date character vector
Option exercise dates, specified as a scalar, matrix, or vector using serial date numbers or date character vectors:
For a European option, use an
NINST
-by-1
matrix of 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 exercise date boundaries. 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
is aNINST
-by-1
vector of serial date numbers or cell array of character vectors, the option can be exercised betweenValuationDate
of the stock tree and the single listedExerciseDates
.
Data Types: double
| char
AmericanOpt
— Option type
0
European (default) | integer with values 0
or 1
(Optional) Option type, specified as a scalar or an
NINST
-by-1
integer flags with values:
0
— European1
— American
Data Types: single
| 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 Lookback instrument
cell array of character vectors
Name of each data field for a Lookback 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 Lookback instrument,
TypeString = 'Lookback'
.
More About
Lookback Option
A lookback option is a path-dependent option based on the maximum or minimum value the underlying asset achieves during the entire life of the option.
Financial Instruments Toolbox™ software supports two types of lookback options: fixed and floating. Fixed lookback options have a specified strike price, while floating lookback options have a strike price determined by the asset path. For more information, see Lookback Option.
Version History
Ouvrir l'exemple
Vous possédez une version modifiée de cet exemple. Souhaitez-vous ouvrir cet exemple avec vos modifications ?
Commande MATLAB
Vous avez cliqué sur un lien qui correspond à cette commande MATLAB :
Pour exécuter la commande, saisissez-la dans la fenêtre de commande de MATLAB. Les navigateurs web ne supportent pas les commandes 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)