Finance - Maple Help

Online Help

All Products    Maple    MapleSim


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

Finance

  

TrinomialTree

  

construct a recombining trinomial tree

 

Calling Sequence

Parameters

Options

Description

Examples

References

Compatibility

Calling Sequence

TrinomialTree(G, S, Pu, Pd, Pm, opts)

TrinomialTree(T, S, Pu, Pd, Pm, opts)

TrinomialTree(T, N, S0, Su, Pu, Sd, Pd, Pm, 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 moving to the upper descendant in the tree

Pd

-

non-negative constant or operator; probability of moving to the lower descendant in the tree

Pm

-

(optional) non-negative constant or operator; probability of moving to the middle descendant in the tree

T

-

positive; stopping time

N

-

posint; number of times steps

S0

-

positive constant; initial value

Su

-

positive constant; upward movement

Sd

-

positive constant; downward movement

opts

-

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

Options

• 

mutable = truefalse -- This option specifies whether the tree should be mutable or not. The default is true.

Description

• 

The TrinomialTree(G, S, Pu,Pd,Pm, opts) calling sequence constructs a recombining trinomial tree approximating a certain stochastic process. This can be a GeometricBrownianMotion or a mean-reverting process such as OrnsteinUhlenbeckProcess or GaussMarkovProcess. 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 trinomial 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 three descendants at level i+1, Si+1,j (the upper descendant), Si+1,j+1 (the middle descendant), and Si+1,j+2 (the lower descendant). The initial state of the underlying process will be equal to SN. The states of the underlying at the level i are SNi, ..., SN1, SN, SN+1, ..., SN+i.

• 

The transition probabilities (i.e. the probability of going from Si,j to Si+1,j, the probability of going from Si,j to Si+1,j+1, and the probability of going from Si,j to Si+1,j+2) are defined by Pu, Pd and Pm. The parameter Pm is optional. By default, the middle probability is calculated so that the total sum of all three probabilities is equal to 1, that is, Pm is set to 1PdPu.

• 

The parameters Pu, Pd, and Pm can be either non-negative real constants or one-parameter operators. If Pu, Pd, or Pm is given in the operator form the corresponding transition probability at level i will be calculated as P[u]dt, P[d]dt, or P[m]dt respectively, where dt=Ti+1Ti.

• 

The TrinomialTree(T, S, Pu,Pd,Pm, 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.

• 

Finally, TrinomialTree(T, N, S0,Su,Pu,Sd,Pd,Pm, opts) calling sequence will construct a trinomial 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.

• 

The resulting data structure can be further manipulated using the Finance[SetUnderlying] and Finance[SetProbabilities] commands.

Examples

withFinance:

S7.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)

TTrinomialTree3,S,0.3,0.7:

Here are three different views of the same tree. The first one uses the standard scale, the second one uses the logarithmic scale, and the third one uses the exponential scale.

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

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

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

Inspect the tree.

GetUnderlyingT,5,1

7.900000000

(2)

GetProbabilitiesT,3,1

0.3000000000,0.,0.7000000000

(3)

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

P1TreePlotT,thickness=2,axes=BOXED,gridlines=true:

SetUnderlyingT,5,1,8.5

P2TreePlotT,thickness=2,axes=BOXED,color=red,gridlines=true:

plots[display]P1,P2

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

GTimeGrid0,1.5,2.0,2.5,3.0

G:=moduleend module

(4)

S7.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)

TTrinomialTreeG,S,0.3,0.7:

Here are three different views of the same tree. The first one uses the standard scale, the second one uses the logarithmic scale, and the third one uses the exponential scale.

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

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

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

Inspect the tree.

GetUnderlyingT,5,1

7.900000000

(6)

GetProbabilitiesT,3,1

0.3000000000,0.,0.7000000000

(7)

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

P1TreePlotT,thickness=2,axes=BOXED,gridlines=true:

SetUnderlyingT,5,1,8.5

P2TreePlotT,thickness=2,axes=BOXED,color=red,gridlines=true:

plots[display]P1,P2

In this example you will use the third construction.

Su1.1

Su:=1.1

(8)

Sd0.95

Sd:=0.95

(9)

TTrinomialTree3,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

Inspect the tree.

GetUnderlyingT,5,1

146.4100000

(10)

GetProbabilitiesT,3,1

0.3000000000,0.,0.7000000000

(11)

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

P1TreePlotT,thickness=2,axes=BOXED,gridlines=true:

forito20doSetUnderlyingT,i,i,1000.9i1end do

P2TreePlotT,thickness=2,axes=BOXED,color=red,gridlines=true:

plots[display]P1,P2

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.

  

Hull, J., and White, A., Numerical Procedures for Implementing Term Structure Models I: Single-Factor Models, Journal of Derivatives, 1994, 7-16.

  

Hull, J., and White, A., Using Hull-White Interest Rate Trees, Journal of Derivatives, 1996, 26-36.

Compatibility

• 

The Finance[TrinomialTree] 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]

 


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