construct a recombining binomial tree - Maple Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Mathematics : Finance : Lattice Methods : Finance/BinomialTree

Finance[BinomialTree] - construct a recombining binomial tree

Calling Sequence

BinomialTree(G, S, Pu, Pd, opts)

BinomialTree(T, S, Pu, Pd, opts)

BinomialTree(T, N, S0, Su, Pu, Sd, Pd, opts)

Parameters

G

-

time grid data structure; time grid

S

-

Array or list; state space of the discretized process

Pu

-

non-negative constant or operator; probability of going up

Pd

-

(optional) non-negative constant or operator; probability of going down

T

-

positive; stopping time

N

-

posint; number of times steps

S0

-

positive constant; initial value

Su

-

positive constant; upward movement

Sd

-

(optional) positive constant; downward movement

opts

-

(optional) equation(s) of the form option = value where option is mutable; specify options for the BinomialTree command

Description

• 

The BinomialTree(G, S, Pu, Pd, opts) calling sequence constructs a recombining binomial tree approximating a certain stochastic process, typically a GeometricBrownianMotion. The constructed tree will be based on the discretizations of the time and the state spaces given by G and S.

• 

Assume that the time grid G consists of N points T1, T1, ..., TN. Then the resulting binomial tree will have N levels, each level representing possible states of the discretized process at time Ti, i=1..N. The parameter S contains all possible states of the discretized process. The number of elements of S should be equal to 2N1, and the elements of S must be sorted in descending order.

• 

At level i, i=1..N the tree has i nodes, Si,1, ..., Si,i. Each node Si,j has two descendants at level i+1, Si+1,j (the upper descendant), and Si+1,j+1 (the lower descendant). The initial state of the underlying process will be equal to SN. For odd i, the states of the underlying at the level i are SNi, SNi+2, ..., SN2, SN, SN+2, ..., SN+i2, SN+i. For even i, the states of the underlying at the level i are SNi, SNi+2, ..., SN1, SN+1, ..., SN+i2, SN+i.

• 

The transition probabilities (i.e. the probability of going from Si,j to Si+1,j and the probability of going from Si,j to Si+1,j+1) are defined by Pu and Pd. Both Pu and Pd can be either non-negative real constants or one-parameter operators. If Pu and  Pd are given in the operator form the corresponding transition probabilities at level i will be calculated as Pudt and Pddt respectively, where dt=Ti+1Ti.

• 

The BinomialTree(T, S, Pu, Pd, opts) calling sequence is similar except that in this case a uniform time grid with step size TN is used instead of G. In this case N will be deduced from the size of the state array S.

• 

The BinomialTree(T, N, S0, Su, Pu, Sd, Pd, opts) calling sequence will construct a binomial tree based on a uniform time grid with step size TN. Each tree node Si,j will have two descendants Si+1,j=Si,jSu (the upper descendant) and Si+1,j+1=Si,jSd (the lower descendant). The transition probabilities will be calculated the same way as above. By default Sd is set to 1Su and Pd is set to 1Pu.

• 

The resulting data structure can be inspected using the GetUnderlying and GetProbabilities commands and can be further manipulated using the SetUnderlying and SetProbabilities commands.

Examples

withFinance:

S:=7.9,7.5,7.1,6.5,5.,3.7,3.3,2.95,2.8

S:=7.9,7.5,7.1,6.5,5.,3.7,3.3,2.95,2.8

(1)

T:=BinomialTree3,S,0.3:

Here are two different views of the same tree. The first one uses the standard scale, the second one uses the logarithmic scale.

TreePlotT,thickness=2,axes=BOXED,gridlines=true

TreePlotT,thickness=2,axes=BOXED,gridlines=true,color=red..blue,scale=logarithmic

Inspect the tree.

GetUnderlyingT,5,1

7.900000000

(2)

GetProbabilitiesT,3,1

0.3000000000,0.7000000000

(3)

Change the value of the underlying at the uppermost node on level 5 and compare the two trees.

P1:=TreePlotT,thickness=2,axes=BOXED,gridlines=true:

SetUnderlyingT,5,1,8.5

P2:=TreePlotT,thickness=2,axes=BOXED,color=red,gridlines=true:

plots[display]P1,P2

Here is the same example as above but using a non-homogeneous time grid.

G:=TimeGrid0,1.5,2.0,2.5,3.0

G:=moduleend module

(4)

S:=7.9,7.5,7.1,6.5,5.,3.7,3.3,2.95,2.8

S:=7.9,7.5,7.1,6.5,5.,3.7,3.3,2.95,2.8

(5)

T:=BinomialTreeG,S,0.3:

Here are two different views of the same tree. The first one uses the standard scale, the second one uses the logarithmic scale.

TreePlotT,thickness=2,axes=BOXED,gridlines=true

TreePlotT,thickness=2,axes=BOXED,gridlines=true,color=red..blue,scale=logarithmic

Inspect the tree.

GetUnderlyingT,5,1

7.900000000

(6)

GetProbabilitiesT,3,1

0.3000000000,0.7000000000

(7)

Change the value of the underlying at the uppermost node on level 5 and compare the two trees.

P1:=TreePlotT,thickness=2,axes=BOXED,gridlines=true:

SetUnderlyingT,5,1,8.5

P2:=TreePlotT,thickness=2,axes=BOXED,color=red,gridlines=true:

plots[display]P1,P2

In this example you will use the third construction.

Su:=1.1

Su:=1.1

(8)

Sd:=0.95

Sd:=0.95

(9)

T:=BinomialTree3,20,100,Su,0.3,Sd,0.7:

Here are two different views of the same tree. The first one uses the standard scale, the second one uses the logarithmic scale.

TreePlotT,thickness=2,axes=BOXED,gridlines=true

TreePlotT,thickness=2,axes=BOXED,gridlines=true,color=red..blue,scale=logarithmic

Construct an immutable tree.

T2:=BinomialTree3,20,100,Su,0.3,Sd,0.7,mutable=false:

plots[display]TreePlotT2,thickness=2,axes=BOXED,gridlines=true,color=red,TreePlotT,thickness=2,axes=BOXED,gridlines=true,color=blue

Use the default values for Sd and Pd.

T3:=BinomialTree3,20,100,Su,0.3,mutable=false:

plots[display]TreePlotT3,thickness=2,axes=BOXED,gridlines=true,color=red,TreePlotT,thickness=2,axes=BOXED,gridlines=true,color=blue

Inspect the tree.

GetUnderlyingT,5,1

146.4100000

(10)

GetProbabilitiesT,3,1

0.3000000000,0.7000000000

(11)

Change the value of the underlying at the uppermost node on level 5 and compare the two trees.

P1:=TreePlotT,thickness=2,axes=BOXED,gridlines=true:

forito20doSetUnderlyingT,i,i,1000.9i1end do

P2:=TreePlotT,thickness=2,axes=BOXED,color=red,gridlines=true:

plots[display]P1,P2

See Also

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]

References

  

Brigo, D., Mercurio, F., Interest Rate Models: Theory and Practice, New York: Springer-Verlag, 2001.

  

Glasserman, P., Monte Carlo Methods in Financial Engineering, New York: Springer-Verlag, 2004.

  

Hull, J., Options, Futures, and Other Derivatives, 5th. edition. Upper Saddle River, New Jersey: Prentice Hall, 2003.


Download Help Document

Was this information helpful?



Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam