# Stochastic Differential Equations Pt1: The BS Equation

SDEs are of fundamental importance in quantitative finance. Because we don’t know what is going to happen in the future, we need some kind of random process built into our equations to model this uncertainty.

By far the most common process used is Brownian motion, and in 1 dimension this is called the Weiner process, which we will label $\inline&space;W_t$ at time t. This is a diffusive process (basically, there are no ‘jumps’, and in small time intervals the distance that the particle has traveled is probably very small) with no memory, so that future motion is independent of past motion. If we choose any two times s and t with t > s, then the difference between the value of the process at these times is distributed normally, $\inline&space;W_t&space;-&space;W_s&space;\sim&space;{\mathbb&space;N}(0,t-s)$.  This means that our uncertainty about a particle (or asset) following a Weiner process at some future time T can be characterised by a normal distribution with variance T (ie. standard deviation T^0.5) and expectation 0.

The Black-Scholes SDE for a stock price (for reasons that will become clear later, this is usually called geometric brownian motion, by the way) is

${dS&space;\over&space;S}&space;=&space;\mu&space;dt&space;+&space;\sigma&space;dW_t$

What does this mean? Well, the first two terms are simple enough for anyone who has studied ordinary differential equations. S is an asset price, t is time and $\inline&space;\mu$ and $\inline&space;\sigma$ are both constants. Without the stochastic term, we would be able to solve the equation by a simple integration on both sides

$\int_{S_0}^{S_T}&space;{dS&space;\over&space;S}&space;=&space;\int_0^T&space;\mu&space;dt$

$S_T&space;=&space;S_0&space;e^{\mu&space;T}$

which is simply exponential growth of a stock with time. Later, we will introduce risk-free bonds that grow in this way, like compound interest in a bank account, but here we are interested in including an element of uncertainty as well. How do we deal with that?

We might be tempted to try the same thing and integrate the whole equation, using the result that $\inline&space;d&space;\ln&space;S&space;=&space;S^{-1}&space;\cdot&space;dS&space;=&space;\mu&space;dt&space;+&space;\sigma&space;d&space;W_t$ as we implicitly did above. Unfortunately, for non-deterministic functions this doesn’t work any more. The reasons are rather deep, but for the moment the fix is that we need to use a central result of stochastic calculus, Ito’s Lemma, to resolve the conundrum. This is the stocastic version of the chain rule for a function of many variables, which says that if

$dS&space;=&space;\mu&space;(S,t)&space;dt&space;+&space;\sigma&space;(S,t)&space;dW_t$

then

$d(&space;f(S,t))&space;=&space;\Bigr(&space;{\partial&space;f&space;\over&space;\partial&space;t}&space;+&space;\mu(S,t)&space;{\partial&space;f&space;\over&space;\partial&space;S}&space;+&space;{\sigma(S,t)^2&space;\over&space;2}{\partial^2&space;f&space;\over&space;\partial&space;S^2}&space;\Bigl)&space;dt&space;+&space;\sigma(S,t)&space;{\partial&space;f&space;\over&space;\partial&space;S}&space;dW_t$

That seems like quite a mouthful, but for the case that we’re considering, ln(S), it’s actually pretty straight-forward. Since ln(S) doesn’t depend explicitly on time, the time-derivative disappears. It’s quite easy to calculate the first and second derivatives of ln(S) with S, and remembering that we needed to multiply all of the terms in the BS equation above by S to turn the LHS into plain old dS (these were absorbed into our $\inline&space;\mu(S,t)$ and $\inline&space;\sigma(S,t)$), we get:

$d&space;\ln&space;S&space;=&space;(&space;\mu&space;-&space;{1&space;\over&space;2}&space;\sigma^2&space;)&space;dt&space;+&space;\sigma&space;dW_t$

with the $\inline&space;\mu$ and $\inline&space;\sigma$ just plain old constants again. We have picked up an extra term here, and it has come from the second derivative term in Ito’s Lemma. We are now in a position to integrate both sides of the equation ($\inline&space;\int^T&space;\sigma&space;dW_t&space;=&space;\sigma&space;W_T$, by the way), and similar to the result in the deterministic case we get

$S_T&space;=&space;S_0&space;e^{(\mu&space;-&space;{1&space;\over&space;2}\sigma^2)T&space;+&space;\sigma&space;W_T}$

This is the solution of the BS SDE, but what does it mean? There’s quite a bit to go along with above, so I’ll talk a bit more about what this means in the second part of this blog post.

-QuantoDrifter