You are on page 1of 11

Solving the Black-Scholes equation: a demystification

Fran¸ois Coppex, ∗ c
Our objective is to show all the details of the derivation of the solution to the Black-Scholes equation without any prior prerequisit. We first show how to transform the Black-Scholes equation into a diffusion equation by means of change of variables. Applying the Fourier transform method we then find the general solution of the diffusion equation for arbitrary initial conditions. Finally, as a particular case of the general solution we establish the explicit closed-form solution for European and binary options.

Contents

I. Introduction II. Reduction of the Black-Scholes equation to a diffusion equation A. Reduction to a general parabolic equation B. Reduction to a diffusion equation III. Solution of the diffusion equation A. Fourier transform of the diffusion equation B. Inverse Fourier transform of the diffusion equation IV. Application to European options A. Initial conditions: transformation of the payoff functions B. Calculation of the integrals C. Inverse change of variables V. Application to cash-or-nothing binary options A. Some properties of the Fourier transform 1. Definition 2. The Fourier transform of derivatives 3. The convolution theorem 4. A useful inverse Fourier transform B. Direct verification of the general solution of the diffusion equation C. A useful property of the Dirac distribution D. Calculation of a class of Gaussian integrals

2 2 2 3 4 4 4 4 4 5 5 6 7 7 7 7 8 9 10 10

∗ URL:

http://www.francoiscoppex.com

+a 2 ∂t ∂x ∂x which can always be reduced to a diffusion equation (2) ∂h ∂2h = . (5) into Eq. ∂S ∂x ∂S ∂x ∂S S ∂x ∂ 2 V (5b) ∂ K ∂v K ∂v K ∂ ∂v K ∂v K = =− 2 + =− 2 + 2 ∂S ∂S S ∂x S ∂x S ∂S ∂x S ∂x S Inserting Eqs. motivations and other considerations behind the BS equation are supposed known to the reader and will not be discussed here. σ the volatility of the underlying and r the risk-free interest rate. INTRODUCTION While the derivation of the Black-Scholes (BS) equation can be found in many textbooks it may be harder to come across with a detailed presentation of all steps of the derivation of its solution. The hypothesis. ∂t ∂τ ∂t 2 ∂τ ∂V (4b) ∂v ∂x (4a) ∂v ∂ K ∂v = K = K ln(S/K) = . T ]. τ = (T − t)σ 2 /2. (6) takes the form of Eq. (1) gives ∂2v ∂v = + ∂τ ∂x2 We define a = 2r − 1. ∂x σ 2 (6) (5a) (5b) ∂x ∂ ∂S ∂x ∂v K ∂v K ∂2v =− 2 + 2 2. II.2 I. (2): ∂v ∂2v ∂v = +a + bv. t ∈ [0. t) therefore read σ 2 ∂v ∂V (4b) ∂v ∂τ (4c) = K = −K . t) is the value of the option. Moreover we do not discuss any aspect that is not strictly related to the process of establishing the solution. The partial derivatives of V (S. (1) is a linear parabolic equation of the form ∂v ∂2v ∂v = + bv. Reduction to a general parabolic equation We suppose r and σ to be constant and consider the following change of variables: S = Kex . (3) ∂t ∂x2 Then an integral form of the solution of the diffusion Eq. σ (7a) (7b) 2r −1 σ2 ∂v 2r − v. ∂x S ∂x S ∂x (5c) (4a) (4b) (4c) therefore Eq. Our starting point will therefore be the BS equation which is taken for granted: ∂V 1 ∂2V ∂V + σ 2 S 2 2 + rS − rV = 0. A great deal of attention is put into chosing a route that does not require any prior knowledge of mathematical theorems or results. However a good ease with mathematics still remains a prerequisit. S the price of the underlying. σ2 2r b = − 2 = −(1 + a). ∂t 2 ∂S ∂S S ≥ 0. τ ). V (S. t the time. The BS Eq. ∂τ ∂x2 ∂x (8) . T the expiration date. t) = Kv(x. REDUCTION OF THE BLACK-SCHOLES EQUATION TO A DIFFUSION EQUATION A. (3) can be obtained for any initial condition using for example Fourier transform methods. (1) where V (S. This article therefore aims at providing a self-contained set of explanations with all necessary details in order to establish the solution of the BS equation for vanilla options.

τ ). τ ). The partial derivatives of v(x. (10) into Eq. τ ∈ [0. ∂x2 = Kex . Therefore: ˆ ∂τ f (τ ) = f (∂τ f ). τ ) therefore read ∂v = (∂τ f )gh + f g(∂τ h). (2) must be of the form v(x. ˆ ˆ ˆ ˆ (12a) (12b) (13a) (13b) (13c) (14) In order for Eq. Reduction to a diffusion equation The solution of Eq. ∂x2 (10a) (10b) (10c) (9) n where we have made use of the shorthand notation ∂x f = ∂ n f /∂xn and have omitted explicit functional dependence in order to lighten the notation. ∂x 2 ∂ v 2 2 = f (∂x g)h + 2f (∂x g)(∂x h) + f g(∂x h). ∂τ ∂v = f (∂x g)h + f g(∂x h). ˆ 2 2 ∂x g(x) = g(∂x g ) + g(∂x g )2 . t) = Ke−(a a /4+a+1)τ −(a/2)x = 2r/σ 2 − 1. ˆ ˆ c1 ∈ R. −(∂τ f xˆ ˆ Putting back Eqs. g where c1 ∈ R and c2 ∈ R are two constants. (3). ∂x g(x) = g(∂x g ). ˆ ˆ c2 ∈ R. . (12) and (13) into Eq. (11) Eq. the BS equation takes the form of a diffusion equation with the following change of variables: ∂h ∂τ S τ = ∂2h . x ∈ R. one gets v(x. it is required that: 2(∂x g ) + a = 0 =⇒ g (x) = −ax/2 + c1 . τ ) = f (τ )g(x)h(x. g(x) = c2 exp[ˆ(x)]. (14) to be of the form of Eq.3 B. Inserting Eqs. (7b). ˆ ˆ Inserting Eqs. (15) into the solution (9) and expressing f (τ ) in terms of a only with Eq. (16) In order to sum up. (11) can be satisfied if f and g are of the form ˆ f (τ ) = c1 exp[f (τ )]. (11) gives 2 2 ˆ (∂τ h) = (∂x h) + (∂x h) 2(∂g g ) + a + h − (∂τ f ) + (∂x g ) + (∂x g )2 + a(∂x g ) + b . (8) gives 2 2 (∂τ f )gh + f g(∂τ h) = f (∂x g)h + 2f (∂x g)(∂x h) + f g(∂x h) + af (∂x g)h + af g(∂x h) + bf gh. τ ) = c1 e−(a 2 (15a) (15b) /4+a+1)τ −(a/2)x e h(x. σ 2 T /2]. = (T − t)σ 2 /2. c1 ∈ R. V (S. 2 (17) e h(x. ˆ ˆ) + (∂ 2 g ) + (∂x g )2 + a(∂x g ) + b = 0 =⇒ f (τ ) = (b − a2 /4)τ + c2 . τ ).

A. As shown in App. (25) . (20a) is shown in App. B it is easy to explicitely verify that the solution (24) satifies the diffusion Eq. 0). Translated into the original variables this initial condition corresponds to the terminal condition at expiry t = T of the option. then Eq. (23) in Eq. 0). τ ) = √ 2π R 2 (20a) (20b) (21) dξ h1 (x − ξ. 0) can be solved in a very straightforward way using Fourier transforms. τ ) it is required to apply the inverse Fourier transform of Eq. If we define F (h1 ) = h1 = e−k τ . SOLUTION OF THE DIFFUSION EQUATION Fourier transform of the diffusion equation A. 2τ (23a) (23b) F −1 (h2 ) = h2 = h(x. τ ).4 III. τ ) = h(k. then thanks to the property (A3) the Fourier transform of the diffusion equation is ∂h = −k 2 h.e. ∂τ The solution of this equation is h(k. i. 4τ R (24) As a reminder the change of variables is summarized by Eqs. to the payoff profile at expiry as we shall see in Sects. T ) = max[ε(S − K). τ ) = √ 1 4πτ dξ exp − (x − ξ)2 h(ξ. B. The reader may refer to App. APPLICATION TO EUROPEAN OPTIONS Initial conditions: transformation of the payoff functions According to the change of variables (17). τ )h2 (ξ. A 3. τ ) = h1 (k. 0)e−k τ . Applying the convolution theorem as reminded in App. Inserting Eqs. (17). the inverse Fourier transform of Eq. If we note F (h) = h(k) the Fourier transform of function f by respect to variable x. the initial payoff condition at τ = 0 corresponds to the payoff at expiry t = T . F (h2 ) = h2 = h(k. τ )h2 (k. IV and V. 0]. 0) is the Fourier transform of the initial condition for h. A 4: 2 1 F −1 (h1 ) = h1 = √ e−x /(4τ ) . (19). Inverse Fourier transform of the diffusion equation In order to find the solution for h(x. 2 (18) (19) where h(k. A for a reminder of the Fourier transform properties used in this article. (21) gives 1 (A6) h(x. The payoff at expiry for European options is given by V (S. (22) finally gives the general solution: h(x. τ ). τ ) = (h1 ∗ h2 )(x. 0). IV. The diffusion equation (17) with initial condition h(x. (3). (19) can be written as h(k. (22) The explicit calculation of the inverse Fourier transform of Eq.

dη = dξ/ε gives h(x. (17) one gets V (S. where the integrals Iα are calculated in App. (17) we can express Eq. = (32) . the solution of the Black-Scholes equation for European options is given by V (S. 0] K = max ε e(a/2+1)x − e(a/2)x . σ T −t ln(S/K) + (T − t)(r + σ 2 /2) √ = . (29) therefore becomes h(x. = −1 for a put. (27) can equivalently be rewritten as [0. (26) into the general solution (24) gives h(x. D. 2π −∞ 1 for a call. Calculation of the integrals Replacing Eq. (25) in terms of the new variables: (17) 1 (a/2)x e V (Kex . From Eqs. τ ) = ε √ 1 4πτ ∞ dη exp − 0 (x − εη)2 4τ eε(a/2+1)η − eε(a/2)η (28) (29) = εIa/2+1 − εIa/2 . (31) In order to sum-up. T ) h(x. 0 . 4τ (27) R Since e(α+1)x − eαx > 0 if and only if x > 0 for all α ∈ R then the integration domain of Eq. τ ) = √ 1 4πτ dξ exp − (x − ξ)2 max ε e(a/2+1)ξ − e(a/2)ξ . τ ) = εe(a/2+1)(x+aτ /2+τ ) Φ ε (D1) x + τ a + 2τ √ 2τ x + τa − εe(a/2)(x+aτ /2) Φ ε √ 2τ (30) where Φ denotes the cumulative standard normal distribution function given by Eq.5 where ε = 1 for a call option and ε = −1 for a put option. C. t) = εSΦ(εd1 ) − εKe−r(T −t) Φ(εd2 ). 0 . (D2). Inverse change of variables Going back to the initial variables with Eq. t) = εKe−(a (17) x + τ a + 2τ x + τa √ − e(a/2)(x+aτ /2) Φ ε √ 2τ 2τ x + τ a + 2τ x + τa √ = εKex Φ ε − εKe−(a+1)τ Φ ε √ 2τ 2τ 2 S ln(S/K) + (T − t)(r − σ /2) ln(S/K) + (T − t)(r + σ 2 /2) √ √ = εK Φ ε − εKe−r(T −t) Φ ε K σ T −t σ T −t 2 /4+a+1)τ −(a/2)x e e(a/2+1)(x+aτ /2+τ ) Φ ε d1 d2 = εSΦ(εd1 ) − εKe −r(T −t) Φ(εd2 ). Eq. 0) = K (25) 1 (a/2)x = e max [ε(Kex − K). (26) B. Changing variables to η = ξ/ε. d1 d2 Φ(ζ) ε ln(S/K) + (T − t)(r − σ 2 /2) √ . ∞[. σ T −t ζ 2 1 = √ dη e−η /2 .

Replacing Eq. (33) where Θ(ζ) is the Heaviside distribution which is equal to 0 if ζ < 0 and is equal to 1 if ζ > 0. 1 − Θ(S − K) for a put. We first note that Θ(S − K) = Θ(Kex − K) = Θ(ex − 1) = Θ(x). T ) = Θ(S − K) for a call. (35) into the general solution (24) gives h(x. APPLICATION TO CASH-OR-NOTHING BINARY OPTIONS As a further example we consider a binary option whose payoff at expiry is equal to 1 if it is in the money and 0 otherwise. t) = Ke−(a (36) 2 /4+a+1)τ −(a/2)x e = Ke −(a2 /4+a+1)τ −(a/2)x e h(x. If we further note that 1 − Θ(x) = Θ(−x). The initial condition therefore reads V (S. (17) (34) where we have made use of the properties Θ(αζ) = Θ(ζ) for α ∈ R+ and ex − 1 > 0 if and only if x > 0.6 V. (17) one finally gets V (S. (33) in terms of the new variables. τ ) = η=ξ/ε = = 1 1 √ K 4πτ 1 1 √ K 4πτ 1 1 √ K 4πτ (x − ξ)2 (a/2)ξ e Θ(εξ) 4τ R (x − εη)2 (a/2)εη dη exp − e Θ(η) 4τ R ∞ (x − εη)2 (a/2)εη dη exp − e 4τ 0 dξ exp − (D1) = Ia/2 (D1) = 1 (a/2)(x+aτ /2) x + τa e Φ ε √ K 2τ . (36) Going back to the initial variables with Eq. . K (35) where ε = 1 for a call and ε = −1 for a put. τ ) 1 (a/2)(x+aτ /2) e Φ(εd2 ) K (37) = e−r(T −t) Φ(εd2 ). 0) = 1 (a/2)x e Θ(εx). From Eqs. Note that for a call (put) option with ε = 1 (with ε = −1) one gets as expected the discounted risk neutral probability that the stock price S is above (below) K at time T . the initial condition (33) in the new variables reads h(x. (17) we can express Eq.

If we denote by f ∗ g the convolution product of f and g: 1 (f ∗ g)(x) = √ 2π then the Fourier transform of the convolution product is F (f ∗ g) = F (f )F (g). = (ik)n F (f (x))(k) which establishes the property (A3).. As a reminder of integration by parts. Definition R dx|f (x)| 2 The one-dimensional Fourier transform F (f (x))(k) of a function f (x) such that 1 F (f (x))(k) = f (k) = √ 2π where i = √ −1. for two functions f ang g with the appropriate regularity properties we have fg = fg − fg R dx|f (x)| 2 (A4) < ∞ it where f denotes the derivative of f . < ∞ is defined by (A1) R dx e−ikx f (x). (A7) dy f (x − y)g(y).7 APPENDIX A: SOME PROPERTIES OF THE FOURIER TRANSFORM 1. The convolution theorem (A5) A useful property of the Fourier transform is that the Fourier transform of the convolution product of two functions f and g is equal to the product of the Fourier transforms of f and g. From the definition (A1) and the regularity condition follows that 1 (A1) F f (n) (x) (k) = √ dx e−ikx f (n) (x) 2π R 1 (A4) = −√ dx (−ik)e−ikx f (n−1) (x) 2π R =(ik)F (f (n−1) ) (A4) 1 = (ik) (−1) √ 2π R dx (−ik)e−ikx f (n−2) (x) =(ik)F (f (n−2) ) = . The inverse Fourier transform is defined by 1 F −1 (f (k))(x) = f (x) = √ 2π 2. (A6) R .. (A2) The Fourier transform of derivatives The Fourier transform of the n-th derivative of a function f is given by F f (n) (x) (k) = (ik)n F (f (x))(k). R dk eikx f (k). (A3) This relation can be proven by successive integrations by parts. 3.

A useful inverse Fourier transform This section establishes the result F −1 e−k 2 τ 2 1 = √ e−x /(4τ ) . (A15) into Eq. The RHS of Eq. s = u. ix = 2AB.8 The convolution theorem (A7) is easily verified from the definition (A1) of the Fourier transform. 2 (A12) where A. B and C have to be determined. 4. (A7) reads 1 1 (A1) F (f )F (g) = √ du e−iku f (u) √ dv e−ikv g(v) 2π R 2π R 1 = du dv e−ik(u+v) f (u)g(v). C = −x2 /(4τ ). Equating the coefficients of the successive powers in k gives the folowing set of equations for A. 2τ (A11) Proof: according to the definition of the inverse Fourier transform (A2) we have F −1 e−k By completing the squares we require that −k 2 τ + ikx = A(k + B)2 + C. 0 = AB 2 + C. (A16) . (A12) gives F −1 e−k 2 (A14a) (A14b) (A14c) (A15a) (A15b) (A15c) τ 2 1 = √ e−x /(4τ ) 2π R dk exp −τ k − i x 2τ 2 . dudv = |J|dsdt where the Jacobian of the transformation is |J| = det then Eq. (A8) becomes 1 F (f )F (g) = √ 2π (A1) (A8) 1 0 1 1 =1 (A9) 1 dt e−ikt √ 2π R R ds f (t − s)g(s) (A6) = (f ∗g)(t) = F (f ∗ g) (A10) which establishes the convolution theorem (A6). B = −ix/(2τ ). (A13) 2 τ 1 =√ 2π R dk eikx e−k τ . Replacing Eqs. The solution of this set of equations is A = −τ. 2π R2 Changing variables t = u + v. B and C: −τ = A.

Equating the RHS of Eqs. dx1 dx2 = rdrdθ. x2 ) = r(cos θ. (24). 2τ 4τ 2τ 4πτ R 1 1 h− 2τ 2τ − 1 2τ (x − ξ)2 = − 1 1 h + 2 (x − ξ)2 . (A16) becomes 2 F −1 e−k τ 2 2 1 1 = √ e−x /(4τ ) √ dξ e−ξ τ R 2π 2 1 −x2 /(4τ ) = √ e dξ e−ξ 2πτ R √ = π 2 1 = √ e−x /(4τ ) 2τ (A17) which establishes Eq. using polar coordinates x = (x1 . dξ = dk τ . If we note x = (x1 . (A19) and (A20) finally gives the result (A18). (A11). therefore Eq. x2 ) ∈ R2 then on one hand we have dx e−x = = = 2 R2 R R dx1 R dx2 e−x1 −x2 2 2 2 dx1 e−x1 dx e−x 2 R dx2 e−x2 . sin θ). (A20) APPENDIX B: DIRECT VERIFICATION OF THE GENERAL SOLUTION OF THE DIFFUSION EQUATION It is easy to verify that the general solution (24) satifies the diffusion Eq. θ ∈ [0. 0).9 We further change variables to ξ = √ √ τ [k − ix/(2τ )]. We have: ∂h ∂τ ∂h ∂x ∂2h ∂x2 (24) = = = − (24) 1 1 (x − ξ)2 (x − ξ)2 1 1 h+ √ dξ exp − h0 (ξ) = − h + 2 (x − ξ)2 2 2τ 4τ 4τ 2τ 4τ 4πτ R 1 −(x − ξ) (x − ξ)2 1 √ dξ exp − h0 (ξ) = − x−ξ . (3) with initial condition h(x. 2π[ we have dx e−x = 0 2 ∞ 2π R2 dr r ∞ 0 ∞ 0 dθ e−r 2 2 = 2π = 2π 0 dr re−r dr d dr 2 1 − e−r 2 = π. It is now straightforward to see that the set of Eqs. (A19) 2 2 R On the other hand. (3). (B1a) and (B1c) satisfies the diffusion Eq. r ∈ [0. ∞[. Note that we have made use of the result R dx e−x = 2 √ π (A18) which may be established as follows. . 2τ 4τ (B1a) (B1b) (B1c) (24) (B1b) − where we have made use of the shorthand notation A for the average of A with the measure defined by Eq.

(D2) . τ ) = dξ lim √ τ →0 τ →0 R 1 4πτ exp − =δ(ξ−x) (x − ξ)2 4τ h(ξ. In order to establish property (C3) we first consider the change of variables y = (x − x0 )/ε. where δ(ξ − x) is the Dirac distribution. dy = dx/ε. APPENDIX D: CALCULATION OF A CLASS OF GAUSSIAN INTEGRALS We establish the following result Iα = √ 1 4πτ ∞ dξ exp − 0 x + 2τ α (x − εξ)2 + αεξ = eα(x+ατ ) Φ ε √ 4τ 2τ . (B3) with ε = τ 1/2 . 0) (B2) = h(x. (C3). (24): lim h(x. therefore ε→0 lim 1 dx ϕ(x) f ε R x − x0 ε = lim = = ε→0 R dy ϕ(yε + x0 )f (y) R R dy lim ϕ(yε + x0 )f (y) ε→0 dy ϕ(x0 )f (y) dy f (y) (C2) = ϕ(x0 ) R = 1 = ϕ(x0 ) (C4) where we are allowed by the dominated convergence theorem to intervene the limit and integration. 0). From Eq. (C3) We made use of this property in Eq. The reader may refer to Appendix C for a proof of property (B2). (D1) where ε = ±1 and Φ denotes the cumulative standard normal distribution function 1 Φ(ζ) = √ 2π ζ −∞ dη e−η 2 /2 . A Dirac distribution may be obtained from the following process: for all f (x) such that R dx f (x) = 1 (C2) then ε→0 1 lim f ε x − x0 ε = δ(x − x0 ). 0).10 It remains to verify the initial condition h(x. APPENDIX C: A USEFUL PROPERTY OF THE DIRAC DISTRIBUTION (B3) The Dirac distribution δ(x) (or ”delta function”) is defined by dx ϕ(x)δ(x − x0 ) = ϕ(x0 ) (C1) R for each continuous function ϕ(x). This establishes Eq.

(D7) c2 2c1 2 1 Iα = e √ dη e−η /2 2π −∞ √ = ec3 Φ c2 2c1 . (D11) gives the result (D1). 4πτ 0 √ √ Changing variables to η = (c2 − εξ) 2c1 . Expanding Eq. (D3) gives − 1 x (εξ)2 + (εξ) α + 4τ 2τ − 1 2 x = −c1 ξ 2 + ξ2c1 c2 − c1 c2 + c3 . . c3 = α(x + ατ ). dη = −dξε 2c1 . (D9) becomes −c2 2c1 2 1 Iα = e √ dζ e−ζ /2 2π −∞ √ c3 = e Φ −c2 2c1 . we require that: − (x − εξ)2 + αεξ = −c1 (c2 − εξ)2 + c3 . (D5) (D11) (D12a) (D12b) . (D6) becomes (D5a) (D5b) (D5c) Iα = e c3 √ (D6) e c3 1 √ Iα = √ 2c1 4πτ If ε = 1 Eq. .11 Proof: by completing the squares of the exponential. (D4) gives c1 = 1/(4τ ). c3 √ (D10) Combining Eqs. . 2τ Replacing Eqs. Eq. (D1) therefore now reads ∞ 2 1 dξ e−c1 (c2 −εξ) . c3 √ (D8) If ε = −1 Eq. (D8) and (D10) gives √ Iα = ec3 Φ εc2 2c1 . i = 1. (D7) becomes 1 Iα = ec3 √ 2π ∞ √ c2 2c1 dη e−η 2 /2 . . where ec3 = eα(x+ατ ) . c2 = x + 2τ α. 4τ (D3) where ci . (D9) Using the change of variables ζ = −η. √ (D5) x + 2τ α √ c2 2c1 = . Eq. (D12) in Eq. 2 4τ (D4) Equating powers in εξ in Eq. dζ = −dη. Eq. 3 are constants by respect to the integration variable. (D7) becomes −ε∞ −ε √ c2 2c1 dη e−η 2 /2 .