instasian
Construct Asian option
Syntax
Description
creates a new instrument set containing Asian instruments.InstSet
= instasian(OptSpec
,Strike
,Settle
,ExerciseDates
)
[
lists field meta-data for the Asian instrument.FieldList
,ClassList
,TypeString
= instasian
Examples
Create an Asian Option Instrument
Load the example instrument set, deriv.mat
, and set the required values for an asian option instrument.
load deriv.mat
Create a subportfolio with barrier and lookback options.
CRRSubSet = instselect(CRRInstSet,'Type',{'Barrier', 'Lookback'});
Define the asian instrument.
OptSpec = 'put';
Strike = NaN;
Settle = datetime(2003,1,1);
ExerciseDates = datetime(2004,1,1);
Add a floating strike asian option to the instrument set.
InstSet = instasian(CRRSubSet, OptSpec, Strike, Settle, ExerciseDates); instdisp(InstSet)
Index Type OptSpec Strike Settle ExerciseDates AmericanOpt BarrierSpec Barrier Rebate Name Quantity 1 Barrier call 105 01-Jan-2003 01-Jan-2006 1 ui 102 0 Barrier1 1 Index Type OptSpec Strike Settle ExerciseDates AmericanOpt Name Quantity 2 Lookback call 115 01-Jan-2003 01-Jan-2006 0 Lookback1 7 3 Lookback call 115 01-Jan-2003 01-Jan-2007 0 Lookback2 9 Index Type OptSpec Strike Settle ExerciseDates AmericanOpt AvgType AvgPrice AvgDate Name Quantity 4 Asian put NaN 01-Jan-2003 01-Jan-2004 0 arithmetic NaN NaN NaN
Input Arguments
InstSet
— Instrument variable
structure
Instrument variable, specified only when adding asian 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 'call'
or
'put'
using a scalar character vector or an
NINST
-by-1
cell array of character
vectors.
Data Types: char
| cell
Strike
— Option strike price value
nonnegative integer | vector of nonnegative integer
Option strike price value, specified with a scalar nonnegative integer or an
NINST
-by-1
vector of strike price values.
Data Types: double
Settle
— Settlement dates or trade dates
datetime array | string array | date character vector
Settlement date or trade date for the Asian option, specified as scalar or an
NINST
-by-1
vector using a datetime array, string
array, or date character vectors.
To support existing code, instasian
also
accepts serial date numbers as inputs, but they are not recommended.
ExerciseDates
— Option exercise dates
datetime array | string array | date character vector
Option exercise dates, specified as an
NINST
-by-1
vector using a datetime array, string
array, or date character vectors.
To support existing code, instasian
also
accepts serial date numbers as inputs, but they are not recommended.
For a European option (when 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 ( when 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 an
NINST
-by-1
, the option can be exercised between
the valuation date of the stock tree and the single listed exercise date.
AmericanOpt
— Indicator for American option
0
(default) | integer value 0
or 1
(Optional) Indicator for American option, specified as a scalar or an
NINST
-by-1
vector.
If AmericanOpt = 0
, NaN
, or is unspecified,
the option is a European option. If AmericanOpt = 1
, the option is an
American option.
Data Types: double
AvgType
— Averaging type
'arithmetic'
(default) | character vector with value 'arithmetic'
or 'geometric'
(Optional) Averaging type, specified as a character vector with a value of
'arithmetic'
for arithmetic average or
'geometric'
for geometric average.
Data Types: char
AvgDate
— Date averaging period begins
Settle
date (default) | datetime array | string array | date character vector
(Optional) Date averaging period begins, specified as a scalar datetime, string, or date character vector.
To support existing code, instasian
also
accepts serial date numbers as inputs, but they are not recommended.
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 Asian instrument
cell array of character vectors
Name of each data field for an Asian 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 an Asian option instrument,
TypeString = 'Asian'
.
More About
Asian Option
An Asian option is a path-dependent option with a payoff linked to the average value of the underlying asset during the life (or some part of the life) of the option.
Asian options are similar to lookback options in that there are two types of Asian options: fixed (average price option) and floating (average strike option). Fixed Asian options have a specified strike, while floating Asian options have a strike equal to the average value of the underlying asset over the life of the option. For more information, see Asian Option.
Version History
Introduced before R2006aR2022b: Serial date numbers not recommended
Although instasian
supports serial date numbers,
datetime
values are recommended instead. The
datetime
data type provides flexible date and time
formats, storage out to nanosecond precision, and properties to account for time
zones and daylight saving time.
To convert serial date numbers or text to datetime
values, use the datetime
function. For example:
t = datetime(738427.656845093,"ConvertFrom","datenum"); y = year(t)
y = 2021
There are no plans to remove support for serial date number inputs.
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
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)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)