You are on page 1of 6

http://www.quantopia.

net/stochastic-differential-equations/

Stochastic Differential Equations Pt1:


The BS Equation
SDEs are of fundamental importance in quantitative finance. Because we dont 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 .. 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, aaaaaaaaa . 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

AAAAAAAAA

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 BLABLA and BLABLA are both
constants. Without the stochastic term, we would be able to solve the equation by a simple
integration on both sides

,,,,,,,,,,

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 LUSIANA.. as we implicitly did above. Unfortunately, for non-deterministic
functions this doesnt 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, Itos Lemma, to resolve the conundrum.
This is the stocastic version of the chain rule for a function of many variables, which says that if

OOOOOOOOOOOO

then

BALALALALALALA

That seems like quite a mouthful, but for the case that were considering, ln(S), its actually pretty
straight-forward. Since ln(S) doesnt depend explicitly on time, the time-derivative disappears.
Its 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 .. and ., we get:

with the and just plain old constants again. We have picked up an extra term here, and it has
come from the second derivative term in Itos Lemma. We are now in a position to integrate both
sides of the equation (.., by the way), and similar to the result in the deterministic
case we get

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

-QuantoDrifter
This entry was posted in Stochastic Processes by quantodrifter. Bookmark

Stochastic Differential Equations


the permalink.

Pt2: The Lognormal Distribution


Posted on December 2, 2012
This post follows from the earlier post on Stochastic Differential Equations.
I finished last time by saying that the solution to the BS SDE for terminal spot at time T was

..

When we solve an ODE, it gives us an expression for the position of a particle at time T. But
weve already said that we are uncertain about the price of an asset in the future, and this
expression expresses that uncertainty through the term in the exponent. We said in the
last post that the difference between this quantity at two different times s and t was normally
distributed, and since this term is the distance between t=0 and t=T (we have implicitly ignored a
term , but this is ok because we assumed that the process started at zero) it is also
normally distributed,

Its a well-known property of the normal distribution (see the Wikipedia entry for this and many
others) that if . then .. for constant a. We can use this in reverse to
reduce .. to a standard normal variable x, by taking a square root of time outside of the
distribution so . and we now only need standard normal variables, which we know lots
about. We can repeat our first expression in these terms
.

What does all of this mean? In an ODE environment, wed be able to specify the exact position of
a particle at time T. Once we try to build in uncertainty via SDEs, we are implicitly sacrificing
this ability, so instead we can only talk about expected positions, variances, and other
probabilistic quantities. However, we certainly can do this, the properties of the normal
distribution are very well understood from a probabilistic standpoint so we expect to be able to
make headway! Just as X is a random variable distributed across a normal distribution, S(t) is
now a random variable whose distribution is a function of random variable X and the other
deterministic terms in the expression. We call this distribution the lognormal distribution since
the log of S is distributed normally.
The random nature of S is determined entirely by the random nature of X. If we take a draw from
X, that will entirely determine the corresponding value of S, since the remaining terms are
deterministic. The first things we might want to do are calculate the expectation of S, its variance,
and plot its distribution. To calculate the expectation, we integrate over all possible realisations of
X weighted by their probability, complete the square and use the gaussian integral formula with a
change of variables

..

..

..

which is just the linear growth term acting over time [exercise: calculate the variance in a similar
way]. We know what the probability distribution of X looks like (its a standard normal variable),
but what does the probability distribution of S look like? We can calculate the pdf using the
change-of-variables technique, which says that if S = g(x), then the area under each curve in
corresponding regions must be equal:

We know the function S(x), but the easiest way to calculate this derivative is first to invert the
function t make it ameanable to differentiation


So the pdf of S expressed in terms of S is

Well its a nasty looking function indeed! Ive plotted it below for a few typical parameter sets
and evolution times.

A lognormal PDF with typical parameter values. Of course, it is highly unlikely that parameter values will stay

constant for 4 years well discuss time dependence of these another day

A more-volatile PDF. Note that even though the mode is falling over time, the mean (which is independent of vol)

is still going up due to the fat tails at positive values.

This distribution is really central to a lot of what we do, so Ill come back to it soon and discuss a
few more of its properties. The one other thing to mention is that if we want to calculate an
expected value over S (which will turn out to be something we do a lot), we have two approaches
either integrate over

..
or,instead express the function in terms of x instead (using .) and instead integrate over the
normal distribution

..

This is typically the easier option. I think it is called the Law of the Unconscious Statistician. On
that note, weve certainly covered enough ground for the moment!

-QuantoDrifter

You might also like