notes on solving the black-scholes equation
TRANSCRIPT
-
8/2/2019 Notes on Solving the Black-Scholes Equation
1/20
Notes on Solving the Black-Scholes Equation
Eola Investments, LLC
October 2009
All Rights Reserved
Quantitative Discove
Page 1 of 20Eola Investments LLCAll Rights Reserved
mailto:[email protected]://www.eolainvestments.com/http://www.eolainvestments.com/mailto:[email protected]://www.eolainvestments.com/ -
8/2/2019 Notes on Solving the Black-Scholes Equation
2/20
ABSTRACT
Solving the Black-Scholes equation is a good exercise for oneself in that it involves several very
useful techniques such as asymptotic analysis, change of variables, Green's function, Fourier transform,
and complex integration that can be applied elsewhere. Presented here is a systematic and self-
contained exercise to derive a closed-form solution of the Black-Scholes equation for a European call
option for the purpose of fun.
Quantitative Discove
Page 2 of 20Eola Investments LLCAll Rights Reserved
http://www.eolainvestments.com/http://www.eolainvestments.com/http://www.eolainvestments.com/ -
8/2/2019 Notes on Solving the Black-Scholes Equation
3/20
STEP 1: TRANSFORM BLACK-SCHOLES EQUATION TO DIFFUSION EQUATION
It should not be surprised that the Black-Scholes equation can be reduced to a diffusion
equation, given that the Black-Scholes equation comes from a geometrical Brownian motion. However,
the transformation is not obvious. The following derivations can be regarded as side notes to
Silverman's work [1] .
With common notations, the Black-Scholes equation is
V t
rSV S
1
22 S
2 2V
S2rV=0 (1)
It is easy to spot that the coefficients of the second and third terms can be changed to constants by a
transformation of variables S lnS . However, strictly speaking, S has an unit and the log operator
can only apply to unitless quantities. We need to normalize S by some constant with the same unit as S.
A natural choice is the strike price K. Let x=ln S/K , we have
V S
=Vx
dx
dS=Vx
1
S
2V
S2= S
V
S= S
1
S
V
x=1
S2
V
x
1
S
x
V
x
dx
dS=1
S2
V
x
1
S2
2V
x2
and Eq. (1) becomes
V
tr
1
22
V
x
1
2 2
2V
x2rV=0 (2)
In solving a partial differential equation we typically specify initial conditions, where the values
of the function at the start are known. That is, we would like to work on time to maturity, Tt , to
solve the equation, since at the time to maturity the value of a call option is exactly known. Using time
to maturity as the time variable, we have
Quantitative Discove
Page 3 of 20Eola Investments LLCAll Rights Reserved
http://www.eolainvestments.com/http://www.eolainvestments.com/http://www.eolainvestments.com/ -
8/2/2019 Notes on Solving the Black-Scholes Equation
4/20
V
Ttr
1
22
Vx
1
222V
x2rV=0 (3)
Now let us consider a special case that r=2 / 2 , (which may not be so remote if the current
account deficits of US continue skyrocketing and Fed continues printing papers to finance it), and a
region thatx is large enough that the curvature can be neglected. In this case the second and third terms
are dropped from Eq. (3) and the equation asymptotically becomes
VTt
~rV , r=2/ 2 and x (4)
The solution to Eq. (4) is straightforward; it takes the form
V~CerTt (5)
where Cis not a function of t. This relationship strongly suggests that if we construct a new function
W=VerTt (6)
this function can absorb the rV term. Let us check:
VTt = We
r Tt
Tt =er Tt WTtWe
rTt
V
x=WerTt
x=e
rTt W
x
2V
x2=2 WerTt
x2
=erTt
2W
x2
Inserting above terms into Eq. (3) we have a more simplified Black-Scholes equation
W
Ttr
1
22
Wx
1
2 2
2W
x2=0 (7)
Again let us consider another special case where the time to maturity is so long that a few days
change in time will not affect the value of an option, given the same stock price. In this case, the time
Quantitative Discove
Page 4 of 20Eola Investments LLCAll Rights Reserved
http://www.eolainvestments.com/http://www.eolainvestments.com/http://www.eolainvestments.com/ -
8/2/2019 Notes on Solving the Black-Scholes Equation
5/20
derivative term is neglected, resulting in a second order ordinary differential equation.
r1
2 2
Wx
1
222W
x2~0 , Tt (8)
Rearranging Eq. (8), we get
2W
x2
r2/2
2/2
Wx
~0 (9)
This equation is very easy to solve. Its solution takes the form of
W~ABe
r2/2
2/2
x
whereA andB are not functions ofx. Note the coefficient ofx. If we group it intox to construct a new
variabley, we may be able to eliminate the coefficients in Eq (8), thus in Eq (7). Let us check.
y=r2/2
2/2
x (10)
W
x=W
y
dy
dx=W
y
r 2/2
2/ 2
2W
x2=
x
W
x=
xW
y
r2/2
2/2=
r 2/2
2/ 2
yW
y
dy
dx=
r 2/2
2 /22 2W
y2
Combining the above equations with Eq. (7), we have
W
Ttr
2/2
2
2/ 2
W y
r
2/2
2
2/2
2W
y2=0
W
[ r2/2
2
2 /2Tt]
W
y
2W
y2=0
Let
Quantitative Discove
Page 5 of 20Eola Investments LLCAll Rights Reserved
http://www.eolainvestments.com/http://www.eolainvestments.com/http://www.eolainvestments.com/ -
8/2/2019 Notes on Solving the Black-Scholes Equation
6/20
=r2/22
2/2
Tt (11)
we get a cleaner version of the equation
W
=Wy
2
W y
2 (12)
Once again let us consider another special case where the curvature effect can be neglected
(deep out of money options with short time to maturity) . In this case Eq. (12) is reduced to
W
~Wy
, y and 0 (13)
Its solution is
W~D y (14)
whereD is a constant. This solution prompts us to replacey with a new variable,
z=y (15)
Now we regard Was a function of andz, i.e., W=W, z, y . The consequences of this
change of variable are
W, y
=W, z, y
W, z, y
zz
=W, z, y
W, z, y
z
W, y
y=W, z, y
zzy
=W, z, y
z
2W, y
y2 =y
W, yy =
y
W, z, yz =
2W , z, y
z2zy=
2 W, z, y
z2
Substituting the above relationships into the Eq. 12, we finally have the diffusion equation
W
=
2W
z2 , 0 and z [16]
Quantitative Discove
Page 6 of 20Eola Investments LLCAll Rights Reserved
http://www.eolainvestments.com/http://www.eolainvestments.com/http://www.eolainvestments.com/ -
8/2/2019 Notes on Solving the Black-Scholes Equation
7/20
Let us summarize all changes of variables here:
W=VerTt (6)
=r2/22
2
/2
Tt (11)
z=r2 /22
2/2Tt
r2/2
2/2ln
S
K (17)
Quantitative Discove
Page 7 of 20Eola Investments LLCAll Rights Reserved
http://www.eolainvestments.com/http://www.eolainvestments.com/http://www.eolainvestments.com/ -
8/2/2019 Notes on Solving the Black-Scholes Equation
8/20
STEP 2: GREEN'S FUNCTION FOR DIFFUSION EQUATION
Let us use the diffusion equation to review the Green's function method for solving differential
equations. A general explicit one dimensional diffusion equation using our notations here is like this:
W
2W
z2=Q, z , 0 and z (17)
which is subject to certain initial condition W0,z and boundary conditions. A very lucky
characteristics of the above equation is its linearity. For example, if
W
2W
z2=Q1, z has a solution W= f1, z , and
W
2W
z2=Q2, z has a solution W= f2, z
under the same initial and boundary conditions, we can immediately know that
W
2W
z2=Q1, zQ2, z has a solution W= f1, zf2, z .
Another aspect of linearity is that if
W
2W
z2=Q, z has a solution W= f, z
then we know that
W
2W
z2=cQ , z has a solution W=cf, z
where c is a constant.
Having these two extremely handy properties in mind, we can solve Eq. (17) by first dividing
the function Q, z into tiny pieces and solve them individually, then add the solutions together to
obtain the global solution. Actually we do not need to solve numerous equations as one might think so
Quantitative Discove
Page 8 of 20Eola Investments LLCAll Rights Reserved
http://www.eolainvestments.com/http://www.eolainvestments.com/http://www.eolainvestments.com/ -
8/2/2019 Notes on Solving the Black-Scholes Equation
9/20
since we have divided the function Q, z numerous times. We only need to solve it once with one
single piece of Q, z which can be representative to any other tiny pieces. Such a representative
piece is described by a unit impulse and the representative diffusion equation is
W, z
2W, zz
2=' zz ' (18)
where is the Dirac delta function, which is an extension of the Kronecker delta function in discrete
space
Kronecker ij={1, i=j0, i j
(19)
to continuous space. The Dirac delta function has the following two properties:
xx '=0, xx ' (20)
xx 'dx '=1 (21)
The above properties leads to several very useful results
fx xx 'dx '= fx (22)
xx '=d
dxh xx ' , h xx '=
xx 'dx (23)
where h(x-x') is the Heaviside step function
h xx '={0, xx '
1/2, x=x '1, xx '
(24)
Note the notations in Eq. (18). andx are the variables spanning the domain of interest
while ' andx'are the location of the impulse. We call the solution of Eq. (18) the Green's function,
G , ' , z ,z ' , i.e.,
Quantitative Discove
Page 9 of 20Eola Investments LLCAll Rights Reserved
http://www.eolainvestments.com/http://www.eolainvestments.com/http://www.eolainvestments.com/ -
8/2/2019 Notes on Solving the Black-Scholes Equation
10/20
G , ' , z , z '
2G , ' , z , z '
z2
= 'zz ' (25)
By moving the impulse at ' , z ' to cover the whole surface of Q, z , we can use Eq. (18) to
reconstruct Eq. (17). And the solution of Eq. (17) is just the integration of G, ' , z ,z ' with
respect to ' , z ' over , z domain and with amplitude corrections defined by Q , z .
(Remember the impulse we have studied is an unit impulse. And the amplitude of a real tiny piece of
Q, z is, of course, defined by the amplitude ofQ at ' , z ' ). Mathematically, the solution of
Eq. (17) is
W, z=
0
G,' , z, z ' Q ' , z'dz' d ' (26)
Let us check this claim:
W, z
2W , z
z2
=0
G, ' , z ,z ' Q ' , z ' dz' d ' 2
z2
0
G,' , z , z ' Q ' , z ' dz' d '
= 0
G , ' , z , z ' Q ' , z ' dz ' d '
0
2
z2
G , ' , z , z ' Q ' , z ' dz ' d '
= 0
Q ' , z ' [ G, ' , z , z ' 2
z2
G, ' , z , z ' ]dz' d '
= 0
Q ' , z ' 'zz 'dz' d'
= Q , z
Wait! Not so quick. In the above discussion we have intentionally omitted the initial conditions.
In fact, we can consider the initial conditions are related to a special type of Q, z located at
Quantitative Discove
Page 10 of 2Eola Investments LLCAll Rights Reserved
http://www.eolainvestments.com/http://www.eolainvestments.com/http://www.eolainvestments.com/ -
8/2/2019 Notes on Solving the Black-Scholes Equation
11/20
=0 . That is, for a homogeneous diffusion equation (Q = 0), we can write
W
2W
z2=0=Q , z , 0 and z (27)
Let us define an effective half width of the Dirac delta function, , so that
d1
Integrating Eq. (27) in the domain [, ] , we have
W, z
d
2W , z
z2
d=
Q , z d
lim0
W, z== lim
0
2 W, z
z2d=Q 0,z
Now, W, z is out of bound so we set it to be zero, and we obtain an astonishing result: the
source function at =0 is the initial condition itself!
lim 0
W , z=Q 0,z (28)
And the solution to Eq. (27) is then
W, z=0
G, ' , z , z ' '0Q ' , z ' dz ' d'
=
G, z , z 'Q 0,z 'dz '
=
G , z , z 'W0,z 'dz ' (29)
The Green's function of a homogeneous diffusion equation is reduced from Eq. (25) by setting '=0
to
Quantitative Discove
Eola Investments LLCAll Rights Reserved Page 11 of 2
http://www.eolainvestments.com/http://www.eolainvestments.com/http://www.eolainvestments.com/ -
8/2/2019 Notes on Solving the Black-Scholes Equation
12/20
G , z , z '
2
G , z , z '
z2
=zz ' (30)
And using the same argument that we derived Eq. (28) we know that the Green's function at =0 is
a delta function
G0,z , z '=zz ' (31)
Now let us check that the Eq. (29) is indeed the solution of (27).
W, z
2W , z
z2
=
G, z , z 'W0,z 'dz '
2
z2
W, z , z 'Q0,z 'dz '
=
G , z , z 'W0,z ' dz '
2
z2
G , z , z ' W0,z ' dz '
=
W0,z '[ G , z , z ' 2
z2
G , z , z ']dz '
=
W0,z 'zz 'dz '
= W0,z=Q 0,z=Q , z
And check that the initial condition is fulfilled:
W0,z=
G 0,z , z 'W0,z 'dz '=
z , z 'W0,z 'dz '=W0,z
Combining Eq. (26) and Eq. (29), we obtain the general solution of a diffusion equation:
W, z=0
G, ' , z , z'Q ' , z 'dz' d'
G , z , z 'W 0,z 'dz ' (32)
Next, we need to find out what exactly the Green's function is by solving Eq. (24). Denote the
Quantitative Discove
Eola Investments LLCAll Rights Reserved Page 12 of 2
http://www.eolainvestments.com/http://www.eolainvestments.com/http://www.eolainvestments.com/ -
8/2/2019 Notes on Solving the Black-Scholes Equation
13/20
spacial Fourier transform of the Green's function as g, ' , k , k ' , we have
G, ' , z ,z ' =1
2
g,' ,k , k ' eikz
dk (33)
G , ' , z , z '
= 12
g, ' ,k , k 'eikzdk
2G , ' , z , z '
z2
=1
2
2
z2
g,' ,k , k ' eikz
dk=k2
2
g, ' ,k ,k ' eikz
dk
The Fourier transform pair of the delta function are
k=1
2
zz 'eikzdz=eikz'
2
zz '=1
2
keikz
dk=1
2
eikz'
eikz
dk
Therefore, the Fourier transform of Eq. (24) is
g, ' , k ,k '
k
2g, ' ,k , k ' =
1
2 'e
ikz'(34)
We just transformed a partial differential equation to a first order ordinary differential equation. When
' Eq. (34) becomes
g, ' , k , k '
k2g , ' , k , k '=0
Now, we are concerning with the causal Green's function which means when ' the Green's
function is zero. This is because the impulse at ' can never give a response before ' . The arrow
of time has only one direction. when ' the solution to the above equation is
g, ' , k , k ' =Eek2
, '
where E is a constant to be determined by the continuity of g, ' ,k , k ' at ' below. The value
Quantitative Discove
Eola Investments LLCAll Rights Reserved Page 13 of 2
http://www.eolainvestments.com/http://www.eolainvestments.com/http://www.eolainvestments.com/ -
8/2/2019 Notes on Solving the Black-Scholes Equation
14/20
of g, ' ,k , k ' at ' is determined by integrating Eq. (34) with respect to [ ', ' ]
and take limit 0 :
'
'g, ' ,k , k '
d
'
'
k2g, ' , k ,k ' d=
1
2'
'
'eikz'd
lim0
g, ' , k ,k ' = '= '
=lim 0
g ',' , k , k '=1
2eikz'
Therefore
lim 0
Eek2 ' =
1
2e
ikz'
E=1
2eikz'
ek2 '
and the Green's function in the k domain is
g, ' ,k ,k ' ={0, '
1
2ek2 'ikz'
, ' (35a)
Or we use the Heaviside step function
g, ' ,k ,k ' =h '
2ek
2'ikz'
(35b)
Substituting Eq. (35b) into Eq. (33)
G, ' , z , z '=1
2
h'ek2 'ikzz '
dk
Now the integration as-is is not readily solvable. Here is a trick. It looks like a error function
erfx =2
0
x
eu
2
du (36)
and we are going to transform it to a error function. Let
Quantitative Discove
Eola Investments LLCAll Rights Reserved Page 14 of 2
http://www.eolainvestments.com/http://www.eolainvestments.com/http://www.eolainvestments.com/ -
8/2/2019 Notes on Solving the Black-Scholes Equation
15/20
a kb2c=k2 'ikzz '
it is easy to find out that
a=', b=i zz '
2 '
, c=zz '2
4 '
Therefore we can transform the integral to
G, ' , z , z'=h '
2ezz '
2
4 '
e'k izz '2 '
2
dk
Let
u=k i zz '2 '
then
G, ' , z , z'=h '
2ezz '
2
4 ' i zz '/ 2 '
izz '/2 '
e'u
2
du
Now the integration becomes along a complex line and we need to construct a closed integration path
to evaluate this integral, as shown below.
Since there is no singularity in the function, the integration along the closed line I1I2I3I4 is
zero. Therefore I1I2I3=I4 . Furthermore, at infinite the function become zero so I1 and I3
are all zero and I2=I4 . That means the integral along the complex line is the same as the integral
along the real line, i.e.,
k=izz '/2 '
k=0
I1
I2
I3
I4
Quantitative Discove
Eola Investments LLCAll Rights Reserved Page 15 of 2
http://www.eolainvestments.com/http://www.eolainvestments.com/http://www.eolainvestments.com/ -
8/2/2019 Notes on Solving the Black-Scholes Equation
16/20
G, ' , z , z ' =h '
2e
zz '
2
4 '
e' u
2
du
=h '
2'ezz '
2
4'
e'u
2
d' u
=h '
'e
zz '
2
4 '0
e ' u
2
d ' u
=h '
2 'ezz '
2
4 ' [ 20
e'u
2
d' u]=
h '
2 'ezz '
2
4 ' erf
Therefore
G, ' , z , z ' =h '
4'e
zz '
2
4 ' (37)
Quantitative Discove
Page 16 of 2Eola Investments LLCAll Rights Reserved
http://www.eolainvestments.com/http://www.eolainvestments.com/http://www.eolainvestments.com/ -
8/2/2019 Notes on Solving the Black-Scholes Equation
17/20
STEP 3: SOLVE BLACK-SCHOLES EQUATION USING GREEN'S FUNCTION
The procedure we derived in Step 2 is more than enough to solve the Black-Scholes equation
for vanilla European options. In fact, the procedure is more reserved for solving other exotic options
That we will demonstrate in other places.
To solve the Black-Scholes equation for a European call option, the general Green's function for
the diffusion equation is reduced to
G, z , z '=1
4ezz '
2
4 (38)
The initial condition in (t,S) domain is
V0,S=h SKSK (39)
Again here we use a Heaviside step function. In the , z domain, the initial condition is
W0,z=h z0 Ke
2/2
r2/2
z1 (40)
The solution is, according to Eq. (29)
W, z=
1
4ezz '
2
4 h z '0Ke
2/2
r2/2
z'1dz '
=K
4
0
ezz '
2
4
2/2
r 2 /2z'
dz 'K
40
ezz '
2
4 dz '
The second integral is easier to solve
K
4
0
ezz '
2
4 dz '=K
z
4
ez 'z
2
4 dz 'z4
=K
[ z40
eu
2
d u0
eu
2
d u]= K
2 [ 2 0z
4
eu2
d u2
0
eu 2
d u ]
Quantitative Discove
Eola Investments LLCAll Rights Reserved Page 17 of 2
http://www.eolainvestments.com/http://www.eolainvestments.com/http://www.eolainvestments.com/ -
8/2/2019 Notes on Solving the Black-Scholes Equation
18/20
=K
2 [erf z41]Noticing that the error function relates to the normal cumulative distribution function by
Nx =
1
2
[erf
x
21
](41)
we obtain
K
4
0
ezz '
2
4 dz '=K N z2 We use the same trick (besides using Matlab, Mathematica, Mathcad, or any software stating with M)
presented in Step 2 to carry out the first integration
K
4
0
ezz '
2
4
2/2
r 2 /2z'
dz '
= K
40
ez 'z2
2/2
r2/2
2
4
2
/2
r 2/2z 2/2
r 2 /2dz '
= K
4 e
2/2
r2/2 z
2 /2
r2/20
e
z 'z2
2/2
r2/ 2
2
4
dz '
=K
2e
2/2
r2
/2z2 /2
r2
/2[ 2 z2 2 /2r 2/24
ez 'z2
2/2
r 2 /22
4 d
z 'z2
2/2
r2/2
4]
= K2
e
2/2
r2
/2
z
2 /2
r2
/2
[erf
z2
2/2
r2
/ 24
1
]= K e
2/2
r 2/2z 2/2
r2 /2N z22
2/2
r2/2
Therefore, the solution to Eq. (16) for a European call option is
Quantitative Discove
Eola Investments LLCAll Rights Reserved Page 18 of 2
http://www.eolainvestments.com/http://www.eolainvestments.com/http://www.eolainvestments.com/ -
8/2/2019 Notes on Solving the Black-Scholes Equation
19/20
W, z=K e
2
/2
r2 /2z 2
/2
r 2/2N z2 2
2/2
r2/ 2 K N
z
2 (42)
Recall that
W=VerTt (6)
=r2/22
2/2
Tt (11)
z=r2 /2
2
2/2Tt
r2/2
2/2ln
S
K (17)
we can easily show
z
2=d2=
ln SKr2
2 TtTt
(43)
z
22
2/ 2
r2/2
=d1=z
2 Tt=d2 Tt (44)
and
V t ,S=S Nd1K erTt
N d2 (45)
which is the well known Black-Scholes formula. And some people prefer to call it Bachelier-Thorp
formula. [2]
Happy typing with OpenOffice Writer!
Quantitative Discove
Eola Investments LLCAll Rights Reserved Page 19 of 2
http://www.eolainvestments.com/http://www.eolainvestments.com/http://www.eolainvestments.com/ -
8/2/2019 Notes on Solving the Black-Scholes Equation
20/20
REFERENCES
[1] Dennis Silverman, Solution of the Black Scholes Equation Using the Green's Function of the
Diffusion Equation (1999) http://www.physics.uci.edu/~silverma/bseqn/bs/bs.html. (Last access
October 16 2009). Note: there is a typo in Eq. (21) of the paper by Silverman.
[2] Espen Gaarder Haug & Nassim Nicholas Taleb, Why we have never used the Black-Scholes-
Merton Option Pricing Formula Fifth Version (2009), Social Science Research Network,
http://papers.ssrn.com/sol3/papers.cfm?abstract_id=1012075&rec=1&srcabs=8156 (Last access
October 22, 2009)
Quantitative Discove
http://www.physics.uci.edu/~silverma/bseqn/bs/bs.htmlhttp://papers.ssrn.com/sol3/papers.cfm?abstract_id=1012075&rec=1&srcabs=8156http://www.eolainvestments.com/http://www.physics.uci.edu/~silverma/bseqn/bs/bs.htmlhttp://papers.ssrn.com/sol3/papers.cfm?abstract_id=1012075&rec=1&srcabs=8156