Finance - Maple Programming Help

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

Finance

 BlackScholesTrinomialTree
 create a recombining trinomial tree approximating a Black-Scholes process

 Calling Sequence BlackScholesTrinomialTree(${S}_{0}$, r, d, v, T, N) BlackScholesTrinomialTree(${S}_{0}$, r, d, v, G)

Parameters

 ${S}_{0}$ - positive constant; the inital value of the underlying asset r - non-negative constant or yield term structure; annual risk-free rate function for the underlying asset d - non-negative constant or yield term structure; annual dividend rate function for the underlying asset v - non-negative constant or a volatility term structure; local volatility T - positive constant; time to maturity date (in years) N - positive integer; number of steps G - the number of steps used in the trinomial tree

Description

 • The BlackScholesTrinomialTree(${S}_{0}$, r, d, v, G) command returns a trinomial tree approximating a Black-Scholes process with the specified parameters. Each step of this tree is obtained by combining two steps of the corresponding binomial tree (see Finance[BlackScholesBinomialTree] for more details).
 • The BlackScholesTrinomialTree(${S}_{0}$, r, d, v, T, N) command is similar except that in this case a uniform time grid with step size $\frac{T}{N}$ is used instead of G.

Examples

 > $\mathrm{with}\left(\mathrm{Finance}\right):$

First you construct a trinomial tree for a Black-Scholes process with constant drift and volatility.

 > $\mathrm{S0}≔100:$
 > $r≔0.1:$
 > $d≔0.05:$
 > $v≔0.15:$
 > $\mathrm{T0}≔\mathrm{BlackScholesTrinomialTree}\left(\mathrm{S0},r,d,v,3,10\right):$

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

 > $\mathrm{TreePlot}\left(\mathrm{T0},\mathrm{thickness}=2,\mathrm{axes}=\mathrm{BOXED},\mathrm{gridlines}=\mathrm{true}\right)$ > $\mathrm{TreePlot}\left(\mathrm{T0},\mathrm{thickness}=2,\mathrm{axes}=\mathrm{BOXED},\mathrm{gridlines}=\mathrm{true},\mathrm{color}=\mathrm{red},\mathrm{scale}=\mathrm{logarithmic}\right)$ Inspect the tree.

 > $\mathrm{GetUnderlying}\left(\mathrm{T0},2,1\right)$
 ${112.3208700}$ (1)
 > $\mathrm{GetUnderlying}\left(\mathrm{T0},2,2\right)$
 ${99.99999998}$ (2)
 > $\mathrm{GetProbabilities}\left(\mathrm{T0},1,1\right)$
 $\left[{0.3027600400}{,}{0.4949526183}{,}{0.2022873417}\right]$ (3)

Here is an example of a Black-Scholes process with time-dependent drift and volatility.

 > $v≔\mathrm{LocalVolatilitySurface}\left(0.15-t\cdot 0.01,t,K\right):$
 > $\mathrm{T1}≔\mathrm{BlackScholesTrinomialTree}\left(\mathrm{S0},r,d,v,3,10\right):$

Again, you have two different views of the same tree. The first one uses the standard scale, the second one uses the logarithmic scale.

 > $\mathrm{TreePlot}\left(\mathrm{T1},\mathrm{thickness}=2,\mathrm{axes}=\mathrm{BOXED},\mathrm{gridlines}=\mathrm{true}\right)$ > $\mathrm{TreePlot}\left(\mathrm{T1},\mathrm{thickness}=2,\mathrm{axes}=\mathrm{BOXED},\mathrm{gridlines}=\mathrm{true},\mathrm{color}=\mathrm{red},\mathrm{scale}=\mathrm{logarithmic}\right)$ Inspect the second tree.

 > $\mathrm{GetUnderlying}\left(\mathrm{T1},2,1\right)$
 ${112.0601630}$ (4)
 > $\mathrm{GetUnderlying}\left(\mathrm{T1},2,2\right)$
 ${100.}$ (5)
 > $\mathrm{GetUnderlying}\left(\mathrm{T1},2,3\right)$
 ${89.23777849}$ (6)
 > $\mathrm{GetProbabilities}\left(\mathrm{T1},1,1\right)$
 $\left[{0.3027600400}{,}{0.2022873417}{,}{0.4949526183}\right]$ (7)
 > $\mathrm{GetProbabilities}\left(\mathrm{T1},2,2\right)$
 $\left[{0.3045379854}{,}{0.2008387776}{,}{0.4946232370}\right]$ (8)

Compare the two trees.

 > $\mathrm{P1}≔\mathrm{TreePlot}\left(\mathrm{T0},\mathrm{thickness}=2,\mathrm{axes}=\mathrm{BOXED},\mathrm{gridlines}=\mathrm{true},\mathrm{color}=\mathrm{blue}\right):$
 > $\mathrm{P2}≔\mathrm{TreePlot}\left(\mathrm{T1},\mathrm{thickness}=2,\mathrm{axes}=\mathrm{BOXED},\mathrm{gridlines}=\mathrm{true},\mathrm{color}=\mathrm{red}\right):$
 > $\mathrm{plots}[\mathrm{display}]\left(\mathrm{P1},\mathrm{P2}\right)$ References

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

Compatibility

 • The Finance[BlackScholesTrinomialTree] command was introduced in Maple 15.
 • For more information on Maple 15 changes, see Updates in Maple 15.