Finance
TreePlot
plot a binomial/trinomial tree
Calling Sequence
Parameters
Options
Description
Examples
Compatibility
TreePlot(tree, opts, plotopts)
tree
-
binomial or trinomial tree data structure; tree
opts
(optional) equation(s) of the form option = value where option is scale; specify options for the TreePlot command
plotopts
(optional) options to be passed to the plots[display] command
scale = default, exponential, or logarithmic -- This option specifies whether the tree should be plotted using the exponential, logarithmic, or the default scale.
The TreePlot command plots the specified binomial/trinomial tree.
The tree is displayed using the plots[display] command. All unprocessed arguments are interpreted as plot options and will be passed to the plots[display] command when the final plot data structure is generated.
with⁡Finance:
Construct a Cox-Ross-Rubinstein binomial tree.
S0 ≔ 100
S0≔100
r ≔ 0.05
r≔0.05
σ ≔ 0.3
σ≔0.3
T ≔ 3.0
T≔3.0
N ≔ 20
N≔20
Su ≔ ⅇσ⁢TN
Su≔1.123208700
Sd ≔ ⅇ−σ⁢TN
Sd≔0.8903064939
Pu ≔ ⅇr⁢TN−SdSu−Sd
Pu≔0.5033086765
Tree ≔ BinomialTree⁡T,N,S0,Su,Pu,Sd
Tree ≔ moduleend module
TreePlot⁡Tree,thickness=2,axes=boxed,gridlines=true
TreePlot⁡Tree,thickness=2,axes=boxed,gridlines=true,scale=logarithmic
Here is a Jarrow-Rudd tree approximating the same process.
Su ≔ ⅇr−σ22⁢TN+σ⁢TN
Su≔1.124051423
Sd ≔ ⅇr−σ22⁢TN−σ⁢TN
Sd≔0.8909744742
Pu ≔ 0.5
Pu≔0.5
Tree2 ≔ BinomialTree⁡T,N,S0,Su,Pu,Sd
Tree2 ≔ moduleend module
TreePlot⁡Tree2,thickness=2,axes=boxed,gridlines=true
TreePlot⁡Tree2,thickness=2,axes=boxed,gridlines=true,scale=logarithmic
Here is a trinomial tree obtained by combining two steps of the Jarrow-Rudd tree.
Su ≔ ⅇr−σ22⋅2⁢TN+2⁢σ⁢TN
Su≔1.263491601
Sd ≔ ⅇr−σ22⋅2⁢TN−2⁢σ⁢TN
Sd≔0.7938355137
Pu ≔ 0.25
Pu≔0.25
Pd ≔ 0.25
Pd≔0.25
Tree3 ≔ TrinomialTree⁡T,N2,S0,Su,Pu,Sd,Pd
Tree3 ≔ moduleend module
TreePlot⁡Tree3,thickness=2,axes=boxed,gridlines=true
TreePlot⁡Tree3,thickness=2,axes=boxed,gridlines=true,scale=logarithmic
plotsdisplay⁡TreePlot⁡Tree2,color=red,TreePlot⁡Tree3,transparency=0.3,axes=boxed,thickness=2,gridlines
The following is a tree created for a Cox-Ingersoll-Ross short rate model.
The command to create the plot from the Plotting Guide is
M ≔ CoxIngersollRossModel⁡ZeroCurve⁡0.03,0.05,0.5,0.002,0.1
M ≔ moduleend module
T ≔ ShortRateTree⁡M,3,15
T ≔ moduleend module
TreePlot⁡T,axes=boxed,thickness=3,gridlines=true,color=cyan..blue
The Finance[TreePlot] command was introduced in Maple 15.
For more information on Maple 15 changes, see Updates in Maple 15.
See Also
Finance[BinomialTree]
Finance[BlackScholesBinomialTree]
Finance[BlackScholesTrinomialTree]
Finance[GetDescendants]
Finance[GetProbabilities]
Finance[GetUnderlying]
Finance[ImpliedBinomialTree]
Finance[ImpliedTrinomialTree]
Finance[LatticeMethods]
Finance[SetProbabilities]
Finance[SetUnderlying]
Finance[StochasticProcesses]
Finance[TreePlot]
Finance[TrinomialTree]
Download Help Document
What kind of issue would you like to report? (Optional)