 Lattice Methods Overview - Maple Help

Home : Support : Online Help : Mathematics : Finance : Lattice Methods : Lattice Methods Overview

Constructing Lattice Methods Using the Finance Package Overview

There are three main numerical procedures that can be used to value derivatives when exact formulas are not available. These involve the use of recombining trees, Monte Carlo simulation, and finite difference methods. Monte Carlo simulation is used primarily for derivatives where the payoff is dependent on the history of the underlying variable, or where there are several underlying variables. Recombining trees and finite difference methods are particularly useful when the holder has early exercise decisions to make prior to maturity. In addition to valuing a derivative, all the procedures can be used to calculate the market sensitivities (or the Greeks) such as Delta, Gamma, and Vega.

The Financial Modeling package provides various tools for constructing binomial and trinomial tree approximations of stochastic processes. These include simple binomial trees such as Jarrow-Rudd or Cox-Ross-Rubinstein, trinomial trees, implied binomial and trinomial trees as well as general tree-building tools.

 - construct a recombining binomial tree data structure - create a recombining binomial tree for a Black-Scholes process - create a recombining trinomial tree for a Black-Scholes process - construct an implied Black-Scholes binomial tree - construct an implied Black-Scholes trinomial tree - construct a trinomial tree for a short-rate process - plot a binomial or trinomial tree - construct a mutable recombining trinomial tree data structure

The following commands can be used to inspect/manipulate a tree data structure.

 - return descendants for a node of a binomial or trinomial tree - return probabilities for a node of a binomial or trinomial tree - return the value of the underlying for a node of a binomial or trinomial tree - return the local volatility node of a Black-Scholes binomial or trinomial tree - set probabilities for a node of a binomial or trinomial tree - set the value of the underlying for a node of a binomial or trinomial tree Constant Volatility Binomial Trees

Binomial trees are frequently used to approximate the movements in the price of a stock or other asset under the Black-Scholes-Merton model. There are several approaches to building the underlying binomial tree, such as Cox-Ross-Rubinstein, Jarrow-Rudd, and Tian. In all of the approaches above, the lattice is designed so as to minimize the discrepancy between the approximate (discrete) and target (continuous) distributions by matching, exactly or approximately, their first few moments. The rationale for this is that for any fixed number of time steps, a moment-matching lattice is believed to produce better option price estimates.

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

If you denote by ${S}_{u}$and ${S}_{d}$ the multiplicative constants for up and down movements in the tree, and by ${P}_{u}$ and  the probabilities of the upward and the downward movements, then the stock price  at the $i$-th time step and the $j$-th node is

${S}_{i,j}={S}_{0}{S}_{u}{}^{j}{S}_{d}{}^{i-j}$ for

and

${P}_{i,j\to k}={\begin{array}{cc}{P}_{u}& k=j+1\\ {P}_{d}& k=j\\ 0& \mathrm{otherwis}\end{array}.$

You know that the three variables satisfy two equations, so there is some freedom to assign a value to one of the variables. This is the reason leading to the different versions of the binomial tree. In a risk-neutral binomial tree the transition probabilities can then be determined from the no-arbitrage condition

where ${S}_{f}=\mathrm{exp}\left(r\cdot \mathrm{Δt}\right)\cdot {S}_{p}$ is the known forward price of the stock. In a general constant volatility recombining binomial tree ${S}_{u}$ and ${S}_{d}$ have the form

and

for some reasonable value of $q$.

 >
 ${{S}}_{{u}}{:=}{{ⅇ}}^{{q}{}{\mathrm{Δt}}{+}{\mathrm{σ}}{}\sqrt{{\mathrm{Δt}}}}$ (2.1)
 >
 ${{S}}_{{d}}{:=}{{ⅇ}}^{{q}{}{\mathrm{Δt}}{-}{\mathrm{σ}}{}\sqrt{{\mathrm{Δt}}}}$ (2.2)
 > ${S}_{f}:={ⅇ}^{r\mathrm{Δt}}{S}_{p}$
 ${{S}}_{{f}}{:=}{{ⅇ}}^{{r}{}{\mathrm{Δt}}}{}{{S}}_{{p}}$ (2.3)

The corresponding transition probabilities are

 > $\mathrm{solve}\left(\left\{{S}_{p}{S}_{u}{P}_{u}+{S}_{p}{S}_{d}{P}_{d}={S}_{f},{P}_{u}+{P}_{d}=1\right\},\left\{{P}_{u},{P}_{d}\right\}\right);$
 $\left\{{{P}}_{{d}}{=}\frac{{-}{{ⅇ}}^{{r}{}{\mathrm{Δt}}}{+}{{ⅇ}}^{{q}{}{\mathrm{Δt}}{+}{\mathrm{σ}}{}\sqrt{{\mathrm{Δt}}}}}{{{ⅇ}}^{{q}{}{\mathrm{Δt}}{+}{\mathrm{σ}}{}\sqrt{{\mathrm{Δt}}}}{-}{{ⅇ}}^{{q}{}{\mathrm{Δt}}{-}{\mathrm{σ}}{}\sqrt{{\mathrm{Δt}}}}}{,}{{P}}_{{u}}{=}{-}\frac{{{ⅇ}}^{{q}{}{\mathrm{Δt}}{-}{\mathrm{σ}}{}\sqrt{{\mathrm{Δt}}}}{-}{{ⅇ}}^{{r}{}{\mathrm{Δt}}}}{{{ⅇ}}^{{q}{}{\mathrm{Δt}}{+}{\mathrm{σ}}{}\sqrt{{\mathrm{Δt}}}}{-}{{ⅇ}}^{{q}{}{\mathrm{Δt}}{-}{\mathrm{σ}}{}\sqrt{{\mathrm{Δt}}}}}\right\}$ (2.4)
 > $\mathrm{assign}\left(\right);$
 > ${P}_{u};$
 ${-}\frac{{{ⅇ}}^{{q}{}{\mathrm{Δt}}{-}{\mathrm{σ}}{}\sqrt{{\mathrm{Δt}}}}{-}{{ⅇ}}^{{r}{}{\mathrm{Δt}}}}{{{ⅇ}}^{{q}{}{\mathrm{Δt}}{+}{\mathrm{σ}}{}\sqrt{{\mathrm{Δt}}}}{-}{{ⅇ}}^{{q}{}{\mathrm{Δt}}{-}{\mathrm{σ}}{}\sqrt{{\mathrm{Δt}}}}}$ (2.5)
 > ${P}_{d};$
 $\frac{{-}{{ⅇ}}^{{r}{}{\mathrm{Δt}}}{+}{{ⅇ}}^{{q}{}{\mathrm{Δt}}{+}{\mathrm{σ}}{}\sqrt{{\mathrm{Δt}}}}}{{{ⅇ}}^{{q}{}{\mathrm{Δt}}{+}{\mathrm{σ}}{}\sqrt{{\mathrm{Δt}}}}{-}{{ⅇ}}^{{q}{}{\mathrm{Δt}}{-}{\mathrm{σ}}{}\sqrt{{\mathrm{Δt}}}}}$ (2.6)

Consider the Black-Scholes process with the following parameters:

 > $r:=0.03;$
 ${r}{:=}{0.03}$ (2.7)
 > $\mathrm{σ}≔0.2;$
 ${\mathrm{σ}}{:=}{0.2}$ (2.8)
 > $N:=20;$
 ${N}{:=}{20}$ (2.9)
 > $T:=3.0;$
 ${T}{:=}{3.0}$ (2.10)
 > $\mathrm{Δt}:=\frac{T}{N}$
 ${\mathrm{Δt}}{:=}{0.1500000000}$ (2.11) Cox-Ross-Rubinstein Binomial Tree

The binomial tree introduced by Cox, Ross and Rubinstein in 1979 (hereafter CRR) is one of the most important innovations to have appeared in the option pricing literature. Beyond its original use as a tool to approximate the prices of European and American options in the Black-Scholes (1973) framework, it is also widely used as a pedagogical device to introduce various key concepts in option pricing. CRR presented the fundamental economic principles of option pricing by arbitrage considerations in the most simplest manner. By application of a central limit theorem, they proved that their model merges into the Black and Scholes model when the time steps between successive trading instances approach zero. Additionally, the model was used to evaluate American type options and options on assets with continuous dividend payments. The Cox, Ross, and Rubinstein model makes the multiplication of up and down jumps equal

,

and

This corresponds to the case when $q=0.$

 > $q≔0;$
 ${q}{:=}{0}$ (2.1.1)
 > $\mathrm{CRR}:=\mathrm{BinomialTree}\left(T,N,100,{S}_{u},{P}_{u},{S}_{d},{P}_{d}\right):$
 > $\mathrm{TreePlot}\left(\mathrm{CRR},\mathrm{axes}=\mathrm{BOXED},\mathrm{thickness}=3,\mathrm{gridlines}=\mathrm{true}\right);$ Here is a logarithmic view of the same tree.

 > $\mathrm{TreePlot}\left(\mathrm{CRR},\mathrm{axes}=\mathrm{BOXED},\mathrm{thickness}=3,\mathrm{gridlines}=\mathrm{true},\mathrm{scale}=\mathrm{logarithmic}\right);$ > $\mathrm{GetProbabilities}\left(\mathrm{CRR},2,2\right)$
 $\left[{0.5097284963}{,}{0.4902715037}\right]$ (2.1.2) Jarrow-Rudd Binomial Tree

There exist many extensions of the CRR model. Jarrow and Rudd (1983), JR, adjusted the CRR model to account for the local drift term

,

They constructed a binomial model where the first two moments of the discrete and continuous time-return processes match. As a consequence, a probability measure equal to one half results. This corresponds to the case when $q=r-\frac{{\mathrm{σ}}^{2}}{2}$.

 > $q≔r-\frac{{\mathrm{σ}}^{2}}{2};$
 ${q}{:=}{0.01000000000}$ (2.2.1)
 > ${S}_{u},{S}_{d};$
 ${1.082160674}{,}{0.9268535887}$ (2.2.2)
 > ${P}_{u},{P}_{d};$
 ${0.5000193723}{,}{0.4999806277}$ (2.2.3)
 > $\mathrm{JR}≔\mathrm{BinomialTree}\left(T,N,100,{S}_{u},{P}_{u},{S}_{d},{P}_{d}\right):$
 > $\mathrm{TreePlot}\left(\mathrm{JR},\mathrm{axes}=\mathrm{BOXED},\mathrm{thickness}=3,\mathrm{gridlines}=\mathrm{true}\right);$ > $\mathrm{TreePlot}\left(\mathrm{JR},\mathrm{axes}=\mathrm{BOXED},\mathrm{thickness}=3,\mathrm{gridlines}=\mathrm{true},\mathrm{scale}=\mathrm{logarithmic}\right);$  Trinomial Trees

 > $\mathrm{restart};$$\mathrm{with}\left(\mathrm{Finance}\right):$
 > $X:=\mathrm{ItoProcess}\left(0.1,\mathrm{sin}\left(t\right),0.1,x,t\right);$
 ${X}{:=}{\mathrm{_X}}$ (3.1)
 > $\mathrm{Drift}\left(X\left(t\right)\right);$
 ${\mathrm{sin}}{}\left({t}\right)$ (3.2)
 > $\mathrm{Diffusion}\left(X\left(t\right)\right);$
 ${0.1}$ (3.3)

The Financial Modeling package provides some tools for approximating diffusions using trinomial trees.

 > $T:=\mathrm{ShortRateTree}\left(X,5.0,10\right):$
 > $\mathrm{TreePlot}\left(T,\mathrm{thickness}=2,\mathrm{color}=\mathrm{blue},\mathrm{gridlines}=\mathrm{true}\right);$  Implied Binomial Trees

In this example you will construct an implied binomial tree and use it to price some other instruments.

 > $\mathrm{restart};$$\mathrm{with}\left(\mathrm{Finance}\right):$
 > $r:=0.11;$
 ${r}{:=}{0.11}$ (4.1)
 > $d:=0.04;$
 ${d}{:=}{0.04}$ (4.2)
 > $\mathrm{σ}:=\mathrm{ImpliedVolatilitySurface}\left(0.11-\frac{\left(K-100\right)\cdot 0.001}{10},t,K\right):$
 > $T:=\mathrm{ImpliedBinomialTree}\left(100,r,d,\mathrm{σ},3,7\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(T,\mathrm{thickness}=2,\mathrm{axes}=\mathrm{BOXED},\mathrm{gridlines}=\mathrm{true}\right);$ > $\mathrm{TreePlot}\left(T,\mathrm{thickness}=2,\mathrm{axes}=\mathrm{BOXED},\mathrm{gridlines}=\mathrm{true},\mathrm{color}=\mathrm{red}..\mathrm{blue},\mathrm{scale}=\mathrm{logarithmic}\right);$ Inspect the tree.

 > $\mathrm{GetProbabilities}\left(T,1,1\right);$
 $\left[{0.5000000000}{,}{0.5000000000}\right]$ (4.3)
 > $\mathrm{GetProbabilities}\left(T,2,1\right);$
 $\left[{0.3817424623}{,}{0.6182575377}\right]$ (4.4)
 > $\mathrm{GetProbabilities}\left(T,2,2\right);$
 $\left[{0.6409710334}{,}{0.3590289666}\right]$ (4.5)

Compare this tree with the standard Cox-Ross-Rubinstein binomial tree constructed for the volatility equal to sigma(0, 100).

 > $\mathrm{T2}:=\mathrm{BlackScholesBinomialTree}\left(100,r,d,\mathrm{σ}\left(0,100\right),3,7\right):$
 > $\mathrm{P1}:=\mathrm{TreePlot}\left(T,\mathrm{thickness}=2,\mathrm{axes}=\mathrm{BOXED},\mathrm{gridlines}=\mathrm{true},\mathrm{color}=\mathrm{blue}\right):$
 > $\mathrm{P2}:=\mathrm{TreePlot}\left(\mathrm{T2},\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);$ >
 ${P}{:=}\left({S}{,}{T}\right){→}{\mathrm{Finance}}{:-}{\mathrm{BlackScholesPrice}}{}\left({100.}{,}{S}{,}{T}{,}{\mathrm{σ}}{}\left({T}{,}{S}\right){,}{r}{,}{d}{,}{\mathrm{put}}\right)$ (4.6)
 >
 ${C}{:=}\left({S}{,}{T}\right){→}{\mathrm{Finance}}{:-}{\mathrm{BlackScholesPrice}}{}\left({100.}{,}{S}{,}{T}{,}{\mathrm{σ}}{}\left({T}{,}{S}\right){,}{r}{,}{d}{,}{\mathrm{call}}\right)$ (4.7)
 > $P\left(100,1.0\right);$
 ${1.62044795}$ (4.8)
 > $C\left(100,1.0\right);$
 ${8.11597835}$ (4.9)
 > $T:=\mathrm{ImpliedBinomialTree}\left(100,r,d,\mathrm{σ},1,200\right):$
 > $E:=\mathrm{EuropeanOption}\left(t→\mathrm{max}\left(t-100,0\right),1.0\right):$
 > $\mathrm{LatticePrice}\left(E,T,r\right);$
 ${8.146123180}$ (4.10)
 > $\mathrm{evalf}\left(C\left(100,1.0\right)\right);$
 ${8.11597835}$ (4.11)
 >
 ${8.11597835}$ (4.12)

So, the results match in this case.

 > $E:=\mathrm{EuropeanOption}\left(t→\mathrm{max}\left(t-130,0\right),1.0\right):$
 > $\mathrm{LatticePrice}\left(E,T,r\right);$
 ${0.1622684190}$ (4.13)
 > $\mathrm{evalf}\left(C\left(130,1.0\right)\right);$
 ${0.16229691}$ (4.14)
 >
 ${0.18855320}$ (4.15)

You can price other kinds of options using this tree.

 > $q:=t→\mathrm{piecewise}\left(t<90,0,t<110,t-90,t<130,130-t,0\right);$
 ${q}{:=}{t}{→}{\mathrm{piecewise}}{}\left({t}{<}{90}{,}{0}{,}{t}{<}{110}{,}{t}{-}{90}{,}{t}{<}{130}{,}{130}{-}{t}{,}{0}\right)$ (4.16)
 > $\mathrm{plot}\left(q,80..150,\mathrm{gridlines},\mathrm{thickness}=3\right);$ > $E:=\mathrm{EuropeanOption}\left(q,1.0\right):$
 > $\mathrm{LatticePrice}\left(E,T,r\right);$
 ${9.644001241}$ (4.17)
 > $A:=\mathrm{AmericanOption}\left(q,0,1.0\right):$
 > $\mathrm{LatticePrice}\left(A,T,r\right);$
 ${14.07012078}$ (4.18) References

 • John C. Hull, Options, Futures, and Other Derivatives, Prentice Hall, 2002
 • Global Derivatives, http://www.global-derivatives.com/
 • MathFinance, http://www.mathfinance.de/
 • Lishang Jiang, Mathematical Modeling and Methods of Option Pricing, Higher Education Press, 2003
 • Michel Denault, Genevieve Gauthier, and Jean-Guy Simonato, Improving Lattice Schemes Throught Bias Reduction, 2003
 • Leisen, D. and Reimer, M. (1996). Binomial Models For Option Valuation - Examining and Improving Convergence. Applied Mathematical Finance 3 pp. 319-346
 • Trigeorgis, L., A Log-Transformed Binomial Numerical Analysis Method for Valuing Complex Multi-Option Investments, Journal of Financial and Quantitative Analysis, Vol. 26, pp. 309-326, 1991 See Also