In this post, I will step through the Black Scholes (1973) options pricing model derivation from start to finish, in a complete and accessible way. I will take a more ‘applied mathematics approach’ by deriving the Black Scholes PDE, transforming it into a more recognizable heat equation form, and solving it using Green’s functions.
The Black Scholes Equation
As in previous posts, we will use the following stochastic model for stock price:
d S t S t = r d t + σ d B t \frac{dS_t}{S_t} = rdt + \sigma dB_t S t d S t = r d t + σ d B t
With d S t 2 = S t 2 σ 2 d t dS_t^2 = S_t^2 \sigma^2 dt d S t 2 = S t 2 σ 2 d t (a result of Ito’s Lemma).
We are interested in constructing a risk-free delta hedged portfolio:
π = c t − Δ S \pi = c_t - \Delta S π = c t − Δ S
Where:
The portfolio consists of one option c t c_t c t , and Δ \Delta Δ stock
Δ \Delta Δ is equal to ∂ c t ∂ S t \frac{\partial c_t}{\partial S_t} ∂ S t ∂ c t
π \pi π is the value of the portfolio
d π = d c t − ∂ c t ∂ S t d S t d \pi = dc_t - \frac{\partial c_t}{\partial S_t} dS_t d π = d c t − ∂ S t ∂ c t d S t
However, this portfolio is risk free, therefore must earn the risk free rate r r r :
d π = r π d t = r ( c t − ∂ c t ∂ S t S t ) d t ∴ d c t − ∂ c t ∂ S t d S t = r ( c t − ∂ c t ∂ S t S t ) d t \begin{aligned}
d \pi = r \pi dt = r(c_t - \frac{\partial c_t}{\partial S_t}S_t)dt \\
\therefore dc_t - \frac{\partial c_t}{\partial S_t} dS_t = r(c_t - \frac{\partial c_t}{\partial S_t}S_t)dt
\end{aligned} d π = r π d t = r ( c t − ∂ S t ∂ c t S t ) d t ∴ d c t − ∂ S t ∂ c t d S t = r ( c t − ∂ S t ∂ c t S t ) d t
Let us now construct an algebraic expression for the infinitessimal d c t dc_t d c t . We know that c t ( S t , t ) c_t(S_t, t) c t ( S t , t ) is a function of S t S_t S t and t t t , therefore we can employ a Taylor expansion:
d c t = ∂ c t ∂ S t d S t + ∂ c t ∂ t d t + 1 2 ∂ 2 c t ∂ S t 2 d S t 2 dc_t = \frac{\partial c_t}{\partial S_t} dS_t + \frac{\partial c_t}{\partial t} dt + \frac{1}{2} \frac{\partial^2 c_t}{\partial S_t^2}dS_t^2 d c t = ∂ S t ∂ c t d S t + ∂ t ∂ c t d t + 2 1 ∂ S t 2 ∂ 2 c t d S t 2
Substituting and cleaning up…
d c t = ( ∂ c t ∂ t + r S t ∂ c t ∂ S t + 1 2 σ 2 S t 2 ∂ 2 c t ∂ S t 2 ) d t + σ S t ∂ c t ∂ S t d B t dc_t = (\frac{\partial c_t}{\partial t} + rS_t \frac{\partial c_t}{\partial S_t} + \frac{1}{2} \sigma^2 S_t^2 \frac{\partial^2 c_t}{\partial S_t^2})dt + \sigma S_t \frac{\partial c_t}{\partial S_t} dB_t d c t = ( ∂ t ∂ c t + r S t ∂ S t ∂ c t + 2 1 σ 2 S t 2 ∂ S t 2 ∂ 2 c t ) d t + σ S t ∂ S t ∂ c t d B t
Which we can then substitute into our equation for d π d\pi d π :
( ∂ c t ∂ t + r S t ∂ c t ∂ S t + 1 2 σ 2 S t 2 ∂ 2 c t ∂ S t 2 ) d t + σ S t ∂ c t ∂ S t d B t − ∂ c t ∂ S t ( S t r d t + S t σ d B t ) = r ( c t − ∂ c t ∂ S t S t ) d t (\frac{\partial c_t}{\partial t} + rS_t \frac{\partial c_t}{\partial S_t} + \frac{1}{2} \sigma^2 S_t^2 \frac{\partial^2 c_t}{\partial S_t^2})dt + \sigma S_t \frac{\partial c_t}{\partial S_t} dB_t - \frac{\partial c_t}{\partial S_t} (S_t r dt + S_t \sigma dB_t) = r(c_t - \frac{\partial c_t}{\partial S_t}S_t)dt ( ∂ t ∂ c t + r S t ∂ S t ∂ c t + 2 1 σ 2 S t 2 ∂ S t 2 ∂ 2 c t ) d t + σ S t ∂ S t ∂ c t d B t − ∂ S t ∂ c t ( S t r d t + S t σ d B t ) = r ( c t − ∂ S t ∂ c t S t ) d t
Cancelling and rearranging we arrive at the Black Scholes Equation:
∂ c t ∂ S t + 1 2 σ 2 S t 2 ∂ 2 c t ∂ S t 2 + r S t ∂ c t ∂ S t − r c t = 0 \frac{\partial c_t}{\partial S_t} + \frac{1}{2} \sigma^2 S_t^2 \frac{\partial^2 c_t}{\partial S_t^2} + rS_t \frac{\partial c_t}{\partial S_t} - r c_t = 0 ∂ S t ∂ c t + 2 1 σ 2 S t 2 ∂ S t 2 ∂ 2 c t + r S t ∂ S t ∂ c t − r c t = 0
With initial conditions:
c ( S T , T ) = max ( S T − K , 0 ) c(S_T, T) = \max(S_T - K, 0) c ( S T , T ) = max ( S T − K , 0 )
We are now ready to transform the Black Scholes PDE into a more workable heath equation. Firstly, it would be nice if we could deal with those pesky r r r terms. In order to this, we will employ a forward method transformation. Our goal in doing this is to bring the reference point forward to T T T :
{ c ′ ( S ′ , T ) = e r τ max ( S − K , 0 ) S ′ = S e r τ \begin{cases}
c'(S', T) = e^{r\tau}\max(S - K, 0) \\
S' = Se^{r\tau}
\end{cases} { c ′ ( S ′ , T ) = e r τ max ( S − K , 0 ) S ′ = S e r τ
Where:
We now need to construct the respective partial derivatives in terms of the transformed variables:
∂ c ∂ t = ∂ c ∂ τ ∂ τ ∂ t = − ∂ c ∂ τ \frac{\partial c}{\partial t} = \frac{\partial c}{\partial \tau} \frac{\partial \tau}{\partial t} = -\frac{\partial c}{\partial \tau} ∂ t ∂ c = ∂ τ ∂ c ∂ t ∂ τ = − ∂ τ ∂ c
Employing the product rule and the multi-variate chain rule:
= − ( − r e − r τ c ′ ( S ′ , t ) + e − r τ ( ∂ c ′ ∂ S ′ ∂ S ′ ∂ τ + ∂ c ′ ∂ t ∂ t ∂ τ ) ) = -(-re^{-r\tau} c'(S', t) + e^{-r\tau}(\frac{\partial c'}{\partial S'}\frac{\partial S'}{\partial \tau} + \frac{\partial c'}{\partial t} \frac{\partial t}{\partial \tau})) = − ( − r e − r τ c ′ ( S ′ , t ) + e − r τ ( ∂ S ′ ∂ c ′ ∂ τ ∂ S ′ + ∂ t ∂ c ′ ∂ τ ∂ t ))
Which, recalling the definition of the c c c transform we previously did:
= r c − ( ∂ c ′ ∂ S ′ r S ′ − ∂ c ′ ∂ t ) e − r τ = rc - (\frac{\partial c'}{\partial S'}rS' - \frac{\partial c'}{\partial t})e^{-r\tau} = rc − ( ∂ S ′ ∂ c ′ r S ′ − ∂ t ∂ c ′ ) e − r τ
Let us now shift our attention to the next term:
∂ c ∂ S = ∂ c ∂ S ′ ∂ S ′ ∂ S = ∂ c ′ ∂ s ′ ∂ c ∂ c ′ ∂ S ′ ∂ S = ∂ c ∂ S ′ e − r τ e r τ = ∂ c ∂ s ′ \begin{aligned}
\frac{\partial c}{\partial S} &= \frac{\partial c}{\partial S'} \frac{\partial S'}{\partial S} \\[1em]
&= \frac{\partial c'}{\partial s'} \frac{\partial c}{\partial c'} \frac{\partial S'}{\partial S} = \frac{\partial c}{\partial S'} e^{-r\tau} e^{r\tau} \\[1em]
&= \frac{\partial c}{\partial s'} \\
\end{aligned} ∂ S ∂ c = ∂ S ′ ∂ c ∂ S ∂ S ′ = ∂ s ′ ∂ c ′ ∂ c ′ ∂ c ∂ S ∂ S ′ = ∂ S ′ ∂ c e − r τ e r τ = ∂ s ′ ∂ c
And finally, the second partial derivative term…
∂ 2 c ∂ S 2 = ∂ ∂ S ( ∂ c ∂ s ′ ) = ∂ S ′ ∂ S ∂ ∂ S ′ ( ∂ c ∂ S ′ ) = e r τ ∂ 2 c ′ ∂ S ′ 2 \begin{aligned}
\frac{\partial^2 c}{\partial S^2} &= \frac{\partial}{\partial S}(\frac{\partial c}{\partial s'}) \\[1em]
&= \frac{\partial S'}{\partial S} \frac{\partial}{\partial S'}(\frac{\partial c}{\partial S'}) = e^{r\tau} \frac{\partial^2 c'}{\partial S'^{2}}
\end{aligned} ∂ S 2 ∂ 2 c = ∂ S ∂ ( ∂ s ′ ∂ c ) = ∂ S ∂ S ′ ∂ S ′ ∂ ( ∂ S ′ ∂ c ) = e r τ ∂ S ′ 2 ∂ 2 c ′
Substituting and doing some light cosmetic adjustments we arrive at:
∂ c ′ ∂ t + 1 2 σ 2 ( S ′ ) 2 ∂ 2 c ′ ∂ S ′ 2 = 0 \frac{\partial c'}{\partial t} + \frac{1}{2}\sigma^2 (S')^2 \frac{\partial^2 c'}{\partial S'^{2}} = 0 ∂ t ∂ c ′ + 2 1 σ 2 ( S ′ ) 2 ∂ S ′ 2 ∂ 2 c ′ = 0
With initial conditions:
c ′ ( S ′ , T ) = max ( S ′ − K , 0 ) c'(S', T) = \max(S' - K, 0) c ′ ( S ′ , T ) = max ( S ′ − K , 0 )
We are now ready to apply the second transformation (hence the name ‘two-step transformation’)! This next transformation is called a price-moneyness transformation:
{ S ′ = K e 1 2 σ 2 τ + x c ′ ( S ′ , t ) = K f ( x , τ ) \begin{cases}
S' = Ke^{\frac{1}{2}\sigma^2 \tau + x} \\
c'(S', t) = Kf(x, \tau)
\end{cases} { S ′ = K e 2 1 σ 2 τ + x c ′ ( S ′ , t ) = K f ( x , τ )
Let us start with ∂ c ′ ∂ t \frac{\partial c'}{\partial t} ∂ t ∂ c ′ :
∂ c ′ ∂ t = ∂ c ′ ∂ τ ∂ τ ∂ t = − ∂ c ′ ∂ τ = − K ( ∂ f ∂ τ + ∂ f ∂ x ∂ x ∂ τ ) \begin{aligned}
\frac{\partial c'}{\partial t} &= \frac{\partial c'}{\partial \tau}\frac{\partial \tau}{\partial t} = - \frac{\partial c'}{\partial \tau} \\[1em]
&= -K (\frac{\partial f}{\partial \tau} + \frac{\partial f}{\partial x} \frac{\partial x}{\partial \tau})
\end{aligned} ∂ t ∂ c ′ = ∂ τ ∂ c ′ ∂ t ∂ τ = − ∂ τ ∂ c ′ = − K ( ∂ τ ∂ f + ∂ x ∂ f ∂ τ ∂ x )
But we know that ∂ x ∂ τ = − 1 2 σ 2 \frac{\partial x}{\partial \tau} = - \frac{1}{2} \sigma^2 ∂ τ ∂ x = − 2 1 σ 2 , therefore:
∂ c ′ ∂ t = − K ( ∂ f ∂ τ − 1 2 σ 2 ∂ f ∂ x ) \frac{\partial c'}{\partial t} = -K (\frac{\partial f}{\partial \tau} - \frac{1}{2} \sigma^2 \frac{\partial f}{\partial x}) ∂ t ∂ c ′ = − K ( ∂ τ ∂ f − 2 1 σ 2 ∂ x ∂ f )
Shifting our attention to ∂ c ′ ∂ S ′ \frac{\partial c'}{\partial S'} ∂ S ′ ∂ c ′ :
∂ c ′ ∂ S ′ = K ( ∂ f ∂ x ∂ x ∂ S ′ ) \frac{\partial c'}{\partial S'} = K(\frac{\partial f}{\partial x}\frac{\partial x}{\partial S'}) ∂ S ′ ∂ c ′ = K ( ∂ x ∂ f ∂ S ′ ∂ x )
= K S ′ ∂ f ∂ x = \frac{K}{S'} \frac{\partial f}{\partial x} = S ′ K ∂ x ∂ f
With another application of the partial derivative we get…
∂ 2 c ′ ∂ S ′ 2 = ∂ ∂ S ′ ( K S ′ ∂ f ∂ x ) \frac{\partial^2 c'}{\partial S'^{2}} = \frac{\partial}{\partial S'} (\frac{K}{S'} \frac{\partial f}{\partial x}) ∂ S ′ 2 ∂ 2 c ′ = ∂ S ′ ∂ ( S ′ K ∂ x ∂ f )
Applying the product rule:
= − K S ′ 2 ∂ f ∂ x + K S ′ ∂ ∂ S ′ ∂ f ∂ x = - \frac{K}{S'^{2}} \frac{\partial f}{\partial x} + \frac{K}{S'}\frac{\partial}{\partial S'} \frac{\partial f}{\partial x} = − S ′ 2 K ∂ x ∂ f + S ′ K ∂ S ′ ∂ ∂ x ∂ f
If we notice that ∂ ∂ S ′ = ∂ x ∂ S ′ ∂ ∂ x \frac{\partial}{\partial S'} = \frac{\partial x}{\partial S'} \frac{\partial}{\partial x} ∂ S ′ ∂ = ∂ S ′ ∂ x ∂ x ∂ , we can simplify the expression to:
∂ 2 c ′ ∂ S ′ 2 = − K S ′ 2 ( ∂ f ∂ x − ∂ 2 f ∂ x 2 ) \frac{\partial^2 c'}{\partial S'^{2}} =-\frac{K}{S'^{2}}(\frac{\partial f}{\partial x} - \frac{\partial^2 f}{\partial x^2}) ∂ S ′ 2 ∂ 2 c ′ = − S ′ 2 K ( ∂ x ∂ f − ∂ x 2 ∂ 2 f )
We are now ready to substitute in! If we know that:
∂ c ′ ∂ t + 1 2 σ 2 ( S ′ ) 2 ∂ 2 c ′ ∂ S ′ 2 = 0 \frac{\partial c'}{\partial t} + \frac{1}{2}\sigma^2 (S')^2 \frac{\partial^2 c'}{\partial S'^{2}} = 0 ∂ t ∂ c ′ + 2 1 σ 2 ( S ′ ) 2 ∂ S ′ 2 ∂ 2 c ′ = 0
Then by substitution, the following is equivalent:
− K ( ∂ f ∂ τ − 1 2 σ 2 ∂ f ∂ x ) − 1 2 σ 2 ( S ′ ) 2 K S ′ 2 ( ∂ f ∂ x − ∂ 2 f ∂ x 2 ) -K (\frac{\partial f}{\partial \tau} - \frac{1}{2} \sigma^2 \frac{\partial f}{\partial x})-\frac{1}{2}\sigma^2 (S')^2 \frac{K}{S'^{2}}(\frac{\partial f}{\partial x} - \frac{\partial^2 f}{\partial x^2}) − K ( ∂ τ ∂ f − 2 1 σ 2 ∂ x ∂ f ) − 2 1 σ 2 ( S ′ ) 2 S ′ 2 K ( ∂ x ∂ f − ∂ x 2 ∂ 2 f )
∴ ∂ f ∂ τ = 1 2 σ 2 ∂ 2 f ∂ x 2 \therefore \frac{\partial f}{\partial \tau} = \frac{1}{2} \sigma^2 \frac{\partial^2 f}{\partial x^2} ∴ ∂ τ ∂ f = 2 1 σ 2 ∂ x 2 ∂ 2 f
The initial conditions must also be adjusted:
c ′ ( S ′ , T ) = max ( S ′ − K , 0 ) = k f ( x , τ ) c'(S', T) = \max(S' - K, 0) = kf(x, \tau) c ′ ( S ′ , T ) = max ( S ′ − K , 0 ) = k f ( x , τ )
∴ f ( x , τ ) = 1 K max ( S ′ − K , 0 ) = 1 K max ( K e 1 2 σ 2 τ + x − K , 0 ) \therefore f(x, \tau) = \frac{1}{K} \max(S' - K, 0) = \frac{1}{K} \max(Ke^{\frac{1}{2}\sigma^2 \tau + x} - K, 0) ∴ f ( x , τ ) = K 1 max ( S ′ − K , 0 ) = K 1 max ( K e 2 1 σ 2 τ + x − K , 0 )
∴ f ( x , 0 ) = max ( e x − 1 , 0 ) \therefore f(x, 0) = \max(e^x- 1, 0) ∴ f ( x , 0 ) = max ( e x − 1 , 0 )
With this, we are ready to solve the heat equation.
Solving the Heat Equation with Green’s Functions
In a previous post, I showed that we can express solutions to the heat equation as the following:
u ( x , t ) = ∫ − ∞ ∞ f ( x 0 ) G ( x , t ; x 0 ) d x 0 u(x,t) = \int_{-\infty}^\infty f(x_0)G(x,t;x_0)dx_0 u ( x , t ) = ∫ − ∞ ∞ f ( x 0 ) G ( x , t ; x 0 ) d x 0
Where f ( x 0 ) f(x_0) f ( x 0 ) is the initial condition function. It was also shown for our initial value problem we will make use of the following Green’s Function:
G ( x , t ; x 0 ) = 1 2 π σ 2 t e − ( x − x 0 ) 2 2 σ 2 t G(x,t;x_0) = \frac{1}{\sqrt{2\pi\sigma^2t}}e^{-\frac{(x-x_0)^2}{2\sigma^2t}} G ( x , t ; x 0 ) = 2 π σ 2 t 1 e − 2 σ 2 t ( x − x 0 ) 2
Substituting our initial conditions we have:
u ( x , t ) = ∫ − ∞ ∞ max ( e x 0 − 1 , 0 ) 1 2 π σ 2 t e − ( x − x 0 ) 2 2 σ 2 t d x 0 u(x,t) = \int_{-\infty}^\infty \max(e^{x_0} -1,0) \frac{1}{\sqrt{2\pi\sigma^2t}}e^{-\frac{(x-x_0)^2}{2\sigma^2t}}dx_0 u ( x , t ) = ∫ − ∞ ∞ max ( e x 0 − 1 , 0 ) 2 π σ 2 t 1 e − 2 σ 2 t ( x − x 0 ) 2 d x 0
We can deal with the nasty bounds by adjusting them:
= ∫ 0 ∞ ( e x 0 − 1 ) 1 2 π σ 2 t e − ( x − x 0 ) 2 2 σ 2 t d x 0 = \int_{0}^\infty (e^{x_0} -1) \frac{1}{\sqrt{2\pi\sigma^2t}}e^{-\frac{(x-x_0)^2}{2\sigma^2t}}dx_0 = ∫ 0 ∞ ( e x 0 − 1 ) 2 π σ 2 t 1 e − 2 σ 2 t ( x − x 0 ) 2 d x 0
Letting u = x − x 0 σ 2 t u = \frac{x - x_0}{\sqrt{\sigma^2 t}} u = σ 2 t x − x 0 , and adjusting our bounds we now have:
∫ − ∞ x σ 2 t ( e x − σ 2 t u − 1 ) 1 2 π e − u 2 2 d u \int_{-\infty}^{\frac{x}{\sqrt{\sigma^2t}}}(e^{x - \sqrt{\sigma^2 t}u} - 1) \frac{1}{\sqrt{2 \pi}} e^{-\frac{u^2}{2}}du ∫ − ∞ σ 2 t x ( e x − σ 2 t u − 1 ) 2 π 1 e − 2 u 2 d u
We now need to complete the square for the first term of the integral, while noticing that the second term is simply the standard cumulative normal distribution.
e x ∫ − ∞ x σ 2 t 1 2 π e x − σ 2 t u e − u 2 2 d u − N ( x σ 2 t ) e^x \int_{-\infty}^{\frac{x}{\sqrt{\sigma^2t}}}\frac{1}{\sqrt{2 \pi}} e^{x - \sqrt{\sigma^2 t}u} e^{-\frac{u^2}{2}}du - N(\frac{x}{\sqrt{\sigma^2 t}}) e x ∫ − ∞ σ 2 t x 2 π 1 e x − σ 2 t u e − 2 u 2 d u − N ( σ 2 t x )
Focusing in on the first term, after completing the square we have:
e x + σ 2 t 2 ∫ − ∞ x σ 2 t 1 2 π e − ( u + σ 2 t ) 2 2 d u e^{x + \frac{\sigma^2 t}{2}} \int_{-\infty}^{\frac{x}{\sqrt{\sigma^2t}}}\frac{1}{\sqrt{2 \pi}} e^{- \frac{(u + \sqrt{\sigma^2 t})^2}{2}}du e x + 2 σ 2 t ∫ − ∞ σ 2 t x 2 π 1 e − 2 ( u + σ 2 t ) 2 d u
Let us not perform another substitution. Let γ = u + σ 2 t \gamma = u + \sqrt{\sigma^2 t} γ = u + σ 2 t …
e x + σ 2 t 2 ∫ − ∞ x σ 2 t + σ 2 t 1 2 π e − γ 2 2 d u e^{x + \frac{\sigma^2 t}{2}} \int_{-\infty}^{\frac{x}{\sqrt{\sigma^2t}} + \sqrt{\sigma^2 t}}\frac{1}{\sqrt{2 \pi}} e^{- \frac{\gamma^2}{2}}du e x + 2 σ 2 t ∫ − ∞ σ 2 t x + σ 2 t 2 π 1 e − 2 γ 2 d u
= e x + σ 2 t 2 N ( x σ 2 t + σ 2 t ) = e^{x + \frac{\sigma^2 t}{2}} N(\frac{x}{\sqrt{\sigma^2t}} + \sqrt{\sigma^2 t}) = e x + 2 σ 2 t N ( σ 2 t x + σ 2 t )
∴ f ( x , τ ) = e x + σ 2 t 2 N ( x σ 2 t + σ 2 t ) − N ( x σ 2 t ) \therefore f(x,\tau) = e^{x + \frac{\sigma^2 t}{2}} N(\frac{x}{\sqrt{\sigma^2t}} + \sqrt{\sigma^2 t}) - N(\frac{x}{\sqrt{\sigma^2 t}}) ∴ f ( x , τ ) = e x + 2 σ 2 t N ( σ 2 t x + σ 2 t ) − N ( σ 2 t x )
We know that S = K e 1 2 σ 2 τ + x S = Ke^{\frac{1}{2}\sigma^2 \tau + x} S = K e 2 1 σ 2 τ + x …
∴ x = ln S K + ( r − σ 2 2 ) τ \therefore x = \ln \frac{S}{K} + (r - \frac{\sigma^2}{2})\tau ∴ x = ln K S + ( r − 2 σ 2 ) τ
Let us define d 2 = x σ 2 t d_2 = \frac{x}{\sqrt{\sigma^2t}} d 2 = σ 2 t x and d 1 = d 2 + σ τ d_1 = d_2 + \sigma \sqrt{\tau} d 1 = d 2 + σ τ
∴ f ( x , τ ) = S K e r τ N ( d 1 ) − N ( d 2 ) \therefore f(x, \tau) = \frac{S}{K} e^{r\tau} N(d_1) - N(d_2) ∴ f ( x , τ ) = K S e r τ N ( d 1 ) − N ( d 2 )
However, we know that c t = K e − r τ f ( x , τ ) c_t = Ke^{-r\tau} f(x, \tau) c t = K e − r τ f ( x , τ ) …
∴ c t = S t N ( d 1 ) − K e − r τ N ( d 2 ) \therefore c_t = S_t N(d_1) - Ke^{-r\tau} N(d_2) ∴ c t = S t N ( d 1 ) − K e − r τ N ( d 2 )
Which is the solution to the Black Scholes Equation.