stttree
Build standard trinomial tree
Description
Examples
Build a STTTree
Create a RateSpec
.
StartDates = 'Jan-1-2014'; EndDates = 'Jan-1-2018'; Rates = 0.025; 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.9048
Rates: 0.0250
EndTimes: 4
StartTimes: 0
EndDates: 737061
StartDates: 735600
ValuationDate: 735600
Basis: 1
EndMonthRule: 1
Create a StockSpec
.
AssetPrice = 55;
Sigma = 0.22;
Div = 0.02;
StockSpec = stockspec(Sigma, AssetPrice, 'continuous', Div)
StockSpec = struct with fields:
FinObj: 'StockSpec'
Sigma: 0.2200
AssetPrice: 55
DividendType: {'continuous'}
DividendAmounts: 0.0200
ExDividendDates: []
Create a Standard Trinomial Tree (STTTree
).
NumSteps = 8; TimeSpec = stttimespec(StartDates, EndDates, NumSteps); STTT = stttree(StockSpec, RateSpec, TimeSpec)
STTT = struct with fields:
FinObj: 'STStockTree'
StockSpec: [1x1 struct]
TimeSpec: [1x1 struct]
RateSpec: [1x1 struct]
tObs: [0 0.5000 1 1.5000 2 2.5000 3 3.5000 4]
dObs: [735600 735782 735965 736147 736330 736513 736695 736878 737061]
STree: {1x9 cell}
Probs: {[3x1 double] [3x3 double] [3x5 double] [3x7 double] [3x9 double] [3x11 double] [3x13 double] [3x15 double]}
Input Arguments
StockSpec
— Stock specification for underlying asset
structure
Stock specification for underlying asset, specified using StockSpec
obtained
from stockspec
. For information
on the stock specification, see stockspec
.
stockspec
can handle
other types of underlying assets. For example, stocks, stock indices,
and commodities. If dividends are not specified in StockSpec
,
dividends are assumed to be 0
.
Data Types: struct
TimeSpec
— Tree time layout specification
structure
Tree time layout specification, specified using stttimespec
to define the observation
dates of the standard trinomial (STT) tree.
Data Types: struct
Output Arguments
STTTree
— Tree specifying stock and time information for a standard trinomial (STT) tree
tree structure
Tree specifying stock and time information for a standard trinomial (STT) tree, returned as a tree structure.
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 (한국어)