## Pricing Financial Derivatives Using Partial Differential Equations: A Step-by-Step Solution of the Black-Scholes Equation

By GormGeier on April 27th, 2015

In this post I will try to give a quick overview of the pricing of options using PDEs. Using partial differential equation was the method first employed by Fischer Black and Myron Scholes in order to estimate the value of a European option and it has had a strong position as an elementary strategy for solving derivatives in general ever since. Furthermore, I will try to provide a thorough walkthrough of how to find the Black-Scholes formula for a European call to demonstrate the technique in practice.

So, let us first consider a European call written on a dividend-paying stock. Accordingly, the option is a function of the underlying and time only and we write: . The reason for this is not all that hard to see. Assuming that the drift (growth rate) of the stock, the risk-free interest rate, the volatility and (potentially) the dividend yield are all constant over time, the only factors that change over time are time itself and the stock price which varies due to the diffusion of the stock.

According to Itô’s lemma this option can be described by:

Given that

this means

Since we assume the stock pays a dividend we also need to define a “dividend process”:

i.e. it is just a deterministic, continuous payout proportional to the current stock-price. This means we can construct a gains-process by:

We assume all proceeds that come as a result of dividend payments are reinvested into the stock. Let us also define a risk-free investment, which has the following dynamics:

In order to find the value of the option considered above we now construct a replicating, and self-financing portfolio, meaning all dividends are reinvested and we constantly rebalance to ensure the portfolio has the same exact value as the option for any :

According to Itô’s lemma this portfolio has the dynamics:

As long as we constantly rebalance, we can make this portfolio exactly equal to the option. The reason for this is due to how the source of risk is identical for the portfolio and the option. As long as we chose the correct values for and we can make the portfolio respond in the same way as the option to any change in the underlying. Thus, per construction this portfolio has the same dynamics as the option itself, which means that we can set the terms of their respective processes equal to each other. First

and

Concurrently

inserting and solving for we get:

We can now insert this back into the function for the replicating portfolio:

or rewritten

This function is known as the **Black-Scholes equation** and every derivative written on an asset following a geometric Brownian motion will have this PDE, since we have not yet made any assumptions about what kind of cash flows the derivative promises.

The solution to this PDE is given by the **Feynman-Kac formula**, which is named after the mathematician Mark Kac and the physicist Richard Feynman, arguably one of the most influential physicists (if not people) of the last century (as a side note, if you have not already read it, Surely You’re Joking, Mr. Feynman, which is a collection of reminiscences from Feynman’s life, is one of my absolute favourite books and I highly recommend it).

Consider a general PDE:

where the function has the boundary condition (this is the value of the option at the time-boundary, i.e. at expiration):

The Feynman-Kac formula states that the PDE above has a solution given by:

where is the solution to the SDE

for and Comparing the Black-Scholes equation with the general PDE outlined above we see that

We can find the value of the option at time by plugging into the formula:

(note that goes outside the expectation since it is deterministic) where

The solution to this SDE is the solution to the Geometric Brownian Motion, which I demonstrated how to find in this blog post:

Noting that the difference between the two Brownian motions is normally distributed, , we can rewrite the solution above in terms of a standard-normal random variable :

The max-function of the option payout can also be expressed in terms of an indicator function, since the payout will only occur in the case :

Observe that we can rewrite the inequality in terms of the random variable :

Let us now consider the K-term from the expectation above:

where is the standard normal density function. Equally, considering that the indicator function is zero for all values , we can rewrite the equation by changing the boundaries of the integral:

We also know that, since the normal distribution is symmetrical around zero, taking the integral from to is the same as the integral from to

where is the cumulative normal density function.

The same method can be applied to the -term:

Notice how

can be rewritten as a square

Therefore, let us consider the substitution

which also means their derivatives are found by

since is constant. This also implies that when , and when , . Using the same approach as before we can then write

Recall now that

i.e.

and

which are the variables defined by the Back-Scholes equation.

Now we have everything needed and we can put it all together:

By using the PDE approach and applying the Feynman-Kac formula, the problem of evaluating the value of the stochastic process is reduced to simple calculus and solving two standard integrals. However, using martingale pricing is often considered a better approach, since it allows for a wider range of cash flows, which is a topic I will hopefully cover in a future post.

Update: A post I have written on the reasoning behind martingale pricing can be found here.