TreePlot - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


Finance

  

TreePlot

  

plot a binomial/trinomial tree

 

Calling Sequence

Parameters

Options

Description

Examples

Compatibility

Calling Sequence

TreePlot(tree, opts, plotopts)

Parameters

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

Options

• 

scale = default, exponential, or logarithmic -- This option specifies whether the tree should be plotted using the exponential, logarithmic, or the default scale.

Description

• 

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.

Examples

withFinance:

Construct a Cox-Ross-Rubinstein binomial tree.

S0100

S0100

(1)

r0.05

r0.05

(2)

σ0.3

σ0.3

(3)

T3.0

T3.0

(4)

N20

N20

(5)

SuexpσsqrtTN

Su1.123208700

(6)

SdexpσsqrtTN

Sd0.8903064939

(7)

PuexprTNSdSuSd

Pu0.5033086765

(8)

TreeBinomialTreeT,N,S0,Su,Pu,Sd

Treemoduleend module

(9)

TreePlotTree,thickness=2,axes=boxed,gridlines=true

TreePlotTree,thickness=2,axes=boxed,gridlines=true,scale=logarithmic

Here is a Jarrow-Rudd tree approximating the same process.

Suexprσ22TN+σsqrtTN

Su1.124051423

(10)

Sdexprσ22TNσsqrtTN

Sd0.8909744742

(11)

Pu0.5

Pu0.5

(12)

Tree2BinomialTreeT,N,S0,Su,Pu,Sd

Tree2moduleend module

(13)

TreePlotTree2,thickness=2,axes=boxed,gridlines=true

TreePlotTree2,thickness=2,axes=boxed,gridlines=true,scale=logarithmic

Here is a trinomial tree obtained by combining two steps of the Jarrow-Rudd tree.

Suexprσ222TN+2σsqrtTN

Su1.263491601

(14)

Sdexprσ222TN2σsqrtTN

Sd0.7938355137

(15)

Pu0.25

Pu0.25

(16)

Pd0.25

Pd0.25

(17)

Tree3TrinomialTreeT,N2,S0,Su,Pu,Sd,Pd

Tree3moduleend module

(18)

TreePlotTree3,thickness=2,axes=boxed,gridlines=true

TreePlotTree3,thickness=2,axes=boxed,gridlines=true,scale=logarithmic

plotsdisplayTreePlotTree2,color=red,TreePlotTree3,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

MCoxIngersollRossModelZeroCurve0.03,0.05,0.5,0.002,0.1

Mmoduleend module

(19)

TShortRateTreeM,3,15

Tmoduleend module

(20)

TreePlotT,axes=boxed,thickness=3,gridlines=true,color=cyan..blue

Compatibility

• 

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]