Académique Documents
Professionnel Documents
Culture Documents
PROCESSES
Professor G.A. Pavliotis
Department of Mathematics Imperial College London, UK
g.pavliotis@imperial.ac.uk
Pavliotis (IC)
CompStochProc
1 / 298
Pavliotis (IC)
CompStochProc
2 / 298
Pavliotis (IC)
CompStochProc
3 / 298
PART I: INTRODUCTION
Pavliotis (IC)
CompStochProc
4 / 298
Pavliotis (IC)
CompStochProc
5 / 298
Pavliotis (IC)
CompStochProc
6 / 298
7. APPLICATIONS
Pavliotis (IC)
CompStochProc
7 / 298
Prerequisites
Basic knowledge of ODEs and PDEs.
Familiarity with the theory of stochastic processes.
Stochastic differential equations.
Basic knowledge of functional analysis and stochastic analysis
Numerical methods and scientific computing.
Familiarity with a programming language: Matlab, C, Fortran....
Pavliotis (IC)
CompStochProc
8 / 298
Assessment
Based on 1 project (25%) and a final exam (75%).
Mastery exam: additional project/paper to study and write a
report.
The project will be (mostly) computational.
The exam will be theoretical (e.g. analysis of algorithms).
Pavliotis (IC)
CompStochProc
9 / 298
Bibliography
Lecture notes will be provided for all the material that we will cover
in this course. They will be posted on the course webpage.
Books that cover (parts of) the contents of this course are
Pavliotis (IC)
CompStochProc
10 / 298
Lectures
Slides and whiteboard.
Computer experiments in Matlab.
Pavliotis (IC)
CompStochProc
11 / 298
Pavliotis (IC)
CompStochProc
12 / 298
Pavliotis (IC)
CompStochProc
13 / 298
dx = V (x; a) dt + dW,
V(x) =
4
X
aj xj .
(1)
j=1
Pavliotis (IC)
CompStochProc
14 / 298
Pavliotis (IC)
CompStochProc
15 / 298
1 U(x)
e
,
Z
(2)
(3)
R3k
.
U(x) =
(|xi xj |), (r) = 4
r
r
i,j
Pavliotis (IC)
CompStochProc
16 / 298
Pavliotis (IC)
CompStochProc
17 / 298
Pavliotis (IC)
CompStochProc
18 / 298
q = V(q) q + 2 1 W,
(4)
where W(t) denotes standard d-dimensional Brownian motion,
> 0 the friction coefficient and the inverse temperature
(strength of the noise).
Write as a first order system:
dqt = pt dt,
dpt = q V(qt ) dt pt dt +
Pavliotis (IC)
CompStochProc
(5a)
2 1 dW
t.
(5b)
19 / 298
Pavliotis (IC)
1
,
CompStochProc
(6)
20 / 298
10
10
= 0.063
eff
= 0.01
D0 /
= 0.0158
eff
10
0.1826/0.97
= 0.0251
= 0.0398
1
10
eff
< x >/2t
10
10
10
10
10
10
10
10
10
10
10
10
a. Var(qt )i/2t vs t
10
10
10
10
10
b. D vs
Pavliotis (IC)
CompStochProc
21 / 298
In other words, at each time step we flip a fair coin. If the outcome is
heads, we move one unit to the right. If the outcome is tails, we move
one unit to the left.
Alternatively, we can think of the random walk as a sum of independent
random variables:
n
X
Xj ,
Sn =
j=1
CompStochProc
22 / 298
Pavliotis (IC)
CompStochProc
23 / 298
10
15
20
25
30
35
40
45
50
CompStochProc
24 / 298
10
10
20
30
40
50
0
100
200
300
400
500
600
700
800
900
1000
CompStochProc
25 / 298
Pavliotis (IC)
CompStochProc
26 / 298
Pavliotis (IC)
CompStochProc
27 / 298
2
mean of 1000 paths
5 individual paths
1.5
U(t)
0.5
0.5
1.5
0.2
0.4
0.6
0.8
t
Figure: Sample Brownian paths.
Pavliotis (IC)
CompStochProc
28 / 298
Pavliotis (IC)
CompStochProc
29 / 298
dXt = 2DdWt , X0 = x.
This is an example of a stochastic differential equation.
The probability of finding Xt at y at time t, given that it was at x at
time t = 0, the transition probability density (y, t) satisfies the
PDE
2
= D 2 , (y, 0) = (y x).
t
y
This is an example of the Fokker-Planck equation.
The connection between Brownian motion and the diffusion
equation was made by Einstein in 1905.
Pavliotis (IC)
CompStochProc
30 / 298
Pavliotis (IC)
CompStochProc
31 / 298
Pavliotis (IC)
CompStochProc
32 / 298
F.
k=1
The triplet (, F, ) is called a probability space.
Pavliotis (IC)
CompStochProc
33 / 298
B B(E).
Example
Let I denote a subset of the positive integers. A vector
0 = {0,i , i I} is a distribution
on I if it has nonnegative entries and
P
its total mass equals 1: iI 0,i = 1.
Pavliotis (IC)
CompStochProc
34 / 298
and
P[X G] =
dX (x),
G B(E).
Pavliotis (IC)
CompStochProc
1/p
35 / 298
Example
Consider the random variable X : 7 R with pdf
(x m)2
12
,m (x) := (2) exp
.
2
Such an X is termed a Gaussian or normal random variable. The
mean is
Z
x,m (x) dx = m
EX =
R
E(X m)2 =
Pavliotis (IC)
(x m)2 ,m (x) dx = .
CompStochProc
36 / 298
Example (Continued)
Let m Rd and Rdd be symmetric and positive definite. The
random variable X : 7 Rd with pdf
1
1
,m (x) := (2)d det 2 exp h1 (x m), (x m)i
2
Pavliotis (IC)
CompStochProc
(7)
(8)
37 / 298
Pavliotis (IC)
CompStochProc
38 / 298
Pavliotis (IC)
CompStochProc
39 / 298
Lemma
Let {X1 , X2 , . . . Xn } be independent random
P variables with characteristic
functions j (t), j = 1, . . . n and let Y = nj=1 Xj with characteristic
function Y (t). Then
Y (t) = nj=1 j (t).
Lemma
Let X be a random variable with characteristic function (t) and
assume that it has finite moments. Then
E(X k ) =
Pavliotis (IC)
1 (k)
(0).
ik
CompStochProc
40 / 298
Pavliotis (IC)
CompStochProc
41 / 298
Definition
Let {Zn }
n=1 be a sequence of random variables. We will say that
(a) Zn converges to Z with probability one (almost surely) if
P lim Zn = Z = 1.
n+
(c) Zn converges to Z in Lp if
p
lim E Zn Z = 0.
n+
Pavliotis (IC)
CompStochProc
42 / 298
Let {Xn }
n=1 be iid random variables with EXn = V. Then, the
strong law of large numbers states that average of the sum of
the iid converges to V with probability one:
!
N
1X
Xn = V = 1.
P
lim
n+ N
n=1
e 2 x dx.
Yn 6 a =
lim P
n+
N n=1
2
Pavliotis (IC)
CompStochProc
43 / 298
Pavliotis (IC)
CompStochProc
44 / 298
x0 = x,
n = 1, 2, . . .
CompStochProc
45 / 298
Definition
A uniform pseudo-number generator is an algorithm which, starting
from an initial value x0 (the seed), produces a sequence ui = Di u0 of
values in [0, 1].
Lemma
Suppose Y U(0, 1) and F a 1d cumulative distribution function. Then
X = F 1 (U) with F 1 (u) = inf {x ; F(x) > u} has the distribution F.
We can use the Box-Muller algorithm to generate Gaussian random
variables, given a pseudonumber generator of uniform r.v.: Given
U1 , U2 U(0, 1) independent, then
p
2 ln U1 cos(2U2 ),
Z0 =
p
Z1 =
2 ln U1 sin(2U2 )
CompStochProc
46 / 298
= x x3 +
y2 ,
10
(y2 y1 ) ,
2
1
= 2 (28y1 y2 y1 y3 ) ,
1
8
= 2 (y1 y2 y3 )
3
=
dXt = A Xt Xt 3 dt + dWt
true values:
A=1,
Pavliotis (IC)
2
,
=
45
= 2
CompStochProc
1
lim
T T
0
47 / 298
here: = 101
0.121 and = 103/2
0.124
CompStochProc
48 / 298
(10)
Then: X = Z is X N (0, ).
CompStochProc
49 / 298
PPT = I,
D = diag(d1 , dd ).
(11)
CompStochProc
50 / 298
Pavliotis (IC)
CompStochProc
51 / 298
x (U(D))d
f (x) dx = Ef (X),
N
1X
f (xi ) =: IN ,
N
xi iid U(D).
i=1
lim
a.s.
i=1
Pavliotis (IC)
CompStochProc
52 / 298
N IN I N(0, 2 ), in distribution,
where 2 = Var (f (x)).
Pavliotis (IC)
CompStochProc
53 / 298
(12)
Rd
N
1X
f (Xi ),
N
i=1
Xi (x), iid.
(13)
1
1
:= var (IN ) = var (f (x)) =
N
N
Pavliotis (IC)
CompStochProc
Rd
a.s.
N+
.
(14)
2
N2
Accuracy of the MC estimator depends on N and on the variance
I2 .
In order for
P (IN [I , I + ]) = 1 ,
P (|IN I| 6 ) > 1
f2
CompStochProc
55 / 298
1
2
3
4
5
6
7
8
9
end
Pavliotis (IC)
CompStochProc
56 / 298
Antithetic variables.
Control variates.
Importance sampling.
1
(NIN + f (XN+1 ))
N+1
N
N 2
1 X
I
|f (Xi )|2
N1
N1 N
i=1
CompStochProc
57 / 298
N
1 2
1 X
E[(Xia x )(Xj X )]
+
2N 2 X 4N 2
k,j=1
1 2
.
4N X
CompStochProc
58 / 298
Example
Let X U(0, 1). Then X a = 1 X is an antithetic variable of X
Example
Let X N (, 2 ). Then X a = 2 X is an antithetic variable of X.
Example
Let X N (, ) a 2d Gaussian random vector. We use antithetic
variables to reduce the variance and increase the accuracy of the
estimation of Ef (X1 , X2 ). We will estimate the expectation of
Yj = eXj , j = 1, 2. These integrals can be calculated analytically.
Pavliotis (IC)
CompStochProc
59 / 298
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
function Rep=SimulationsAnti
%calculate the mean of an exponential gaussian using
%antithetic variables.
NbTraj=100;
% construct the covariance matrix
sigma1=0.2; sigma2=0.5;rho=-0.3;
MoyTheo=[10;15];
CovTheo=[sigma1^2,rho*sigma1*sigma2;rho*sigma1*sigma2,sigma2^2
L=chol(CovTheo)';
%Simulation of the random variables.
Sample=randn(2,NbTraj);
SampleSimple=repmat(MoyTheo,1,NbTraj)+L*Sample;
%Introduction of the antithetic variables
XAnti=cat(2,SampleSimple,2*repmat(MoyTheo,1,NbTraj)-SampleSimp
%Transformation of Xi into Zi
Z1Anti=exp(XAnti(1,:))
Z2Anti=exp(XAnti(2,:))
Rep=mean(Z1Anti,2);
end
Pavliotis (IC)
CompStochProc
60 / 298
CONTROL VARIATES
Let Z be a random variable. We want to estimate EZ.
We look for a r.v. W that is strongly correlated with Z and with
known EW.
Consider the new r.v.
X = Z + (W EW).
(15)
We have
Var(X) = Var(Z) + 2 Var(W) + 2Cov(Z, W).
We minimize the variance with respect to :
=
Pavliotis (IC)
Cov(Z, W)
Var(W)
61 / 298
CONTROL VARIATES
The estimator (16) is unbiased and the variance is reduced when
the correlation coefficient 2 = Cov(Z,W) is close to 1.
Var(Z)Var(W)
The optimal value of and Var(X) can be estimated using the
empirical means.
We can also construct confidence intervals using the empirical
values.
We can add R control variates:
X=Z+
R
X
j=1
(Wj EWj ).
(16)
CompStochProc
62 / 298
N
1 X f (Xj )(Xj )
,
N
(Xj )
j=1
Xj (x).
var(IN ) = var
.
N
(X)
Pavliotis (IC)
CompStochProc
63 / 298
f (X)(X)
(X)
Example
We use importance sampling to estimate the integral
I=
Pavliotis (IC)
CompStochProc
64 / 298
100
90
80
70
60
50
40
30
20
10
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
CompStochProc
65 / 298
1
2
3
4
5
6
7
8
9
10
11
12
13
14
Pavliotis (IC)
CompStochProc
66 / 298
Pavliotis (IC)
CompStochProc
67 / 298
Pavliotis (IC)
CompStochProc
68 / 298
Pavliotis (IC)
CompStochProc
69 / 298
Definition
A Gaussian process is a stochastic processes for which E = Rd and
all the finite dimensional distributions are Gaussian
F(x) = P(X(ti ) 6 xi , i = 1, . . . , k)
1 1
n/2
1/2
= (2)
(detKk )
exp hKk (x k ), x k i ,
2
for some vector k and a symmetric positive definite matrix Kk .
A Gaussian process x(t) is characterized by its mean
m(t) := Ex(t)
and the covariance function
C(t, s) = E x(t) m(t) x(s) m(s) .
CompStochProc
70 / 298
N
X
(j cos(2jt) + j sin(2jt)) .
j=1
Pavliotis (IC)
CompStochProc
71 / 298
Pavliotis (IC)
CompStochProc
72 / 298
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
CompStochProc
73 / 298
1
2
3
4
1
2
3
4
1
2
3
4
5
6
function rr = covBM(x,y)
% covariance function of Brownian motion
rr = min(x,y);
end
function rr = covBB(x,y)
% covariance function of Brownian motion
rr = min(x,y) - x*y;
end
function rr = covOU(x,y,dd,aa)
% covariance function of Ornstein-Uhlenbeck process
% aa: inverse correlation time
% dd: diffusion coefficient, rr(o)= dd/aa
rr = (dd/aa)*exp(-aa*abs(x-y));
end
Pavliotis (IC)
CompStochProc
74 / 298
1
2
3
4
function rr = covfBM(x,y,H)
% covariance function of fractional Brownian motion
% H: Hurst exponent
rr = (1/2)*(abs(x)^(2*H) + abs(y)^(2*H) - abs(x-y)^(2*H) ...
);
end
Pavliotis (IC)
CompStochProc
75 / 298
Let , F, P be a probability space. Let Xt , t T (with T = R or Z) be
a real-valued random process on this probability space with finite
second moment, E|Xt |2 < + (i.e. Xt L2 ).
Definition
A stochastic process Xt L2 is called second-order stationary or
wide-sense stationary if the first moment EXt is a constant and the
second moment E(Xt Xs ) depends only on the difference t s:
EXt = ,
Pavliotis (IC)
CompStochProc
76 / 298
Pavliotis (IC)
CompStochProc
77 / 298
Pavliotis (IC)
CompStochProc
78 / 298
Example
Consider the mean zero, second order stationary process with
covariance function
D
(17)
R(t) = e|t| .
Pavliotis (IC)
CompStochProc
79 / 298
Example (Continued)
This function is called the Cauchy or the Lorentz distribution.
The Gaussian stochastic process with covariance function (17) is
called the stationary Ornstein-Uhlenbeck process.
The correlation time is (we have that C(0) = D/())
Z
et dt = 1 .
cor =
0
Pavliotis (IC)
CompStochProc
80 / 298
Theorem
Let {Xt }t>0 be a second order stationary process on a probability
space , F, P with mean and covariance R(t), and assume that
R(t) L1 (0, +). Then
2
Z T
1
X(s) ds = 0.
lim E
T+
T 0
Pavliotis (IC)
CompStochProc
(18)
81 / 298
Proof.
We have
2
Z T
1
X(s) ds =
E
T 0
=
Z TZ T
1
R(t s) dtds
T2 0 0
Z TZ t
2
R(t s) dsdt
T2 0 0
Z T
2
(T v)R(u) du 0,
T2 0
Pavliotis (IC)
CompStochProc
82 / 298
Definition
A stochastic process is called (strictly) stationary if all finite
dimensional distributions are invariant under time translation: for any
integer k and times ti T, the distribution of (X(t1 ), X(t2 ), . . . , X(tk )) is
equal to that of (X(s + t1 ), X(s + t2 ), . . . , X(s + tk )) for any s such that
s + ti T for all i {1, . . . , k}. In other words,
P(Xt1 +t A1 , Xt2 +t A2 . . . Xtk +t Ak )
Pavliotis (IC)
CompStochProc
83 / 298
Remarks
Pavliotis (IC)
CompStochProc
84 / 298
CompStochProc
85 / 298
Definition
A one dimensional standard Brownian motion W(t) : R+ R is a
real valued stochastic process with the following properties:
1
2
3
4
W(0) = 0;
W(t) is continuous;
W(t) has independent increments.
For every t > s > 0 W(t) W(s) has a Gaussian distribution with
mean 0 and variance t s. That is, the density of the random
variable W(t) W(s) is
12
x2
;
(19)
exp
g(x; t, s) = 2(t s)
2(t s)
Pavliotis (IC)
CompStochProc
86 / 298
Definition (Continued)
A ddimensional standard Brownian motion W(t) : R+ Rd is a
collection of d independent one dimensional Brownian motions:
W(t) = (W1 (t), . . . , Wd (t)),
where Wi (t), i = 1, . . . , d are independent one dimensional
Brownian motions. The density of the Gaussian random vector
W(t) W(s) is thus
d/2
kxk2
.
g(x; t, s) = 2(t s)
exp
2(t s)
Brownian motion is sometimes referred to as the Wiener process .
Pavliotis (IC)
CompStochProc
87 / 298
Wj = Wj1 + dW
j , j = 1, 2, . . . N,
where dWj = tN (0, 1).
N
1X
f (Wtj ).
N
j=1
CompStochProc
(20)
88 / 298
2
mean of 1000 paths
5 individual paths
1.5
U(t)
0.5
0.5
1.5
0.2
0.4
0.6
0.8
Pavliotis (IC)
CompStochProc
89 / 298
Theorem
(Wiener) There exists an almost-surely continuous process Wt with
independent increments such and W0 = 0, such that for each t > the
random variable Wt is N (0, t). Furthermore, Wt is almost surely locally
Hlder continuous with exponent for any (0, 21 ).
Notice that Brownian paths are not differentiable.
Pavliotis (IC)
CompStochProc
90 / 298
E (W(t) W(s)) (W(t) W(s)) = (t s)I.
Pavliotis (IC)
E W(t) W(s) = min(t, s)I.
CompStochProc
(21)
(22)
91 / 298
From the formula for the Gaussian density g(x, t s), eqn. (19), we
immediately conclude that W(t) W(s) and W(t + u) W(s + u)
have the same pdf. Consequently, Brownian motion has stationary
increments.
Notice, however, that Brownian motion itself is not a stationary
process.
Since W(t) = W(t) W(0), the pdf of W(t) is
g(x, t) =
1 x2 /2t
e
.
2t
xn ex /2t dx
E(x (t)) =
2t
n
1.3 . . . (n 1)tn/2 , n even,
=
0,
n odd.
Pavliotis (IC)
CompStochProc
92 / 298
Lemma
Let W(t) be a standard Brownian motion and consider the process
V(t) = et W(e2t ).
Then V(t) is a Gaussian second order stationary process with mean 0
and covariance
K(s, t) = e|ts| .
Pavliotis (IC)
CompStochProc
93 / 298
Definition
A (normalized) fractional Brownian motion WtH , t > 0 with Hurst
parameter H (0, 1) is a centered Gaussian process with continuous
sample paths whose covariance is given by
E(WtH WsH ) =
1 2H
s + t2H |t s|2H .
2
(23)
1
2
3
4
H
(Wt
, t > 0) = (H WtH , t > 0), > 0,
CompStochProc
94 / 298
X
n n (t),
(24)
Xt =
n=1
CompStochProc
95 / 298
n > 0,
(n , m )L2 = nm ,
n n (t)n (s).
n=1
Pavliotis (IC)
CompStochProc
96 / 298
Pavliotis (IC)
CompStochProc
97 / 298
Example
The Karhunen-Love Expansion for Brownian Motion We set
T = [0, 1].The covariance function of Brownian motion is
C(t, s) = min(t, s). The eigenvalue problem Cn = n n becomes
Z
Or,
sn (s) ds + t
n (s) ds = n n (t).
n (s) ds = n n (t)
and
n (t) = n n (t),
CompStochProc
98 / 298
Example
From the above equations we immediately see that the right boundary
conditions are (0) = (1) = 0. The eigenvalues and eigenfunctions
are
2
1
2
n (t) = 2 sin
(2n 1)t , n =
.
2
(2n 1)
X
sin n 21 t
n
.
(25)
Wt = 2
1
2
n=1
Pavliotis (IC)
CompStochProc
99 / 298
1
2
3
4
5
6
7
8
9
10
11
12
13
end
Pavliotis (IC)
CompStochProc
100 / 298
Example
The Karhunen-Love expansion of the Brownian bridge Bt = Wt tW1
on [0, 1] is
X
2 sin (nt)
.
(26)
n
Bt =
n
n=1
Pavliotis (IC)
CompStochProc
101 / 298
1
2
3
4
5
6
7
8
9
10
11
12
13
end
Pavliotis (IC)
CompStochProc
102 / 298
Pavliotis (IC)
CompStochProc
103 / 298
dW
dz
= h(z) + (z)
,
dt
dt
z(0) = z0 .
(27)
Pavliotis (IC)
CompStochProc
104 / 298
Pavliotis (IC)
CompStochProc
105 / 298
Pavliotis (IC)
CompStochProc
106 / 298
K1
X
k=1
(30)
where tk = kt and Kt = t.
Notice that the function f (t) is evaluated at the left end of each
interval [tn1 , tn ] in (30).
The resulting It stochastic integral I(t) is a.s. continuous in t.
These ideas are readily generalized to the case where W(s) is a
standard d dimensional Brownian motion and f (s) Rmd for each
s.
Pavliotis (IC)
CompStochProc
107 / 298
(31)
p
tr(AT A).
EI(t) = 0
and
E[I(t)|Fs ] = I(s)
t > s,
Pavliotis (IC)
CompStochProc
108 / 298
Example
Consider the It stochastic integral
Z t
f (s) dW(s),
I(t) =
0
(f (s))2 ds.
Pavliotis (IC)
CompStochProc
109 / 298
K1
X
k=1
1
f (tk1 ) + f (tk ) (W(tk ) W(tk1 )) ,
2
(32)
Pavliotis (IC)
CompStochProc
110 / 298
The limit in (32) gives rise to an integral which differs from the It
integral.
The situation is more complex than that arising in the standard
theory of Riemann integration for functions of bounded variation:
in that case the points in [tk1 , tk ] where the integrand is evaluated
do not effect the definition of the integral, via a limiting process.
In the case of integration against Brownian motion, which does not
have bounded variation, the limits differ.
When f and W are correlated through an SDE, then a formula
exists to convert between them.
Pavliotis (IC)
CompStochProc
111 / 298
f (t, ) dWt =
f (t, ) dWt .
CompStochProc
T
0
Wt dWt =
1 2
W .
2 T
112 / 298
5
6
dt = T/N;
7
8
9
dW = sqrt(dt)*randn(1,N);
W = cumsum(dW);
% increments
% cumulative sum
10
11
12
ito = sum([0,W(1:end-1)].*dW)
strat = sum((0.5*([0,W(1:end-1)]+W) + ...
0.5*sqrt(dt)*randn(1,N)).*dW)
13
14
15
16
CompStochProc
113 / 298
(33)
(x) = (x)(x)T .
(34)
We define
The generator of Xt is
d
2
1X
ij (x)
,
L=b+
2
xi xj
(35)
i,j=1
Pavliotis (IC)
CompStochProc
114 / 298
(36)
(37)
For the SDE the chain rule (36) has to be modified by the addition
of a term due to noise:
d
V
dW
V(t, Xt ) =
(t, Xt ) + AV(t, Xt ) + V(t, Xt ), (Xt )
(t) . (38)
dt
t
dt
Pavliotis (IC)
CompStochProc
115 / 298
CompStochProc
116 / 298
Taking the expectation of (40) and using the fact that the
stochastic integral is a martingale we obtain (we assume that V is
independent of time and that the I.C. are deterministic)
Z t
LV(s, Xs ) ds.
EV(Xt ) = E
0
(41)
CompStochProc
117 / 298
X0 = x,
(44)
The generator of Xt is
L = x
2 x2 2
+
.
x
2 x2
Pavliotis (IC)
CompStochProc
(45)
118 / 298
dt + dWt .
2
Consequently:
log
Xt
X0
t + W(t),
CompStochProc
119 / 298
Definition
By a solution of (27) we mean an Rd -valued stochastic process {Xt } on
t [0, T] with the properties:
1
2
3
Pavliotis (IC)
CompStochProc
120 / 298
Pavliotis (IC)
CompStochProc
121 / 298
Theorem
Assume that both h() and () are globally Lipschitz on Rd and that x0
is a random variable independent of the Brownian motion W(t) with
E|x0 |2 < .
Then the SDE (27) has a unique solution z(t) C(R+ ; Rd ) with
Z T
2
|Xt | dt < T < .
E
0
Pavliotis (IC)
CompStochProc
122 / 298
Remarks
The Stratonovich analogue of (27) is
dX
dW
= h(X) + (X)
,
dt
dt
X(0) = X0 .
(46)
(48b)
CompStochProc
123 / 298
Pavliotis (IC)
CompStochProc
124 / 298
Examples of SDEs
The Ornstein-Uhlenbeck process (, > 0):
dXt = Xt dt + dWt .
The solution is
t
Xt = e
X0 +
(49)
e(ts) dWs .
(50)
1 2
Xt = X0 eWt +(r 2 )t .
Note that the solution is different in for the It and the Stratonovich
SDEs.
The Cox-Ingersoll-Ross SDE (, b > 0):
(51)
dXt = (b Xt ) dt + Xt dWt.
Pavliotis (IC)
CompStochProc
125 / 298
Protenin kinetics:
d
X
j=1
dXt = ( Xt + Xt (1 Xt )) dt + Xt (1 Xt ) dWt .
Pavliotis (IC)
CompStochProc
(52)
(53)
(54)
126 / 298
u(x, t) = 0.
(55)
(56)
t = Xt Xt3 X t + A cos(t) + W
t
X
(57)
(58)
CompStochProc
127 / 298
Consider the SDE (80). The generator L and its L2 -adjoint are
1
L = b(x)x + 2 (x)x2 ,
2
and
1
L = x b(x) + x 2 (x) .
2
We can obtain evolution equations for the expectation of
functionals of the solution of the SDE and for the transition
probability density.
Pavliotis (IC)
CompStochProc
128 / 298
Theorem
(Kolmogorov) Let f (x) Cb (R) and let
Z
u(x, s) := E(f (Xt )|Xs = x) = f (y)p(y, t|x) dy Cb2 (R).
Assume furthermore that the functions b(x), (x) = 2 (x) are
continuous in x. Then u(x, s) C2,1 (R R+ ) and it solves the final
value problem
u 1
2u
u
= b(x)
+ (x, s) 2 ,
s
x 2
x
Pavliotis (IC)
CompStochProc
(59)
129 / 298
Theorem
(Kolmogorov) Assume that p(y, t|, ), b(y), (y) C2 (R R+ ). Then the
transition probability density of Xt satisfies the equation
1 2
p
= (b(y)p) +
((y)p) ,
t
y
2 y2
Pavliotis (IC)
CompStochProc
(60)
130 / 298
1 2
p(y, t)
= (b(y, t)p(y, t)) +
((y)p(t, y)) ,
t
y
2 y2
(61)
Pavliotis (IC)
CompStochProc
(62)
131 / 298
X0 = x,
(63)
posed on the interval [0, T]. The initial condition can be either
deterministic or random.
Our goal is to obtain an approximate solution to this equation to
compute quantities of the form Ef (Xt ), where E denotes the
expectation with respect to the law of the process Xt .
The simplest numerical method is the Euler-Marayama method
that is the analogue of the explicit Euler method for ODEs.
Pavliotis (IC)
CompStochProc
132 / 298
j = 0, 1, . . . N.
j = 1, . . . N,
(64)
Pavliotis (IC)
CompStochProc
(65)
133 / 298
2.5
1.5
Xt
0.5
0.5
1.5
10
Pavliotis (IC)
CompStochProc
134 / 298
dXt = Xt dt + 2 dWt .
(66)
We solve (66) for = 1, = 21 for t [0, 10] with t = 0.0098 and
initial conditions X0 2U(0, 1), where U(0, 1) denotes the uniform
distribution in the interval (0, 1).
In Figure 7 we present five sample paths of the OU process.
In Figure 8 we plot the first two moments of the Euler-Marayama
approximation of the OU process. We compare against the
theoretical solution.
Pavliotis (IC)
CompStochProc
135 / 298
1.2
1.4
EulerMarayama
EulerMarayama
1.3
exact formula
exact formula
1.2
1.1
E(X(t) )
0.6
E X(t)
0.8
0.4
0.9
0.8
0.7
0.2
0.6
0
0.5
0.2
0.4
10
10
b. EXt2
a. EXt
Pavliotis (IC)
CompStochProc
136 / 298
Pavliotis (IC)
CompStochProc
137 / 298
10
E|X(T) X
em
(T)|
10
10
10
10
10
10
10
10
Figure: Strong order of convergence for the Euler-Marayama method for the
Ornstein-Uhlenbeck process. The linear equation with slope 1 is plotted for
comparison.
Pavliotis (IC)
CompStochProc
138 / 298
x4 x2
.
(68)
4
2
The deterministic dynamical system has two stable equilibria.
V(x) =
For weak noise strengths the solution of the SDE spends most
time oscillating around the minima of the potential.
In Figure 10 we present a sample path of the SDE with = 10,
obtained using the EM algorithm.
Pavliotis (IC)
CompStochProc
139 / 298
1.5
0.5
0.5
1.5
50
100
150
200
250
300
350
400
450
500
Pavliotis (IC)
CompStochProc
140 / 298
0.9
E(X(t) )
0.8
0.7
0.6
0.5
0.4
10
Pavliotis (IC)
CompStochProc
141 / 298
1
t+ (Xj1 ) (Xj1 ) t j2 1 .
2
(69)
Pavliotis (IC)
CompStochProc
142 / 298
The drift term is discretized in the same way in the Euler and
Milstein schemes.
On the other hand, the Milstein scheme has an additional term,
which is related to the approximation of the stochastic term in (63).
We can derive the Milstein scheme as follows. First, we write an
increment of the solution to the SDE in the form
Z (j+1)t
Z (j+1)t
(Xs ) dWs .
(70)
b(Xs ) ds +
Xj+1 = Xj +
jt
jt
jt
and
(Xs ) = (Xj ) +
(L)(X ) d +
jt
( )(X ) dW ,
jt
CompStochProc
143 / 298
jt
Z (j+1)t
jt
jt
Z s
(j+1)t
jt
(L)(X ) ddWs +
(b )(X ) dW ds
jt
(j+1)t
jt
jt
( )(X ) dW dWs
jt
(j+1)t
jt
dW dWs + O(
jt
1
Xj + b(Xj ) t + (Xj ) Wj + ( )(Xj ) Wj2 t
2
1
= Xj + b(Xj ) t + (Xj ) Wj + t( )(Xj ) j2 1 ,
2
In the above, we have used the fact that (t) (Wj ) = O((t)+/2 )
and that, in one dimension,
Z (j+1)t Z s
1
dW dWs =
Wj2 t .
(71)
2
jt
jt
Pavliotis (IC)
CompStochProc
144 / 298
(72)
Pavliotis (IC)
CompStochProc
145 / 298
CompStochProc
146 / 298
Pavliotis (IC)
CompStochProc
147 / 298
M
1 X bm
f (XNt )|
M
m=1
M
1 X
m
b
b
)|
f (XNt
6 |Ef (XT ) Ef (XT )| + |Ef (XT )
M
m=1
6 CN
+ CM
1/2
CompStochProc
148 / 298
Constant interpolation:
b = Xjt ,
X(t)
jt = max{j = 0, 1, 2 . . . , N : jt 6 t},
linear interpolation:
b =X
bjt +
X(t)
t jt b
bjt ),
(Xj +1 X
jt+1 jt t
b to denote the
where j = jt and where we have used X(t)
interpolated numerical solution of the SDE.
Pavliotis (IC)
CompStochProc
149 / 298
where c1 =
|W h (t) W(t)| dt =
c1
,
N 1/2
/32. Furthermore
s
N
lim
E sup |W h (t) W(t)| = c2 ,
N+
log N 06t61
CompStochProc
150 / 298
(74)
Xni
bin t
d
X
ij Wnj .
(75)
j=1
Pavliotis (IC)
CompStochProc
151 / 298
i
Xn+1
Xni
bin t
d
X
ij
Wnj
d
X
nj
j1 ,j2 =1,=1
j=1
j1 j2
Ij j ,
x n 1 2
(76)
(77)
tn
CompStochProc
152 / 298
d
X
j.
j (Xt ) W
(78)
j=1
b(Xt1 )
(Xt1 )Xt2
dt +
d
X
j (Xt ) dW j .
j=1
Pavliotis (IC)
Yn2
b(Yn1 )
(Yn1 )Yn2
CompStochProc
t +
d
X
j (Yn ) dW j .
j=1
153 / 298
d
X
j (Yn1 )Wnj t.
(79)
j=1
Pavliotis (IC)
CompStochProc
154 / 298
Population dynamics
dXt = rXt (K Xt ) dt + Xt dWt ,
X(0) = X0 .
Pavliotis (IC)
CompStochProc
155 / 298
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
CompStochProc
155 / 298
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
dW2 = sqrt(dt)*randn(M,N);
for j = 1:N-1
u(:,j+1) = u(:,j) + chsowx(u(:,j),v(:,j))*dt + ...
sqrt(2*D)*dW1(:,j);
v(:,j+1) = v(:,j) + chsowy(u(:,j),v(:,j))*dt + ...
sqrt(2*D)*dW2(:,j);
end
%
v = [vin,v];
u=[uin,u];
%
figure
plot(u(1,:),v(1,:))
grid on
%
kxx = var(v)./(2*tint);
kyy = var(u)./(2*tint);
%
figure
plot(tint,kxx,'r','LineWidth',3)
ylabel('var(x)/2t','Fontsize',16,'Rotation',0)
xlabel('t','Fontsize',16)
title(['var(x)/2t ', ' D = ' DDD ' , M = ' MMM ' , dt = ...
Pavliotis (IC)
CompStochProc
155 / 298
42
43
44
45
46
47
' elll
])
%
figure
plot(tint,kyy,'r','LineWidth',3)
ylabel('var(y)/2t','Fontsize',16,'Rotation',0)
xlabel('t','Fontsize',16)
title(['var(y)/2t ', ' D = ' DDD ' , M = ' MMM ' , dt = ...
' elll
])
Pavliotis (IC)
CompStochProc
156 / 298
X0 = x.
(80)
(81)
(82)
and
We also assume that the initial condition is a random variable
independent of the Brownian motion Wt with
E|X0 |2 6 C.
Under the above assumptions there exists a unique strong
solution to (80) for t [0, T].
Pavliotis (IC)
CompStochProc
156 / 298
Lemma
Under the above assumptions the solution to the SDE satisfies
E sup |Xt |2 6 C(T).
(83)
t[0,T]
Proof.
Use the assumptions on the coefficients b() and () and the initial
conditions, Cauchy-Schwartz and the Burkholder-Gandy-Davis and
Gronwall inequalities.
The BDG inequality that we need is
c2 E
t
2
(s) ds 6 E sup
0
Pavliotis (IC)
t[0,T]
Z
(s) dWs
CompStochProc
2
6 C2 E
2 (s) ds
(84)
157 / 298
Let {Xnt }Nn=0 denote the Euler discretisation of the SDE (80) with
constant interpolation.
We partition the interval [0, T]: tn = nt, n = 0,
N, t = T/N.
Lemma
Under the above assumptions we have
E
sup
t[tn ,tn+1 ]
(85)
Proof.
Use the assumptions on the coefficients, the BDG inequality and
Lemma 34.
Pavliotis (IC)
CompStochProc
158 / 298
Theorem
Let {Xnt }Nn=0 denote the Euler discretisation of the SDE (80) with
constant interpolation. Under the above assumptions we have
E sup |Xt Xtt |2 6 Ct.
(86)
t[0,T]
For the proof we will need the discrete Gronwall inequality in the
following form: let {yn }Nn=0 be a sequence and A, B > 0 satisfying
y0 = 0,
yn 6 A + Bh
n1
X
yj ,
1 6 n 6 N, h = 1/N.
j=0
Then
max yi 6 AeB .
06i6N
Pavliotis (IC)
CompStochProc
(87)
159 / 298
tn
tn+1
(Xn ) dWs + n ,
tn
where
n =
Pavliotis (IC)
tn+1
tn
(b(Xs ) b(Xn )) ds +
CompStochProc
tn+1
tn
160 / 298
tn
N1
X Z tn+1
n=0
bn ds +
tn
N1
X Z tn+1
n=0
where
RN =
N1
X
n dWs + RN ,
tn
n .
n=0
Pavliotis (IC)
CompStochProc
161 / 298
N1
X
n=0
E|Xn |2 + CE|RN |2 .
Pavliotis (IC)
CompStochProc
162 / 298
Theorem
Let {Xnt }Nn=0 denote the Euler discretisation of the SDE (80) with
constant interpolation and assume that b, Cb4 and f CP4 . Then
|Ef (XTt ) Ef (XT )| 6 Ct.
Pavliotis (IC)
CompStochProc
(88)
163 / 298
For the proof of this theorem we will use the backward Kolmogorov
equation. Let u(t, x) denote the solution of the backward Kolmogorov
equation with u(T, x) = f (x). We have
Ef (XTt ) Ef (XT ) = E(u(T, XTt )) u(0, X0 )
=
n1
X
E u(ti+1 , Xtt
) u(ti , Xtt
)
i
i+1
i=0
n1
X
i=0
n1
X
i=0
ti+1
ti
ti
ti+1
i
t
t u(s, Xst ) + L(Xtt
)u(s,
X
)
ds
s
i
i
t
t
t + L(Xtt
)
(u(t
,
X
)
(u(s,
X
)
d
i
ti
s
i
CompStochProc
164 / 298
(89)
Pavliotis (IC)
CompStochProc
165 / 298
u
= Lu Vu,
t
u(0, x) = f (x).
Pavliotis (IC)
CompStochProc
(92a)
(92b)
166 / 298
To derive this
R t result, we
introduce the variable
Yt = exp 0 V(Xs ) ds .
We rewrite the SDE for Xt as
V(Xtx ) dt,
Y0x
X0x = x,
= 0.
(93a)
(93b)
.
y
We can write
Rt x
E e 0 V(Xs ) ds f (Xtx ) = E((Xtx , Ytx )),
CompStochProc
167 / 298
The representation formula (91) for the solution of the initial value
problem (92) is called the FeynmanKac formula.
We can use the Feynman-Kac formula to develop a numerical
scheme for solving parabolic PDEs based on the numerical
solution of the underlying SDE.
Pavliotis (IC)
CompStochProc
168 / 298
Test the stability of the scheme on the linear SDE (geometric BM)
dXt = Xt dt + Xt dWt ,
X(0) = X0 ,
(94)
where , C.
Pavliotis (IC)
CompStochProc
169 / 298
lim E|Xt |2 = 0
t+
and
P
Pavliotis (IC)
lim |Xt | = 0 = 1
t+
1
Re() + ||2 < 0.
2
CompStochProc
1
Re 2 < 0.
2
(97)
(98)
170 / 298
Lemma
The geometric Brownian motion (94) with , C is stable in mean
square provided that
1
(99)
Re() + ||2 < 0.
2
Pavliotis (IC)
CompStochProc
171 / 298
Proof.
We apply Its formula to |Xt |2 = (ReXt )2 + (ImXt )2 to obtain
d |Xt |2 = 2Re() + ||2 |Xt |2 dt + dMt ,
E|Xt |2 = exp 2Re() + ||2 E|X0 |2 ,
Pavliotis (IC)
CompStochProc
172 / 298
j+
(1 + t + )2 + t||2 < 1.
(100)
Pavliotis (IC)
CompStochProc
173 / 298
Definition
Let Xtt denote a time-discrete approximation of the SDE
dXt = b(Xt ) dt + (Xt ) dWt
(101)
t
= 0.
(102)
sup P |X nt Xnt
lim
t
t
|X0t X 0 |0 t[0,T]
Pavliotis (IC)
CompStochProc
174 / 298
= 0.
lim P |X nt Xnt
t
t
|X0t X 0 |0 T+
(103)
CompStochProc
175 / 298
(104)
If
we are only interested in weak convergence we can replace
tN (0, 1) by random variables that are accurate in the weak
sense and are easier to take their reciprocals.
Pavliotis (IC)
CompStochProc
176 / 298
G(t) =
Pavliotis (IC)
1 + (1 )t
.
1 t
CompStochProc
177 / 298
Pavliotis (IC)
CompStochProc
178 / 298
(108)
(109)
with
h
1 + (1 )h
, b=
.
(110)
a=
1 h
1 h
This is a homogeneous Markov chain with an uncountable state
space.
To study the stability properties of the STM we need to study the
long time behavior of the Markov Chain (109)
Pavliotis (IC)
CompStochProc
179 / 298
Definition
The numerical scheme (Markov Chain) (109) is mean square stable iff
lim E|Xn |2 = 0.
n+
(111)
Theorem
The MC (109) is mean square stable if and only if
|a|2 + |b|2 < 1.
(112)
Pavliotis (IC)
CompStochProc
(113)
180 / 298
Define the stability regions for the gBM and for the STM:
1
SSDE := {, C : Re() + ||2 < 0}
2
(114)
and
SSTM (, h) :=
|1 + (1 )h|2 + h| 2 |
, C :
<
1
.
|1 h|2
(115)
Theorem
For all h > 0 we have
SSTM (, h) SSDE for [0, 21 ).
SSTM (, h) = SSDE for = 12 .
Pavliotis (IC)
CompStochProc
181 / 298
Definition
The numerical scheme is (109) (mean sqaure) A-stable provided that
whenever the test problem (94) is mean-sqaure stable, then (109) is
also mean square stable for all t > 0.
Corollary
The STM is A-stable for all [ 12 , 1].
If the SDE is unstable, then so is the STM for all h.
If the SDE is stable, then so is the STM for sufficiently small h.
In this case, the resulting stepsize restriction can be arbitrarily
severe.
Pavliotis (IC)
CompStochProc
182 / 298
(116)
(117)
Pavliotis (IC)
CompStochProc
183 / 298
f (Xs ) ds = E f (x).
(119)
We can solve numerically the SDE (116) and then calculate the
time average in (119) to calculate E f (x).
Let Xnh = X h (nh), h = t denote the solution of the numerical
scheme. We need to estimate the difference
Z
N
1 X
h
f (x) (x) dx
f (Xn )
N
Rd
(120)
n=1
as a function of h and N.
Pavliotis (IC)
CompStochProc
184 / 298
T
Let {Xnt }nn=0
denote a (long) numerically calculated trajectory. We
have
Z T
nT 1
1 X
f (Xnt ) := FTt .
f (Xs ) ds
FT :=
n
T
0
n=0
Define
F t = lim FTt .
T+
Pavliotis (IC)
CompStochProc
(121)
185 / 298
Pavliotis (IC)
CompStochProc
186 / 298
2
3
The standard weak convergence results (e.g. for the explicit Euler
method) are valid only over finite time intervals. In order to be able
to control the difference between the long time average of the
numerical scheme and E f we need estimates on the numerical
scheme that are uniform in time.
For this we need to use the structural property of (geometric)
ergodicity of the SDE.
Pavliotis (IC)
CompStochProc
187 / 298
Definition
A Markov process is called ergodic if the equation
Pt g = g,
g Cb (E) t > 0
CompStochProc
188 / 298
Pavliotis (IC)
CompStochProc
189 / 298
CompStochProc
190 / 298
Pavliotis (IC)
CompStochProc
191 / 298
Example
The one dimensional Brownian motion is not an ergodic process: The
d2
null space of the generator L = 21 dx
2 on R is not one dimensional!
Example
Consider a one-dimensional Brownian motion on [0, 1], with periodic
boundary conditions. The generator of this Markov process L is the
d2
differential operator L = 12 dx
2 , equipped with periodic boundary
conditions on [0, 1]. This operator is self-adjoint. The null space of both
L and L comprises constant functions on [0, 1]. Both the backward
Kolmogorov and the Fokker-Planck equation reduce to the heat
equation
1 2
=
t
2 x2
with periodic boundary conditions in [0, 1]. Fourier analysis shows that
the solution converges to a constant at an exponential rate.
Pavliotis (IC)
CompStochProc
192 / 298
Example
The one dimensional Ornstein-Uhlenbeck (OU) process is a
Markov process with generator
L = x
d2
d
+ D 2.
dx
dx
Pavliotis (IC)
> 0,
CompStochProc
kkL1 (R) = 1.
(122)
193 / 298
Example (Continued)
Let us calculate the L2 -adjoint of L. Assuming that f , h decay
sufficiently fast at infinity, we have:
Z
Z
(xx f )h + (Dx2 f )h dx
Lfh dx =
R
Z
ZR
f L h dx,
f x (xh) + f (Dx2 h) dx =:
=
R
where
d
d2 h
(axh) + D 2 .
dx
dx
We can calculate the invariant distribution by solving
equation (122).
L h :=
exp x2 dx.
(dx) =
2D
2D
If the
initial
condition of theCompStochProc
OU process is distributed according
Pavliotis
(IC)
194to
/ 298
X0 = x.
(123)
The generator of Xt is
L = b(x) +
d
2
1X
ij (x)
.
2
xi xj
(124)
i,j=1
Pavliotis (IC)
CompStochProc
(125)
195 / 298
u(x, 0) = (x).
(126)
Pavliotis (IC)
CompStochProc
196 / 298
Pt = eLt and Pt = eL t .
Pt acts on L functions and Pt on probability measures.
Pavliotis (IC)
CompStochProc
197 / 298
(130)
CompStochProc
198 / 298
p(0, x) = p0 (x).
(131)
t+
Pavliotis (IC)
CompStochProc
199 / 298
Pavliotis (IC)
CompStochProc
200 / 298
h
= Xn + b
b(Xnh ; h)h +
b(Xnh , h) hn ,
Xn+1
(132)
where b
b : Rd (0, 1) Rd ,
b : Rd (0, 1) Rdm , and n is a
collection of iid real-valued r.v. with
En,i = En,i = 0,
En,i = 1,
2r
En,i
< +,
Pavliotis (IC)
CompStochProc
201 / 298
E = 0.
(133)
Pavliotis (IC)
T
0
Rt
0
= (f (Xt ) E f ) dt + dMt .
f (Xt ) dt E f
1
1
(Xt ) (X0 ) + MT .
T
T
CompStochProc
202 / 298
and
2
1
(Xt ) (X0 )
= 0,
lim E
T+
T
lim E
T+
1
1 2
Mt = lim
EhMt i = 0,
2
T+ T
T
using the law of large numbers and the central limit theorems for
martingales.
Consequently:
E
Pavliotis (IC)
1
T
f (Xt ) dt E f
CompStochProc
2
C
.
T
203 / 298
Bias
1
T
f (Xt ) dt
0
:= E
1
T
f (Xt ) dt E f
1
=O
T
(134)
and
Var
1
T
Pavliotis (IC)
f (Xt ) dt
0
:= E
1
T
T
0
CompStochProc
f (Xt ) dt E f
2
=O
1
.
T
(135)
204 / 298
We have that
lim T Var
T+
1
T
f (Xt ) dt
= 2h, f E f i ,
(136)
where denotes
the solution of the Poisson equation (133) and
R
hh, gi = hg (dx) denotes the L2 () inner product.
Pavliotis (IC)
CompStochProc
205 / 298
We have:
Var
1
T
f (Xt ) dt
0
=
=
=:
=
=
1
T
f (Xt ) dt
2
Z TZ T
1
f
(X
)f
(X
)
dtds
E
t
s
T2 0 0
Z TZ T
1
R (t, s) dtds
T2 0 0 f
Z T
2
(T s)Rf (s) ds
T2 0
Z
s
2 T
E f (Xs )f (X0 ) ds,
1
T 0
T
Pavliotis (IC)
CompStochProc
206 / 298
= hf , i .
Pavliotis (IC)
CompStochProc
207 / 298
(138)
n=0
N1
is the Markov chain obtained from the numerical
where {Xnh }n=0
discretization of the SDE, from example using the EM scheme.
We want to calculate the variance of this estimator by generating a
long trajectory:
1
X
2
bfm,N
b= 1
D
M1
m=1
Pavliotis (IC)
CompStochProc
M
1 Xb
fm,N
M
m=1
!2
(139)
208 / 298
Pavliotis (IC)
CompStochProc
209 / 298
Pavliotis (IC)
CompStochProc
210 / 298
f (x)(x) dx
Rd
Pavliotis (IC)
CompStochProc
211 / 298
Pavliotis (IC)
CompStochProc
212 / 298
(142)
Rd
1
f (Xs ) ds E f = N (0, 2f2 ),
(144)
T
lim
T+
T 0
in distribution for all f L2 ().
Our goal is to choose the diffusion process so that we can speed
up convergence to equilibrium and minimize the asymptotic
variance.
Pavliotis (IC)
CompStochProc
213 / 298
(146)
Pavliotis (IC)
CompStochProc
214 / 298
Pavliotis (IC)
CompStochProc
(148)
215 / 298
Definition
A stationary stochastic process Xt is time reversible if its law is
invariant under time reversal: for every T (0, +) Xt and the
time-reversed process XTt have the same distribution.
The processes Xt and XTt have the same finite dimensional
distributions. Equivalently, for each N N+ , a collection of times
0 = t0 < t1 < tN = T, and bounded measurable functions with
compact support fj , j = 0, . . . N we have that
E
N
Y
fj (Xtj ) = E
j=0
N
Y
fj (XTtj ),
(149)
j=0
CompStochProc
216 / 298
Theorem
A stationary Markov process Xt in Rd with generator L and invariant
measure is reversible if and only if its generator is selfadjoint in
L2 (Rd ; ).
Pavliotis (IC)
CompStochProc
217 / 298
Proof.
Assume first (149). We take N = 1 and t0 = 0, t1 = T to deduce that
E f0 (X0 )f1 (XT ) = E f0 (XT )f1 (X0 ) , f0 , f1 L2 (Rd ; ).
This is equivalent to
Z
Z
Lt
e f0 (x) f1 (x) (dx) = f0 (x) eLt f1 (x) (dx),
i.e.
f1 , f2 L2 (Rd ; s ).
(150)
Pavliotis (IC)
CompStochProc
218 / 298
Proof.
Conversely, assume that L is selfadjoint in L2 (Rd ; ). We will use an
induction argument. Our assumption of selfadjointness implies
that (149) is true for N = 1
E
1
Y
fj (Xtj ) = E
1
Y
fj (XTtj ),
(151)
j=0
j=0
k
Y
fj (Xtj ) =
j=0
= E
...
k
Y
f0 (x0 )(dx0 )
k
Y
k
Y
j=1
fj (Xtj1 )
n=0
=
Pavliotis (IC)
...
fk (xk )(dxk )
j=1
CompStochProc
219 / 298
(152)
Proof.
Now we show that (149) it is true for N = k + 1. We calculate,
using (151) and (152)
E
k+1
Y
fj (Xtj )
j=1
(??)
...
k
Y
j=1
...
k
Y
j=1
...
k
Y
j=1
(151)
...
k+1
Y
j=1
k+1
Y
fj (XTtj ).
j=0
Pavliotis (IC)
CompStochProc
220 / 298
1
Xn+1 = Xn + h log (Xn ) + hn ,
2
n N (0, 1).
(153)
(154)
This defines a Markov Chain {Xn }Nn=0 . It is not clear that this
Markov chain has the same ergodic properties as the SDE.
We can choose to either accept or reject the next move Xn+1 with
a certain probability. Introducing this accept-reject step to a given
Markov chain leads to the Metropolis-Hastings algorithm.
The resulting Metropolis adjusted algorithm is always ergodic
with respect to the target distribution (x).
Pavliotis (IC)
CompStochProc
221 / 298
1
2
3
4
%SDE parameters
dt = 1.0e-2;
kappa = 0.1;
diff = sqrt(2*kappa*dt);
5
6
7
%number of iterations
N = 10^6;
8
9
10
11
12
13
14
15
16
%Derivative of potential
Vprime = @(x) x^3 - x;
17
18
19
%Observable
f = @(x) x;
20
21
22
CompStochProc
221 / 298
23
24
25
26
27
%simulate SDE
for i=1:N
x = - Vprime(x)*dt + diff*randn(1);
obs(i) = f(x);
end;
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
CompStochProc
221 / 298
45
46
47
48
49
50
51
52
53
54
55
56
57
58
Pavliotis (IC)
CompStochProc
222 / 298
n
o
min (y) q(y,x) , 1
: (x)q(x, y) > 0,
(x) q(x,y)
(x, y) =
.
(155)
1 : (x)q(x, y) = 0.
If the proposed value is accepted then set Xn+1 = Yn+1 otherwise
set Xn+1 = Xn .
Pavliotis (IC)
CompStochProc
222 / 298
fory 6= x
(156)
CompStochProc
223 / 298
1
2
3
4
5
6
7
8
9
10
11
12
13
14
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
rwmh: Implementation of Random-Walk metropolis hastings
%
Code written by A. Duncan
%
Parameters:
%
X0 : starting state.
%
: step size
%
nsamp: number of samples
%
target distribution: functional handle to density ...
function.
%
%
Output:
%
X: [nsamp, length(X0)]-dimensional array of samples
%
acc: Array of accept-reject flags
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
15
16
17
nsamp, ...
18
19
20
dim = length(X0);
X = zeros(nsamp, dim);
Pavliotis (IC)
CompStochProc
223 / 298
21
22
23
24
25
26
27
28
for i = 1:nsamp-1
%Generate proposal
Y = proposal(X(i,:),
);
29
30
31
32
);
);
33
34
35
36
piY = targetDistribution(Y);
piX = targetDistribution(X(i,:));
alpha = min(1, pX_given_Y*piY/(pY_given_X*piX));
37
38
39
40
41
42
43
%Accept/Reject sample.
if (rand < alpha)
X(i+1,:) = Y;
acc(i) = 1;
else
Pavliotis (IC)
CompStochProc
223 / 298
X(i+1,:) = X(i,:);
acc(i) = 0;
44
45
end
46
end
47
48
49
end
50
51
52
53
54
55
56
57
58
59
60
Pavliotis (IC)
CompStochProc
224 / 298
Pavliotis (IC)
CompStochProc
224 / 298
1
sup |Pn (x, A) (A)| 0.
2 AB
(159)
CompStochProc
225 / 298
(160)
Pavliotis (IC)
CompStochProc
226 / 298
lim
n+
1
number{accepted moves}.
n
(162)
CompStochProc
227 / 298
Pavliotis (IC)
CompStochProc
228 / 298
(163)
Pavliotis (IC)
CompStochProc
229 / 298
dXtb = V(Xt ) + b(Xt ) dt + 2 dWt ,
(164)
(165)
Pavliotis (IC)
J = J T .
CompStochProc
(166)
230 / 298
The dynamics (164) is non-reversible: (Xt )06t6T has the same law
as (XTt
)06t6T and thus not the same law as (XTt
)06t6T .
Equivalently, the system does not satisfy detailed balancethe
stationary probability flux is not zero.
From (166) it is clear that there are many (in fact, infinitely many)
different ways for modifying the reversible dynamics without
changing the invariant measure.
Pavliotis (IC)
CompStochProc
231 / 298
2 1 dWt ,
(167)
Pavliotis (IC)
CompStochProc
(168)
232 / 298
=0
=10
1.8
1.6
E(x2 +y2)
1.4
1.2
1
0.8
0.6
0.4
0.2
0
0.5
1.5
2.5
3.5
4.5
Pavliotis (IC)
CompStochProc
233 / 298
Pavliotis (IC)
CompStochProc
234 / 298
X0 = x,
(169)
Pavliotis (IC)
CompStochProc
235 / 298
Pavliotis (IC)
CompStochProc
236 / 298
Examples
Estimate the diffusion coefficient of Brownian motion
dXt = 2 dWt .
Estimate the drift and diffusion coefficients of the (stationary) OU
process
dXt = Xt dt + 2 dWt .
Estimate the drift and diffusion coefficients = (A, B, a , b ) in
the Landau-Stuart equation with additive and multiplicative noise
q
3
(170)
dXt = (AXt BXt ) dt + a2 + b2 Xt2 dWt .
estimate the volatility in geometric Brownian motion:
dXt = Xt dt + Xt dWt ,
Pavliotis (IC)
CompStochProc
237 / 298
dt
t Xt dWt1 ,
= ( t ) dt + t dWt2 ,
dXt = Xt dt +
t Xt2 dt.
Pavliotis (IC)
CompStochProc
238 / 298
tk 0
tk 6t
n+
n
X
i=1
XiT2n X(i1)T2n
2
= 2 T,
a.s.
(172)
If we fix the length of the observation [0, T] and we let the number
of observations become infinite, n + we can in fact
determine (not only estimate) the diffusion coefficient.
This is called the high frequency limit.
T can be (arbitrarily) small.
For the estimation of the diffusion coefficient we do not need to
assume that the process Xt is stationary.
Pavliotis (IC)
CompStochProc
239 / 298
Theorem
Let {Xj }Jj=0 be a sequence of equidistant observations of (??) with
timestep t = and J = T fixed. Assume that the drift b(x; ) is
bounded and define
bJ2 =
Then
In particular,
J1
2
1 X
Xj+1 Xj ,
J
j=0
|Eb
J2 2 | 6 C + 1/2 .
lim |Eb
J2 2 | = 0.
J+
Pavliotis (IC)
(173)
CompStochProc
(174)
(175)
240 / 298
We have
Xj+1 Xj =
(j+1)
b(Xs ; ) ds + Wj ,
where
bJ2
J1
J1
J1
1 X
2 X
1 X 2
2
=
(Wj ) +
Ij Mj +
Ij ,
J
J
J
2
j=0
j=0
Ij :=
j=0
(j+1)
b(Xs ; ) ds
j
and Mj := Wj .
Note that E(Wn )2 = .
Pavliotis (IC)
CompStochProc
241 / 298
(j+1)
j
2
E b(Xs ; ) ds 6 C2 .
Consequently:
1 2 2
EIj + EIj Mj
C 1 2
2
EI + EMj
6 C +
j
6 C + 1/2 .
2
Eb
J 2 6
Pavliotis (IC)
CompStochProc
242 / 298
(176)
Pavliotis (IC)
CompStochProc
243 / 298
(177)
i=1
b = argmax L(x|),
CompStochProc
(178)
244 / 298
)
1
i
exp i=1 2
.
L {xi }Ni=1 =
2 2
2
Maximizing (the log likelihood function) then with respect to and
2 we obtain the maximum likelihood estimators
Notice that
b=
N
1X
xi ,
N
i=1
b2 =
N
1X
(xi
b)2 .
N
i=1
Eb
= and Eb
2 =
Pavliotis (IC)
CompStochProc
(179)
N1 2
.
N
245 / 298
N+
lim
N(b 0 ) = N (0, D2 ),
N+
Pavliotis (IC)
CompStochProc
246 / 298
Pavliotis (IC)
CompStochProc
247 / 298
(181)
Pavliotis (IC)
CompStochProc
248 / 298
i = 1, . . . , N.
(182)
CompStochProc
249 / 298
Example
(MLE for the stationary OU process). Consider the stationary OU
process
dXt = Xt dt + dWt
(183)
1
with X0 N 0, 2
. The log Likelihood function
log L =
log L
RT
b = R0T
2
Xt dXt
2
Xt2 dt.
Xt dXt
2
0 Xt dt
=:
B1 ({Xt }t[0,T] )
M2 ({Xt }t[0,T] )
Pavliotis (IC)
CompStochProc
(184)
Xtn dt.
(185)
0
250 / 298
Xj Xj
j=0
|Xj |2 t
b = PJ1
(186)
Pavliotis (IC)
CompStochProc
251 / 298
1.4
1.2
0.8
0.6
0
1000
2000
3000
4000
5000
6000
Pavliotis (IC)
CompStochProc
252 / 298
Pavliotis (IC)
b=
XT2 X02 T
.
RT
2 0 Xt2 dt
CompStochProc
(187)
253 / 298
Example
Consider the following generalization of the previous example:
dXt = b(Xt ) dt + dWt ,
(188)
where b(x) is such that the equation has a unique ergodic solution.
The log Likelihood function is
log L =
The MLE is
T
0
2
b(Xt ) dXt
2
RT
b = R T0
0
Pavliotis (IC)
b(Xt ) dXt
(b(Xt ))2 dt
CompStochProc
b(Xt )2 dt.
0
254 / 298
Example
MLE for a stationary bistable SDE
Consider the SDE
dXt = Xt Xt3 dt + dWt
(189)
CompStochProc
255 / 298
Example
Equations (182) become
log L
b = 0,
(b
, )
log L
b = 0,
(b
, )
b
M2 M4
B1
=
,
M4 M6
B3
b
The solution of which is
b=
Pavliotis (IC)
B 1 M6 B 3 M4
,
M2 M6 M42
B 1 M4 B 3 M2
b =
.
M2 M6 M42
CompStochProc
(190)
256 / 298
1.5
1.4
1.3
1.2
1.1
1
0.9
0.8
0
1000
2000
3000
4000
5000
6000
Pavliotis (IC)
CompStochProc
257 / 298
(191)
Pavliotis (IC)
CompStochProc
258 / 298
(192)
(193)
Xn = bn t + n t,
where bn := b(Xn ; ). The distribution function of the discretized
Brownian motion is
N1
Y
1
1
(Wi )2
pNW =
exp
2t
2t
i=0
!
N1
1
1 X
(194)
=
(Wi )2 .
exp
2t
( 2t)N
i=0
Pavliotis (IC)
CompStochProc
259 / 298
N1
, using the
Similarly, for the law of the discretized process {Xn }n=0
fact that p(Xi+1 |Xi ) N (Xi + bi t, t), we can write
!
N1
X 1
1
1
2
2
N
(195)
.
(Xi ) + (bi ) t bi Xi
pX =
exp
2t
2
( 2t)N
i=0
Now we can calculate the ratio of the laws of the two processes,
N1
:
evaluated at the path {Xn }n=0
!
N1
N1
X
1X
dPNX
2
bi Xi .
(bi ) t +
= exp
2
dPNW
i=0
i=0
Pavliotis (IC)
CompStochProc
260 / 298
(196)
Pavliotis (IC)
CompStochProc
261 / 298
x
x0
1
dx,
(x)
(197)
f (x)
1
(x).
(x) 2
(198)
with
1
f (h1 (y))
(h1 (y)).
(h1 (y)) 2
This is called the Lamperti transformation.
fY (y) =
Pavliotis (IC)
CompStochProc
262 / 298
d
2 d2
+ x 2.
dx
2 dx
1/2 1/2
x
x .
2
The CIR SDE becomes, for Yt = Xt ,
1
dt
Xt dt + dWt
dYt =
Xt
2 1 1
Y
=
t dt + dWt .
2
2 Yt
2
Lh(x) =
(199)
CompStochProc
263 / 298
Pavliotis (IC)
CompStochProc
264 / 298
(200)
(201)
1
dYt = b2 (Xt ) dt + b(Xt ) dWt , Y0 = 0.
2
(202)
(203)
CompStochProc
265 / 298
CompStochProc
(205)
266 / 298
Pavliotis (IC)
Z
1
b2 (Xt ) b1 (Xt )
dXt
2 (Xt )
2
CompStochProc
T
0
b22 (Xt ) b21 (Xt )
dt
.
2 (Xt )
(207)
267 / 298
1
2
3
4
5
6
7
8
9
10
11
Pavliotis (IC)
CompStochProc
268 / 298
The MLE (181) depends on the path {Xt }t[0,T] and consequently it
is random variable.
We have to prove that, in the large sample limit J +, t fixed,
and for appropriate assumptions on the diffusion process Xt , the
MLE converges to the true value 0 and to also obtain information
about the fluctuations around the limiting value 0 .
Assuming that Xt is stationary we can prove that the MLE b
converges in the limit as T + (assuming that the entire path
{Xt }t[0,T] is available to us) to 0 .
Furthermore, we can prove asympotic normality of the
maximum likelihood estimator,
T b 0 N (0, 2 ),
(208)
Pavliotis (IC)
CompStochProc
269 / 298
Theorem
Let Xt be the stationary OU process
dXt = Xt dt + dWt ,
X0 N
1
0,
2
and let
b denote the MLE (184). Then
lim
T|b
| = N (0, 2)
T+
(209)
in distribution.
Pavliotis (IC)
CompStochProc
270 / 298
For the proof of this theorem we will need the following result from
probability theory.
Theorem
+
(Slutsky) Let {Xn }+
n=1 , {Yn }n=1 be sequences of random variables
such that Xn converges in distribution to a random variable X and Yn
converges in probability to a constant c 6= 0. Then
lim Y 1 Xn
n+ n
= c1 X,
in distribution.
Pavliotis (IC)
CompStochProc
271 / 298
b = R0 T
Xt dXt
2
0 Xt dt
Consequently:
RT
Xt dWt
= R0 T
.
2
0 Xt dt
RT
1
Xt dWt
1
T 0
=
b = R0 T
R
T
2
T T1 0 Xt2 dt
0 Xt dt
R
1 T 2
W
X
dt
t
T 0
1
Law
,
=
RT 2
1
T
T 0 Xt dt
RT
Xt dWt
(210)
CompStochProc
272 / 298
1
2 .
We can write Y = W( 2 ).
Y
X
dt
W
(212)
t
t
T
T 0
2
0
12
Z T
1
1
2
6 H l(W)
Xt dt
, (213)
T 0
2
where Hl(W) denotes the Hlder constant of Brownian motion.
Pavliotis (IC)
CompStochProc
273 / 298
T
0
Xt dWt = N
1
0,
2
T|b
| = N (0, 2)
lim
T+
Pavliotis (IC)
CompStochProc
(214)
(215)
274 / 298
(216)
t = t2 .
and
1/2
E(dWt1 dWt2 )
dt = ( t ) dt + t
dWt2 ,
(217)
= dt.
with
Goal: Estimate the integrated stochastic volatility of Xt from noisy
observations Yt .
Pavliotis (IC)
CompStochProc
275 / 298
E2ti = 2 .
iid Eti = 0,
in probability, where
[X, X]T =
X
ti
Pavliotis (IC)
2
Xti+1 Xti .
CompStochProc
(219)
276 / 298
t0
1
2N
Pavliotis (IC)
CompStochProc
277 / 298
Z N (0, 1).
T
4(2 )2
t4 dt
1/3
We are using small sample sizes, the variance can be quite large
(use one out every 300 observations).
Pavliotis (IC)
CompStochProc
278 / 298
Z N (0, 1).
T
6(2 )2
t4 dt
1/3
CompStochProc
Z N (0, 1).
279 / 298
x (t)
dx (t) = V x (t),
; dt + 2 dW(t),
CompStochProc
280 / 298
2.5
1.5
0.5
2
1.5
0.5
0.5
1.5
CompStochProc
281 / 298
Pavliotis (IC)
CompStochProc
282 / 298
In one dimension
1
dx (t) = V (x (t))dt p
x (t)
dt +
2 dW(t).
2 dW(t).
L2
=
b
ZZ
Z=
e
0
p(y)
dy,
b=
Z
p(y)
dy.
= .
Pavliotis (IC)
CompStochProc
283 / 298
x (t)
dt +
2 d(t).
b d(t).
2
Pavliotis (IC)
CompStochProc
284 / 298
2dW(t).
Pavliotis (IC)
CompStochProc
285 / 298
dN
n=0
b to maximize log L :
Choose A
RT
hV(x(s)), dx(s)i
b
A(x) = 0R T
2
0 |V(x(s))| ds
Pavliotis (IC)
CompStochProc
286 / 298
|xn+1 xn |2 ,
N
n=0
bN, (x) =
A
PN1
PN1
n=0 V(xn )
b
Pavliotis (IC)
CompStochProc
287 / 298
No Subsampling
Pavliotis (IC)
CompStochProc
288 / 298
0.6
1
0.5
0.8
0.4
0.6
0.4
0.2
0.2
0
0.04
0.3
0.1
0.06
0.08
0.1
0.12
0.14
0.16
0.18
0
0.04
0.2
0.06
0.08
0.1
0.12
0.14
0.16
0.18
0.2
Pavliotis (IC)
CompStochProc
289 / 298
1.4
1
0.9
1.2
0.8
1
0.7
0.6
0.8
0.6
0.5
0.4
0.3
0.4
0.2
0.2
0.1
0
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
0
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
Pavliotis (IC)
CompStochProc
290 / 298
Subsampling
:= tsam = 2k t,
k = 0, 1, . . . .
Pavliotis (IC)
CompStochProc
291 / 298
1
0.5
0.8
0.4
0.6
0.4
0.2
0.2
0.3
0.1
0.2
0.4
tsam
0.6
0.8
0.2
0.4
tsam
0.6
0.8
Pavliotis (IC)
CompStochProc
292 / 298
1.6
1.4
2.5
1.2
2
0.8
1.5
0.6
1
0.4
0.5
0.2
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
sam
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
sam
b B
b vs tsam for bistable potential with = 0.5, = 0.1.
Figure: A,
Pavliotis (IC)
CompStochProc
293 / 298
1.5
1.5
B12
11
0.5
0.5
0.1
0.2
0.3
0.4
0.5
tsam
0.6
0.7
0.8
0.9
0.1
0.2
0.3
0.4
tsam
0.5
0.6
0.7
0.8
0.9
0.1
0.2
0.3
0.4
tsam
0.5
0.6
0.7
0.8
0.9
3.5
2
3
1.5
B22
21
2.5
1.5
0.5
1
0.1
0.2
0.3
0.4
0.5
tsam
0.6
0.7
0.8
0.9
0.5
CompStochProc
294 / 298
Pavliotis (IC)
CompStochProc
295 / 298
lim N, (x (t)) = ,
a.s.
Pavliotis (IC)
CompStochProc
296 / 298
in distribution.
b N, (x ) = A
lim A
in distribution.
Pavliotis (IC)
CompStochProc
297 / 298