sttprice
Price instruments using standard trinomial tree
Description
Examples
Price a stttree Instrument Set
Load the data into the MATLAB® workspace.
load deriv.mat
STTTree
and STTInstSet
are the input arguments required to call the function sttprice
. Use the command instdisp
to examine the set of instruments contained in the variable STTInstSet
.
instdisp(STTInstSet)
Index Type OptSpec Strike Settle ExerciseDates AmericanOpt Name Quantity 1 OptStock call 100 01-Jan-2009 01-Jan-2011 1 Call1 10 2 OptStock put 80 01-Jan-2009 01-Jan-2012 0 Put1 5 Index Type OptSpec Strike Settle ExerciseDates AmericanOpt BarrierSpec Barrier Rebate Name Quantity 3 Barrier call 105 01-Jan-2009 01-Jan-2012 1 ui 115 0 Barrier1 1 Index Type UOptSpec UStrike USettle UExerciseDates UAmericanOpt COptSpec CStrike CSettle CExerciseDates CAmericanOpt Name Quantity 4 Compound call 95 01-Jan-2009 01-Jan-2012 1 put 5 01-Jan-2009 01-Jan-2011 1 Compound1 3 Index Type OptSpec Strike Settle ExerciseDates AmericanOpt Name Quantity 5 Lookback call 90 01-Jan-2009 01-Jan-2012 0 Lookback1 7 6 Lookback call 95 01-Jan-2009 01-Jan-2013 0 Lookback2 9 Index Type OptSpec Strike Settle ExerciseDates AmericanOpt AvgType AvgPrice AvgDate Name Quantity 7 Asian call 100 01-Jan-2009 01-Jan-2012 0 arithmetic NaN NaN Asian1 4 8 Asian call 100 01-Jan-2009 01-Jan-2013 0 arithmetic NaN NaN Asian2 6
The instrument set contains eight instruments:
Two vanilla options (
Call1
,Put1
)One barrier option (
Barrier1
)One compound option (
Compound1
)Two lookback options (
Lookback1
,Lookback2
)Two Asian options (
Asian1
,Asian2
)
Use sttprice
to calculate the price of each instrument in the instrument set.
Price = sttprice(STTTree, STTInstSet)
Price = 8×1
4.5025
3.0603
3.7977
1.7090
11.7296
12.9120
1.6905
2.6203
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
InstSet
— Variable containing a collection instruments
structure
Variable containing a collection of NINST
instruments,
specified as a structure. Instruments are broken down by type and each type
can have different data fields.
Data Types: struct
Name-Value Arguments
Specify optional pairs of arguments as
Name1=Value1,...,NameN=ValueN
, where Name
is
the argument name and Value
is the corresponding value.
Name-value arguments must appear after other arguments, but the order of the
pairs does not matter.
Before R2021a, use commas to separate each name and value, and enclose
Name
in quotes.
Example: [Price,PriceTree] =
sttprice(STTTree,InstSet,'Options',deriv)
Options
— Derivatives pricing options
structure
Derivatives pricing options, specified as the comma-separated pair
consisting of 'Options'
and a structure that is
created with derivset
.
Data Types: struct
Output Arguments
Price
— Expected prices for each instrument at time 0
matrix
Expected prices for each instrument at time 0
, returned
as a NINST
-by-1
vector. The prices are
computed by backward dynamic programming on the standard trinomial (STT)
stock tree. If an instrument cannot be priced, a NaN
is
returned in that entry.
PriceTree
— Structure with vector of instrument prices at each node
tree structure
Structure with a vector of instrument prices at each node, returned as a tree structure.
PriceTree
is a MATLAB® structure of trees containing vectors of instrument prices and
a vector of observation times for each node.
PriceTree.PTree
contains the prices.
PriceTree.tObs
contains the observation times.
PriceTree.dObs
contains the observation dates.
Version History
Introduced in R2015b
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 (한국어)