Constructing Lattice Methods Using the Finance Package - Maple Programming Help

Online Help

All Products    Maple    MapleSim


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

Constructing Lattice Methods Using the Finance Package

 

Overview

Constant Volatility Binomial Trees

Trinomial Trees

Implied Binomial Trees

References

See Also

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.

 

BinomialTree

-

construct a recombining binomial tree data structure

BlackScholesBinomialTree

-

create a recombining binomial tree for a Black-Scholes process

BlackScholesTrinomialTree

-

create a recombining trinomial tree for a Black-Scholes process

ImpliedBinomialTree

-

construct an implied Black-Scholes binomial tree

ImpliedTrinomialTree

-

construct an implied Black-Scholes trinomial tree

ShortRateTree

-

construct a trinomial tree for a short-rate process

TreePlot

-

plot a binomial or trinomial tree

TrinomialTree

-

construct a mutable recombining trinomial tree data structure

 

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

 

GetDescendants

-

return descendants for a node of a binomial or trinomial tree

GetProbabilities

-

return probabilities for a node of a binomial or trinomial tree

GetUnderlying

-

return the value of the underlying for a node of a binomial or trinomial tree

GetLocalVolatility

-

return the local volatility node of a Black-Scholes binomial or trinomial tree

SetProbabilities

-

set probabilities for a node of a binomial or trinomial tree

SetUnderlying

-

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.

 

restart;withFinance:

 

If you denote by Su and Sd the multiplicative constants for up and down movements in the tree, and by Pu and Pd  the probabilities of the upward and the downward movements, then the stock price Sp = Si, j at the i-th time step and the j-th node is             

                                                                                

Si,j=S0SujSdij for  i 0, 1, ..., n, j  0, 1, ..., i

 

and

Pi,jk={Puk=j+1Pdk=j0otherwis.

 

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

 

SpSuPu+SpSdPd=Sf,  

 

where Sf=exprΔtSp is the known forward price of the stock. In a general constant volatility recombining binomial tree Su and Sd have the form

 

Su=ⅇqΔt+σ Δt and Sd=ⅇqΔtσ Δt

 

for some reasonable value of q.

Su:=ⅇqΔt+σ Δt

Su:=ⅇqΔt+σΔt

(2.1)

Sd:=ⅇqΔtσ Δt

Sd:=ⅇqΔtσΔt

(2.2)

Sf:=ⅇrΔtSp

Sf:=ⅇrΔtSp

(2.3)

 

The corresponding transition probabilities are

 

solveSpSuPu+SpSdPd=Sf,Pu+Pd=1,Pu,Pd;

Pd=ⅇrΔt+ⅇqΔt+σΔtⅇqΔt+σΔtⅇqΔtσΔt,Pu=ⅇqΔtσΔtⅇrΔtⅇqΔt+σΔtⅇqΔtσΔt

(2.4)

assign;

Pu;

ⅇqΔtσΔtⅇrΔtⅇqΔt+σΔtⅇqΔtσΔt

(2.5)

Pd;

ⅇrΔt+ⅇqΔt+σΔtⅇqΔt+σΔtⅇqΔtσΔt

(2.6)

 

 

Consider the Black-Scholes process with the following parameters:

 

r:=0.03;

r:=0.03

(2.7)

σ0.2;

σ:=0.2

(2.8)

N:=20;

N:=20

(2.9)

T:=3.0;

T:=3.0

(2.10)

Δt:=TN

Δ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

Su = expσTn,   Sd = exp σTn,

and

Pu = aexprTn  du  d = exprTn  expσ Tnexpσ Tn  expσ Tn .

This corresponds to the case when q=0.

 

q0;

q:=0

(2.1.1)

CRR:=BinomialTreeT,N,100,Su,Pu,Sd,Pd:

TreePlotCRR,axes=BOXED,thickness=3,gridlines=true;

Here is a logarithmic view of the same tree.

 

TreePlotCRR,axes=BOXED,thickness=3,gridlines=true,scale=logarithmic;

GetProbabilitiesCRR,2,2

0.5097284963,0.4902715037

(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

 

Su = expr  σ22Tn + σTn,   Sd = expr  σ22Tn  σTn.

 

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σ22.

 

qrσ22;

q:=0.01000000000

(2.2.1)

Su,Sd;

1.082160674,0.9268535887

(2.2.2)

Pu,Pd;

0.5000193723,0.4999806277

(2.2.3)

JRBinomialTreeT,N,100,Su,Pu,Sd,Pd:

TreePlotJR,axes=BOXED,thickness=3,gridlines=true;

TreePlotJR,axes=BOXED,thickness=3,gridlines=true,scale=logarithmic;

Trinomial Trees

restart;withFinance:

X:=ItoProcess0.1,sint,0.1,x,t;

X:=_X

(3.1)

DriftXt;

sint

(3.2)

DiffusionXt;

0.1

(3.3)

 

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

 

T:=ShortRateTreeX,5.0,10:

TreePlotT,thickness=2,color=blue,gridlines=true;

 

Implied Binomial Trees

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

 

restart;withFinance:

r:=0.11;

r:=0.11

(4.1)

d:=0.04;

d:=0.04

(4.2)

σ:=ImpliedVolatilitySurface0.11K1000.00110,t,K:

T:=ImpliedBinomialTree100,r,d,σ,3,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.

 

GetProbabilitiesT,1,1;

0.5000000000,0.5000000000

(4.3)

GetProbabilitiesT,2,1;

0.3817424623,0.6182575377

(4.4)

GetProbabilitiesT,2,2;

0.6409710334,0.3590289666

(4.5)

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

 

T2:=BlackScholesBinomialTree100,r,d,σ0,100,3,7:

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

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

plotsdisplayP1,P2;

P:=S,TBlackScholesPrice100.,S,T,σT,S,r, d, put;

P:=S,T→Finance:-BlackScholesPrice100.,S,T,σT,S,r,d,put

(4.6)

C:=S,TBlackScholesPrice100.,S,T,σT,S,r, d, call;

C:=S,T→Finance:-BlackScholesPrice100.,S,T,σT,S,r,d,call

(4.7)

P100,1.0;

1.62044795

(4.8)

C100,1.0;

8.11597835

(4.9)

T:=ImpliedBinomialTree100,r,d,σ,1,200:

E:=EuropeanOptiont→maxt100,0,1.0:

LatticePriceE,T,r;

8.146123180

(4.10)

evalfC100,1.0;

8.11597835

(4.11)

BlackScholesPrice100.,100,1.0,r,σ0.0,100,d, call;

8.11597835

(4.12)

 

So, the results match in this case.

 

E:=EuropeanOptiont→maxt130,0,1.0:

LatticePriceE,T,r;

0.1622684190

(4.13)

evalfC130,1.0;

0.16229691

(4.14)

BlackScholesPrice100.,130,1.0,σ0.0,100,r, d, call;

0.18855320

(4.15)

 

You can price other kinds of options using this tree.

 

q:=t&rarr;piecewiset<90&comma;0&comma;t<110&comma;t90&comma;t<130&comma;130t&comma;0&semi;

q:=t&rarr;piecewiset<90&comma;0&comma;t<110&comma;t90&comma;t<130&comma;130t&comma;0

(4.16)

plotq&comma;80..150&comma;gridlines&comma;thickness&equals;3&semi;

E:=EuropeanOptionq&comma;1.0&colon;

LatticePriceE&comma;T&comma;r&semi;

9.644001241

(4.17)

A:=AmericanOptionq&comma;0&comma;1.0&colon;

LatticePriceA&comma;T&comma;r&semi;

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

Calendars worksheet, Term Structures worksheet, Stochastic Processes worksheet, Day Counters worksheet, Cash Flow Analysis worksheet


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