lookbackbystt
Price lookback options using standard trinomial tree
Syntax
Description
prices lookback options using a standard trinomial (STT) tree.Price
= lookbackbystt(STTTree
,OptSpec
,Strike
,Settle
,ExerciseDates
)
Note
Alternatively, you can use the Lookback
object to price lookback options. For more information, see Get Started with Workflows Using Object-Based Framework for Pricing Financial Instruments.
prices
lookback options using a standard trinomial (STT) tree with an optional
argument for Price
= lookbackbystt(___,AmericanOpt
)AmericanOpt
.
Examples
Price a Lookback Option Using the Standard Trinomial Tree Model
Create a RateSpec
.
StartDates = datetime(2009,1,1); EndDates = datetime(2013,1,1); Rates = 0.035; Basis = 1; Compounding = -1; RateSpec = intenvset('ValuationDate', StartDates, 'StartDates', StartDates,... 'EndDates', EndDates, 'Rates', Rates,'Compounding', Compounding, 'Basis', Basis)
RateSpec = struct with fields:
FinObj: 'RateSpec'
Compounding: -1
Disc: 0.8694
Rates: 0.0350
EndTimes: 4
StartTimes: 0
EndDates: 735235
StartDates: 733774
ValuationDate: 733774
Basis: 1
EndMonthRule: 1
Create a StockSpec
.
AssetPrice = 85; Sigma = 0.15; StockSpec = stockspec(Sigma, AssetPrice)
StockSpec = struct with fields:
FinObj: 'StockSpec'
Sigma: 0.1500
AssetPrice: 85
DividendType: []
DividendAmounts: 0
ExDividendDates: []
Create an STTTree
.
NumPeriods = 4; TimeSpec = stttimespec(StartDates, EndDates, 4); STTTree = stttree(StockSpec, RateSpec, TimeSpec)
STTTree = struct with fields:
FinObj: 'STStockTree'
StockSpec: [1x1 struct]
TimeSpec: [1x1 struct]
RateSpec: [1x1 struct]
tObs: [0 1 2 3 4]
dObs: [733774 734139 734504 734869 735235]
STree: {[85] [110.2179 85 65.5520] [142.9174 110.2179 85 65.5520 50.5537] [185.3182 142.9174 110.2179 85 65.5520 50.5537 38.9870] [240.2985 185.3182 142.9174 110.2179 85 65.5520 50.5537 38.9870 30.0668]}
Probs: {[3x1 double] [3x3 double] [3x5 double] [3x7 double]}
Define the lookback option and compute the price.
Settle = datetime(2009,1,1);
ExerciseDates = [datetime(2012,1,1) ; datetime(2013,1,1)];
OptSpec = 'call';
Strike = [90;95];
Price= lookbackbystt(STTTree, OptSpec, Strike, Settle, ExerciseDates)
Price = 2×1
11.7296
12.9120
Input Arguments
STTTree
— Stock tree structure for standard trinomial tree
structure
Stock tree structure for a standard trinomial tree, specified
by using stttree
.
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 character vector or a 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 with a nonnegative integer
using a NINST
-by-1
matrix of
strike price values. Each row is the schedule for one option. To compute
the value of a floating-strike lookback option, Strike
should
be specified as NaN
. Floating-strike lookback options
are also known as average strike options.
Data Types: double
Settle
— Settlement date or trade date
datetime array | string array | date character vector
Settlement date or trade date for the lookback option, specified as a
NINST
-by-1
vector using a datetime
array, string array, or date character vectors.
Note
The Settle
date for every lookback option is
set to the ValuationDate
of the stock tree. The
lookback argument, Settle
, is ignored.
To support existing code, lookbackbystt
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 a datetime array, string array, or date character vectors:
For a European option, use a
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
cell array of character vectors, the option can be exercised betweenValuationDate
of the stock tree and the single listedExerciseDates
.
To support existing code, lookbackbystt
also
accepts serial date numbers as inputs, but they are not recommended.
AmericanOpt
— Option type
0
European (default) | scalar with values [0,1]
Option type, specified as NINST
-by-1
positive
integer scalar flags with values:
0
— European1
— American
Data Types: double
Output Arguments
Price
— Expected prices for lookback options at time 0
matrix
Expected prices for lookback options at time 0, returned as
a NINST
-by-1
matrix. Pricing
of lookback options is done using Hull-White (1993). Consequently,
for these options there are no unique prices on the tree nodes with
the exception of the root node.
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.
References
[1] Hull J. and A. White. "Efficient Procedures for Valuing European and American Path-Dependent Options." Journal of Derivatives. Fall 1993, pp. 21–31.
Version History
Introduced in R2015bR2022b: Serial date numbers not recommended
Although lookbackbystt
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.
See Also
stttimespec
| stttree
| sttprice
| sttsens
| Lookback
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)