Sde
Sde
Sde
Equations
Albert Einstein.
Florian Herzog
2013
Stochastic Dierential Equations (SDE)
dx(t)
= f (t, x) , dx(t) = f (t, x)dt , (1)
dt
with initial conditions x(0) = x0 can be written in integral form
t
x(t) = x0 + f (s, x(s))ds , (2)
0
where x(t) = x(t, x0, t0) is the solution with initial conditions x(t0) = x0. An
example is given as
dx(t)
= a(t)x(t) , x(0) = x0 . (3)
dt
When we take the ODE (3) and assume that a(t) is not a deterministic parameter
but rather a stochastic parameter, we get a stochastic dierential equation (SDE). The
stochastic parameter a(t) is given as
where denotes that X = X(t, ) is a random variable and possesses the initial
condition X(0, ) = X0 with probability one. As an example we have already
encountered
dY (t, ) = (t)dt + (t)dW (t, ) .
Furthermore, f (t, X(t, )) R, g(t, X(t, )) R, and W (t, ) R. Similar as
in (2) we may write (7) as integral equation
t t
X(t, ) = X0 + f (s, X(s, ))ds + g(s, X(s, ))dW (s, ) . (8)
0 0
T
For the calculation of the stochastic integral 0 g(t, )dW (t, ), we assume that
g(t, ) is only changed at discrete time points ti (i = 1, 2, 3, ..., N 1), where
0 = t0 < t1 < t2 < . . . < tN 1 < tN < T . We dene the integral
T
S= g(t, )dW (t, ) , (9)
0
as the Riemannum
N ( )
SN () = g(ti1, ) W (ti, ) W (ti1, ) . (10)
i=1
with N .
A random variable S is called the Ito integral of a stochastic process g(t, ) with
respect to the Brownian motion W (t, ) on the interval [0, T ] if
[(
N ( )]
lim E S g(ti1, ) W (ti, ) (W (ti1, ) = 0, (11)
N
i=1
for each sequence of partitions (t0, t1, . . . , tN ) of the interval [0, T ] such that
maxi(ti ti1) 0. The limit in the above denition converges to the stochastic
integral in the mean-square sense. Thus, the stochastic integral is a random variable,
the samples of which depend on the individual realizations of the paths W (., ).
The simplest possible example is g(t) = c for all t. This is still a stochastic
process, but a simple one. Taking the denition, we actually get
T N (
)
c dW (t, ) = c lim W (ti, ) W (ti1, )
0 N
i=1
where W (T, ) and W (0, ) are standard Gaussian random variables. With
W (0, ) = 0, the last result becomes
T
c dW (t, ) = c W (T, ) .
0
T
Example: g(t, ) = W (t, ) 0
W (t, ) dW (t, ) =
N ( )
= lim W (ti1, ) W (ti, ) W (ti1, )
N
i=1
[1 N
1
N ]
2 2 2
= lim (W (ti, ) W (ti1, )) (W (ti, ) W (ti1, ))
N 2 2
i=1 i=1
1 N
2 1 2
= lim (W (ti, ) W (ti1, )) + W (T, ) , (12)
2 N i=1 2
N
We take now a detailed look at :limN i=1 (W (ti , ) W (ti1, ))2.
N
2
N
2
E[ lim (W (ti, ) W (ti1, )) ] = lim E[(W (ti, ) W (ti1, )) ]
N N
i=1 i=1
N
= lim (ti ti1)
N
i=1
= T
N
2
N
2
Var[ lim (W (ti, ) W (ti1, )) ] = lim Var[(W (ti, ) W (ti1, )) ]
N N
i=1 i=1
N
2
= 2 lim (ti ti1) .
N
i=1
N
2
N
lim (ti ti1) max(ti ti1) lim (ti ti1)
N i N
i=1 i=1
= max(ti ti1) T
i
= 0, (13)
N
since ti1 ti 0. Since the expected value of i=1 (ti ti1)2 is T and the
variance becomes zero, we get
N
2
(W (ti, ) W (ti1, )) = T (14)
i=1
This is incontrast to our intuition from standard calculus. In the case of a deterministic
T
integral 0 x(t)dx(t) = 12 x2(t), whereas the Ito integral diers by the term 12 T .
This example shows that the rules of dierentiation (in particular the chain rule)
and integration need to be re-formulated in the stochastic calculus.
Proof:
T
N ( )
E[ g(t, )dW (t, )] = E[ lim g(ti1, ) W (ti, ) W (ti1, ) ]
0 N
i=1
N ( )
= lim E[g(ti1, )] E[ W (ti, ) W (ti1, ) ]
N
i=1
= 0.
The expectation of stochastic integrals is zero. This is what we would expect anyway.
Proof:
[ T ] [ T ]
2
Var g(t, )dW (t, ) = E ( g(t, )dW (t, ))
0 0
[(
N ( ))2]
= E lim g(ti1, ) W (ti, ) W (ti1, )
N
i=1
N
N
= lim E[g(ti1, )g(tj1, )
N
i=1 j=1
N
2
= lim E[g (ti1, )] (ti ti1)
N
i=1
T
2
= E[g (t, )]dt . (17)
0
The calculation of the variance of the Ito Integrals shows two important properties:
[( )2 ] T [ 2 ]
T
E 0
g(t, )dW (t, ) = 0 E g (t, ) dt
T
0
E[g 2(t, )]dt <
The second property is the condition of existence for Ito integrals. The next property is
the linearity of Ito integrals:
T
[a1 g1(t, ) + a2 g2(t, )]dW (t, )
0
T T
= a1 g1(t, )dW (t, ) + a2 g2(t, )dW (t, ) , (18)
0 0
As mentioned shown in the second example, the rules of classical calculus are not valid
for stochastic integrals and dierential equations. It is the equivalent to the chain rule
in classical calculus. The problem can be stated as follows:
Given a stochastic dierential equation
where the function (t, X(t)) is continuously dierentiable in t and twice continuously
dierentiable in X , nd the stochastic dierential equation for the process Y (t):
In the case when we assume that g(t, X(t)) = 0, we know the result: the chain rule
for standard calculus. The result is given by
1 2
dY (t) = t(t, X)dt + tt(t, X)dt + x(t, X)dX(t)
2
1 2
+ xx(t, X)(dX(t)) + h.o.t . (21)
2
dY (t) = t(t, X)dt + x(t, X)[f (t, X(t))dt + g(t, X(t))dW (t)]
1 (
2 2 2 2 2
+tt(t, X)dt + xx(t, X) f (t, X(t))dt + g (t, X(t))dW (t)
2
)
+2f (t, X(t))g(t, X(t))dt dW (t) + h.o.t . (22)
The dierentials of higher order (dt, dW ) become fast zero, dt2 0 and
dtdW (t) 0. The stochastic term dW 2(t) according to the rules of Brownian
motion is given as
2
dW (t, ) = dt . (23)
Omitting higher order terms and using the properties of Brownian motion, we arrive at
1 2
dY (t) = [t(t, X) + x(t, X)f (t, X(t)) + xx(t, X)g (t, X(t))]dt
2
+x(t, X)g(t, X(t))dW (t) . (24)
The term 12 xx(t, X)g 2(t, X(t)) is often called the Ito corretion term, since this
does not occur in the det. case.
We apply Itos formula for the following problem: (t, X) = X 2 with the SDE
dX(t) = dW (t). From the SDE, we get X(t) = W (t) and calculate the partial
(t,X) 2 (t,X) (t,X)
derivatives of X = 2X , X 2
= 2, and t = 0. The Ito lemma yields
2
d(W (t)) = 1dt + 2W (t)dW (t) . (28)
We now allow that the process X(t) is in Rn. We let W (t) be an m-dimensional
standard Brownian motion and f (t, X(t)) Rn and g(t, X(t)) Rnm. Consider
a scalar process Y (t) dened by Y (t) = (t, X(t)), where (t, X) is a scalar
function which is continuously dierentiable with respect to t and twice continuously
dierentiable with respect to X . The Ito formula can be written in vector notation as
follows:
We want to nd the SDE for the process Y related to S as follows: Y (t) = (t, S) =
(t,S) 2 (t,S) (t,S)
ln(S(t)) . The partial derivatives are: S = S1 , S 2
= S12 , and t = 0.
Therefore, according to Ito we get,
( (t, S) (t, S) 1 2(t, S) 2 2 )
dY (t) = + S(t) + S (t) dt
t S 2 S 2
( (t, S) )
+ S(t) dW (t) , (34)
S
1 2
dY (t) = ( )dt + dW (t) . (35)
2
Since the right hand side of (35) is independent of Y (t), we are able to compute the
stochastic integral:
t t
1 2
Y (t) = Y0 + ( )dt + dW , (36)
0 2 0
1 2
Y (t) = Y0 + ( )t + W (t) . (37)
2
Since Y (t) = ln S(t) we have found a solution for S(t) :
1 2
ln(S(t)) = ln(S(0)) + ( )t + W (t) , (38)
2
( 1 2
S(t) = S(0)e 2 )t+W (t) , (39)
We show that we obtain the same result as in the previous formula by apply Itos
lemma. By (40) liefert
[ ]
2U 0 1
The partial derivatives of U are : U
X = (X2(t), X1(t))T , X 2
= and
1 0
U
t = 0.
U U T
dU (t) = [ + [f1(t, X1), f2(t, X2)]
t X
[ ])
1 ( 2U g1(t, X1)2 g1(t, X1)g2(t, X2)
+ tr ]dt
2 X 2 g1(t, X1)g2(t, X2) g2(t, X2)2
U T
+ [g1(t, X1), g2(t, X2)] dW (t)
X
= [X2(t)f1(t, X1) + X1(t)f2(t, X2) + g1(t, X1)g2(t, X2)]dt
+[X2(t)g1(t, X1) + X1(t)g2(t, X2)]dW (t)
We classify SDEs into two large groups, linear SDEs and non-linear SDEs. Furthermore,
we distinguish between scalar linear and vector-valued linear SDEs.
We start with the easy case, the scalar linear linear SDEs. An SDE
for a one-dimensional stochastic process X(t) is called a linear (scalar) SDE if and
only if the functions f (t, X(t)) and g(t, X(t)) are ane functions of X(t) R and
thus
( t [
m ]
1
X(t) = (t) x0 + (s) a(s) Bi(s)bi(s) ds
0 i=1
m
t )
1
+ (s)bi(s)dWi(s) , (42)
i=1 0
( t [ m
Bi2(s) ] m t )
(t) = exp A(s) ds + Bi(s)dWi(s) , (43)
0 i=1
2 i=1 0
(A 1 2
x(t) = (t)x0 = x0e 2 B )t+BW (t) . (46)
The expectation m(t) = E[X(t)]and the second moment P (t) = E[X 2(t)] for
m
dX(t) = (A(t)X(t) + a(t))dt + (Bi(t)X(t) + b(t))dWi(t) . (47)
i=1
m )
2 2
+ bi (t) , P (0) = x0 . (49)
i=1
The ODE for the expectation is derived by applying the expectation operator on both
sides of (42).
m
E[dX(t)] = E[(A(t)X(t) + a(t))dt + (Bi(t)X(t) + bi(t))dWi(t) ]
i=1
m
+ E[(Bi(t)X(t) + bi(t))] E[dWi(t) ]
| {z }
i=1 =0
In order to compute the second moment, we need to derive the SDE for Y (t) = X 2(t):
[ m (
)2 ]
dY (t) = 2X(t)(A(t)X(t) + a(t)) + Bi(t)X(t) + bi(t) dt
i=1
m (
)
+2X(t) Bi(t)X(t) + bi(t) dWi(t) (51)
i=1
[ m (
2 2 2
dY (t) = 2A(t)X (t) + 2X(t)a(t) + Bi (t)X (t) + 2Bi(t)bi(t)X(t)
i=1
)] m (
)
2
+bi (t) dt + 2X(t) Bi(t)X(t) + bi(t) dWi(t) (52)
i=1
Furthermore, we apply the expectation operator to (52) and use P (t) = E[X 2(t)] =
E[Y (t)] and m(t) = E[X(t)].
[ m (
2 2 2
E[dY (t)] = 2A(t)E[X (t)] + 2a(t)E[X(t)] + Bi (t)E[X (t)]
i=1
)]
2
+2Bi(t)bi(t)E[X(t)] + bi (t) dt
[ m (
) ]
+E 2X(t) Bi(t)X(t) + bi(t) dWi(t)
i=1
[
dP (t) = 2A(t)P (t) + 2a(t)m(t)
m (
)]
2 2
+ Bi (t)P (t) + 2Bi(t)bi(t)m(t) + bi (t) dt
i=1
There are some specic scalar linear SDEs which are found to be quite useful in practice.
The simplest case of SDE is where the drift and the diusion coecients are independent
of the information received over time
This model has been used to simulate commodity prices, such as metals or agricultural
products.
The mean is E[S(t)] = t + S0 and the variance Var[S(t)] = 2t. S(t) possesses
a behavior of uctuations around the straight line S0 + t.The process is normally
distributed with the given mean and variance.
The standard model of stock prices is the geometric Brownian motion as given by
2 2t 2 t
t
The mean is given by E[S(t)] = S0e and its variance by Var[S(t)] = S0 e (e
1). This model forms the starting point for the famous Black-Scholes formula for option
pricing. The geometric Brownian motion has two main features which make it popular
for stock
The rst property is that S(t) > 0 for all t [0, T ] and the second is that all returns
are in scale with the current price. This process has a log-normal probability density
function.
Another very popular class of SDEs are mean reverting linear SDEs. The model is
obtained by
2 ( 2 t
)
Var[S(t)] = 1e .
2
lim E[S(t)] =
t
and
2
lim Var[S(t)] = .
t 2
2
This analysis shows that the process uctuates around and has a variance of 2
which depends on the parameter : the higher , the lower the variance.
This is obvious since the higher , the faster the process reverts back to its mean
value.
A popular extension is where the diusion term is in scale with the current value, i.e.,
the geometric mean reverting process:
The rst mean reversion model(57) may produce negative values even for > 0.
Since the second mean-reversion model has always positive realizations, it is also
called log-normal mean reversion. This type of model is used to model interest rate or
volatilities.
m
dX(t) = (A(t)X(t) + C(t)u(t)) dt + bi(t) dWi . (58)
i=1
In this equation, X(t) is normally distributed because the Brownian motion is just
multiplied by time-dependent factors.
When we compute an optimal control law for this SDE, the deterministic optimal control
law (ignoring the Brownian motion) and the stochastic optimal control law are the same.
This feature is called certainty equivalence. For this reason, the stochastics are often
ignored in control engineering.
The logical extension of scalar SDEs is to allow X(t) Rn to be a vector. The rest of
this section proceeds in a similar fashion as for scalar linear SDEs. A stochastic vector
dierential equation
m
dX(t) = (A(t)X(t) + a(t))dt + (Bi(t)X(t) + bi(t))dWi(t) . (59)
i=1
( t [
m ]
1
X(t) = (t) x0 + (s) a(s) Bi(s)bi(s) ds
0 i=1
m
t )
1
+ (s)bi(s)dWi(s) , (61)
i=1 0
where the fundamental matrix (t) Rnn is the solution of the homogenous
stochastic dierential equation.
The fundamental matrix (t) Rnn is the solution of the homogenous stochastic
dierential equation:
m
d(t) = A(t)(t)dt + Bi(t)(t)dWi(t) , (62)
i=1
with initial condition (0) = I , I Rnn e now prove that (61) and (62) are
solutions of (59). We rewrite (61) as
( t )
1
X(t) = (t) x0 + (t)dY (t)
0
[
m ]
m
dY (t) = a(t) Bi(t)bi(t) dt + bi(t)dWi(t) .
i=1 i=1
( t )
1
X(t) = (t)Z(t) , Z(t) = x0 + (t)dY (t)
0
1
dZ(t) = (t)dY (t)
m
1
dX(t) = (t)dZ(t) + d(t)Z(t) + Bi(t)(t)(t) bi(t)dt
i=1
m
m
= dY (t) + A(t)(t)Z(t)dt + Bi(t)(t)Z(t)dWi(t) + Bi(t)bi(t)dt
i=1 i=1
Noting that Z(t) = 1(t)X(t) and using the SDE for Y (t), we get
m
m
dX(t) = dY (t) + A(t)(t)Z(t)dt + Bi(t)(t)Z(t)dWi(t) + Bi(t)bi(t)dt
i=1 i=1
[
m ]
m
= a(t) Bi(t)bi(t) dt + bi(t)dWi(t) + A(t)X(t)dt
i=1 i=1
m
m
+ Bi(t)X(t)dWi(t) + Bi(t)bi(t)dt
i=1 i=1
m
= [a(t) + A(t)X(t)]dt + (Bi(t)X(t) + bi(t))dWi(t) .
i=1
The expectation m(t) = E[X(t)] Rn and the second moment matrix P (t) =
E[X(t)X T (t)] Rnn can be computed as follows:
The covariance matrix for the system of linear SDEs is given by als
T
V (t) = Var{x(t)} = P (t) m(t)m (t) . (65)
m
dX(t) = (A(t)X(t) + a(t))dt + bi(t)dWi(t)
i=1
where
T
m
T
V (t) = A(t)V (t) + V (t)A (t) + bibi (t) V (0) = 0 .
i=1
As rst example of a linear vector valued SDE, we consider a two dimensional geometric
Brownian motion:
( )
dS1(t) = 1S1(t)dt + S1(t) 11dW1(t) + 12dW2(t) , (66)
( )
dS2(t) = 2S2(t)dt + S2(t) 21dW1(t) + 22dW2(t) . (67)
Written in matrix form S = (S1, S2)T , the same SDE is given as:
( ) ( ) ( ) ( )
1 0 0 11 0 12 0
A(t) = a(t) = B1(t) = B2(t) =
0 1 0 0 21 0 22
Both processes S1(t) and S2(t) are correlated if 12 = 21 = 0. This model can be
easily extended to n processes.
The observed volatility for real existing price processes, such as stocks or bonds is itself
a stochastic process. The following model describes this observation:
where is the average volatility, 1 a volatility, and the mean reversion rate of
the volatility process (t). If this model is used for stock prices, the transformation
P (t) = ln(S(t)) is useful. The two Brownian motions dW1(t) and dW2(t) are
correlated, hence corr[dW1(t), dW2(t)] = . This model captures the behavior of
real existing prices better and its distribution of returns shows fatter tails.
wobei x(t) = (P (t), (t))T . The system (68) has the property, that the variance
of P (t) depends on the initial condition 0 For the parameters = 0.1, = 2,
= 0.2, 1 = 0.5 and = 0.5, we calculate the standard deviation of P (t) with
0 = 0.1 and alternatively with 0 = 0.8. The expected value of (t) has the
following evaluation over time m(t) = + (0 )et and thus the variance of
P (t) depends on 0.
0.7
0=0.1
=0.8
0
0.6
0.5
Standardabweichung
0.4
0.3
0.2
0.1
0
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
time
In comparison with linear SDEs, nonlinear SDEs are less well understood. No general
solution theory exists. And there are no explicit formulae for calculating the moments.
In this section, we show some examples of nonlinear SDEs and their properties.
In general, a scalar square root process can be written as
where A(t), a(t), and B(t) are real scalars. The nonlinear mean reverting SDEs dier
from the linear scalar equations by their nonlinear diusion term. For this process, the
distribution and moments can be calculated.
For a specic square root process with A(t) = 0, a(t) = 1 and B(t) = 2 we are
able to derive the analytical solution: The SDE
dX(t) = 1dt + 2 X(t)dW (t) , X(0) = xo ,
has the solution X(t) = (W (t) + x0)2We verify the solution using Ito formula. We
use (t) = X(t) = (Y (t) + x0)2 and dY (t) = dW (t). The partial derivatives are
t = 0, Y = 2(Y (t) + x0), and Y Y = 2. Thus
1
d(t) = [t + Y 0 + Y Y 1]dt + Y 1dW (t) ,
2
d(t) = 1dt + 2(Y (t) + x0)dW (t) , dX(t) = 1dt + 2 X(t)dW (t) ,
since X(t) = Y (t) + x0.
t
The expected value
( for (69) is
) E [S(t)] = S 0 e and the variance is obtained by
2S
Var[S(t)] = 0 e2t et .
Another widely used mean reversion model is obtained by
Using the transformation P (t) = ln(S(t)) yields the linear mean reverting and
normally distributed process P (t):
2
dP (t) = [( ) P (t)]dt + dW (t) , (71)
2
Because of the transformation, S(t) is log-normally distributed. This model is used
to model stock prices, stochastic volatilities, and electricity prices. Because S(t) is
log-normally distributed, S(t) is always positive.
where the rst integral is a path-wise Riemann integral and the second integral is an
Ito integral.
In this denition, it is assumed that the functions f (t, X(t)) and g(t, X(t)) are
suciently smooth in order to guarantee the existence of the solution X(t).
There are several ways of nding analytical solutions. One way is to guess a soluti-
on and use the Ito calculus to verify that it is a solution for the SDE under consideration.
For some classes of SDEs, analytical formulas exist to nd the solution, e.g. consider
the following SDE:
where X(t) Rn, f (t, X(t)) Rn is an arbitrary function, (t) Rnm and
dW (t) Rm. This class of SDEs has the following general solution:
SinceF (t) is know,, we are able to solve for Y (t) in in function of F (t).
Using Ito lemman, we show that X(t) = Y (t) + F (t) and this solves the SDE
This solution is not very suprising, since X(t) is the sum of the process of Y (t) and
the BM of F (t).
For another class of SDEs, exist an analytical formula for their solution:
The proof is similar to the rst case, sice the diusion is linear.
dt
dX(t) = + X(t)dW (t) , X(0) = x0 .
X(t)
1 2 tW (t) F (t) F 2(t)
F (t) = e 2 , dY (t) = 1 dt = dt
F (t)Y Y
t
2 1 2 2
dY (t)Y (t) = F (t)dt , Y (t) = F (s)ds + C0
2 0
( t )1
2 2 s2W (s) 2
Y (t) = x0 + 2 e ds
0
1 2 t+W (t) ( 2 t
2 s2W (s)
)1
2
X(t) = e 2 x0 +2 e ds
0
However, most SDEs, especially nonlinear SDEs, do not have analytical solutions so
that one has to resort to numerical approximation schemes in order to simulate sample
paths of solutions to the given equation.
The simplest scheme is obtained by using a rst-order approximation. This is called the
Euler scheme
where the (.) is a discrete-time Gaussian white process with mean 0 and standard
deviation 1.