crrtree
Build Cox-Ross-Rubinstein stock tree
Description
Examples
Create a CRR Tree
Using the data provided, create a stock specification (StockSpec
), rate specification (RateSpec
), and tree time layout specification (TimeSpec
). Then use these specifications to create a CRR tree with crrtree
.
Sigma = 0.20; AssetPrice = 50; DividendType = 'cash'; DividendAmounts = [0.50; 0.50; 0.50; 0.50]; ExDividendDates = {'03-Jan-2003'; '01-Apr-2003'; '05-July-2003'; '01-Oct-2003'}; StockSpec = stockspec(Sigma, AssetPrice, DividendType, ... DividendAmounts, ExDividendDates); RateSpec = intenvset('Rates', 0.05, 'StartDates',... '01-Jan-2003', 'EndDates', '31-Dec-2003','Compounding',-1); ValuationDate = '1-Jan-2003'; Maturity = '31-Dec-2003'; TimeSpec = crrtimespec(ValuationDate, Maturity, 4); CRRTree = crrtree(StockSpec, RateSpec, TimeSpec)
CRRTree = struct with fields:
FinObj: 'BinStockTree'
Method: 'CRR'
StockSpec: [1x1 struct]
TimeSpec: [1x1 struct]
RateSpec: [1x1 struct]
tObs: [0 0.2493 0.4986 0.7479 0.9972]
dObs: [731582 731673 731764 731855 731946]
STree: {[50] [54.0632 44.4531] [59.6501 49.0307 40.3339] [64.8166 53.0820 43.4719 35.6016] [71.6235 58.6566 48.0372 39.3404 32.2181]}
UpProbs: [0.5378 0.5378 0.5378 0.5378]
Input Arguments
RateSpec
— Interest-rate specification for initial risk-free rate curve
structure
Interest-rate specification for initial risk-free rate curve,
specified by the RateSpec
obtained from intenvset
. For information on the interest-rate
specification, see intenvset
.
Note
The standard CRR tree assumes a constant interest rate, but RateSpec
allows
you to specify an interest-rate curve with varying rates. If you specify
variable interest rates, the resulting tree is not a standard CRR
tree.
Data Types: struct
TimeSpec
— Tree time layout specification
structure
Tree time layout specification, specified by the TimeSpec
obtained
from crrtimespec
. The TimeSpec
defines
the observation dates of the CRR binomial tree. See crrtimespec
for information on the tree
structure.
Data Types: struct
Output Arguments
CRRTree
— CRR binomial tree
structure
CRR binomial tree, returned as a structure specifying the time layout for the tree.
Version History
Introduced before R2006a
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)