brownian motion and an introduction to stochastic...

13
Brownian Motion and An Introduction to Stochastic Integration Arturo Fernandez University of California, Berkeley Statistics 157: Topics In Stochastic Processes Seminar March 10, 2011 1 Introduction In the world of stochastic modeling, it is common to discuss processes with dis- crete time intervals. Brownian Motion (BM) is the realization of a continuous time stochastic process. Furthermore, the continuity of BM is an important property that develops a basis for stochastic intgeration. What is stochastic intgeration? In introductory calculus, the concept of integration is usually done with respect to variables that are fixed. Real Analysis explores the topic of integration with respect to functions of the same parameter. Most variations of stochastic inte- gration integrate stochastic processes with respect to an independent brownian motion. However, most stochastic differential equations (SDEs) have no specific way from which we can can find a closed-form solution and we must apply nu- merical techniques to generalize the shape of solution. In this paper, I introduce and construct Brownian Motion via a random walk process and then note some of its properties. Finally, I give a rough preview into Stochastic Integration with theory and examples of numerical methods for solving SDEs. 2 The Random Walk Revisited: Constructing Brownian Motion (Note: The following introduction to the Wiener process, its properties, and the extended generalization is based off the lecture notes referred to in [1].) Let {ξ k } kN be a sequence of independent and identically distributed (i.i.d) dis- crete random variables such that P{ξ k = ±1} =1/2. Note that E [ξ k ]=0 and Var[ξ k ]= E ξ 2 k =1 and define S 0 =0 and S n = n X k=1 ξ k 1

Upload: lyphuc

Post on 26-Aug-2018

219 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Brownian Motion and An Introduction to Stochastic Integrationarturof/Teaching/STAT150/Notes/II... · Brownian Motion and An Introduction to Stochastic Integration Arturo Fernandez

Brownian Motion and

An Introduction to Stochastic Integration

Arturo FernandezUniversity of California, Berkeley

Statistics 157: Topics In Stochastic Processes Seminar

March 10, 2011

1 Introduction

In the world of stochastic modeling, it is common to discuss processes with dis-crete time intervals. Brownian Motion (BM) is the realization of a continuous timestochastic process. Furthermore, the continuity of BM is an important propertythat develops a basis for stochastic intgeration. What is stochastic intgeration?In introductory calculus, the concept of integration is usually done with respectto variables that are fixed. Real Analysis explores the topic of integration withrespect to functions of the same parameter. Most variations of stochastic inte-gration integrate stochastic processes with respect to an independent brownianmotion. However, most stochastic differential equations (SDEs) have no specificway from which we can can find a closed-form solution and we must apply nu-merical techniques to generalize the shape of solution. In this paper, I introduceand construct Brownian Motion via a random walk process and then note someof its properties. Finally, I give a rough preview into Stochastic Integration withtheory and examples of numerical methods for solving SDEs.

2 The Random Walk Revisited: ConstructingBrownian Motion

(Note: The following introduction to the Wiener process, its properties, and the extended generalization

is based off the lecture notes referred to in [1].)

Let {ξk}k∈N be a sequence of independent and identically distributed (i.i.d) dis-crete random variables such that P{ξk = ±1} = 1/2. Note that

E [ξk] = 0 and Var[ξk] = E[ξ2k

]= 1

and define

S0 = 0 and Sn =n∑k=1

ξk

1

Page 2: Brownian Motion and An Introduction to Stochastic Integrationarturof/Teaching/STAT150/Notes/II... · Brownian Motion and An Introduction to Stochastic Integration Arturo Fernandez

Fernandez 2

As a funtion of discrete time n, Sn is the position of a random walk (p = 12 , q = 1

2)on Z. Suppose we want to rescale time and space so that we have a stochasticprocess on t ∈ [0, 1] and with values in R. We can construct such a thing via anapplication of the Central Limit Theorem:

That is, as N → ∞, SN√N

converges in distribution to a standard normal

distribution,SN −N · µξkσξk ·

√N

=SN√N

d−→N (0, 1) (1)

Thus, we can define a piecewise constant, random function WNt on t ∈ [0, 1] by

letting

WNt =

SbN ·tc√N

(2)

where b·c is the integer-floor function. As per standard notation for stochasticprocesses, we have written the time parameter t of the random function as a sub-script, i.e. WN

t = WN (t).

0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0

−2.0

−1.5

−1.0

−0.5

0.0

0.5

1.0

1.5

2.0

Figure 1: Realizations of WNt for N = 75 (red), N = 300 (green),

and N = 5000 (blue)

Theorem 1 (Donsker). As N →∞, WNt converges in distribution to a stochastic

process Wt

WNt

d−→Wt (3)

Wt is termed as the Wiener Process or also Brownian Motion.

Page 3: Brownian Motion and An Introduction to Stochastic Integrationarturof/Teaching/STAT150/Notes/II... · Brownian Motion and An Introduction to Stochastic Integration Arturo Fernandez

Fernandez 3

Similarly, Wt = W (t), is a random function with time parameter t. Theorem 1will go without proof in this discussion. We will continue by taking for grantedthat the limiting process Wt exists and study its properties.

3 Properties of Wt

3.1 Basic Properties

The Wiener process Wt has the following basic properties:

(a) Independence:Wt −Ws is independent of {Wτ}τ≤s ∀ 0 ≤ s ≤ t

(b) Stationarity (Stationary Increments):The statistical distribution of Wt+s −Ws is independedent of s (andtherefore equivalent in distribution to Wt.)

(c) Gaussianity :Wt is a Gaussian Process with:MeanE(Wt) = 0

and CovarianceE(Wt ·Ws) = min(t, s)

(d) Continuity :With probabaility 1, Wt viewed as a function of t is continuous. (i.e.the set of discontinuities has measure zero)

3.2 Sketch Proof of Basic Properties

3.2.1 Independence and Stationarity

To show independence (a) and stationarity (b), first note that for 1 ≤ m ≤ n,

Sn − Sm =n∑

k=m+1

ξk

is independent of Sm and equal in distribution to Sn−m since the ξk’s are iid.Therefore, it follows that for 0 ≤ s ≤ t, Wt −Ws is independent of Ws and that

Wt −Wsd=Wt−s (4)

3.2.2 Gaussianity

To show Gaussianity (c), we check that Wt is in fact a Gaussian Process byfinding its probability density function (pdf) at a time t and then establishing itscharacteristics.

Fix t ≥ 0. As N →∞,

WNt =

SbNtc√N

=SbNtc√bNtc

·√bNtc√N

d−→ N (0, 1)√td= N (0, t) (5)

Page 4: Brownian Motion and An Introduction to Stochastic Integrationarturof/Teaching/STAT150/Notes/II... · Brownian Motion and An Introduction to Stochastic Integration Arturo Fernandez

Fernandez 4

This gives us an idea of the distribution of values of Wt as it evolves over time.Symbolically, we can interpret (5), for a fixed time t, as

P(Wt ∈ [x1, x2]) =

∫ x2

x1

ρ(x, t) dx (6)

=

∫ x2

x1

e−x2/2t

√2πt

dx (7)

Note that ρ(x, t) is simply defined by the scaling of a Gaussian distribution, whereµ = 0 and σ =

√t. As such,

ρ(x, t) =1√2πσ

e−(x−µ)2

2σ2 =e−x

2/2t

√2πt

is the probability density function (pdf) for Wt at a fixed time t.

To understand the Gaussian properties of Wt, we begin with the following. Let

P = {0 < t1 ≤ t2 ≤ . . . ≤ tn}

be a partition of (0, 1]. Then, the vector (WNt1 , . . . ,W

Ntn ) will converge in distribu-

tion to a n-dimensional Gaussian variable. Furthermore, the probability densitythat (Wt1 , . . . ,Wtn) = (x1, . . . , xn) can be derived, using the independence andstationarity of incerements of Wt:

Pd(Wt1 = x1, . . . ,Wtn = xn) = Pd(Wt1 = x1,Wt2 −Wt1 = x2 − x1, . . . ,

Wtn −Wtn−1 = xn − xn−1)

= Pd(Wt1 = x1,Wt2−t1 = x2 − x1, . . . ,

Wtn−tn−1 = xn − xn−1)

Therefore, ρ(x1, t1) ·ρ(x2−x1, t2− t1) · · · ρ(xn−xn−1, tn− tn−1) is the probabilitydensity referred to above.

In addition, we derive the expectation and covariance of the Gaussian ProcessWt.Expectation: E[Wt] = 0

E[Wt] =

∫Rx · ρ(x, t) =

∫Rodd · even = 0

Covariance: Cov(Wt,Ws) = min(t, s)

Proof. We prove the case when 0 ≤ s ≤ t and show that Cov(Wt,Ws) = s. Thecase when 0 ≤ t ≤ s follows in a similar manner and proves the desired result.

Page 5: Brownian Motion and An Introduction to Stochastic Integrationarturof/Teaching/STAT150/Notes/II... · Brownian Motion and An Introduction to Stochastic Integration Arturo Fernandez

Fernandez 5

Let 0 ≤ s ≤ t. Since W0 = 0 and the increments of Wt are independent,

Cov(Wt,Ws) = E[Wt ·Ws]

= E[(Ws +Wt −Ws)Ws]

= E[(W 2s + (Wt −Ws)Ws]

= E[W 2s ] + E[(Wt −Ws)Ws]

= s+ E[(Wt −Ws)(Ws −W0)]

= s+ E[Wt −Ws] · E[Ws −W0]

= s+ E[Wt −Ws] · E[Ws]

= s+ E[Wt −Ws](0)

= s

3.3 Other Properties

3.3.1 Self-similarity

The Wiener Process is self-similar, in the sense that for λ > 0,

Wtd=λ−1/2Wλt (8)

Therefore, studying it on [0, 1] will provide us with enough information to deduceits properties on any interval. The proof of (8) follows by showing that λ−1/2Wλt

is a Gaussian Process with the same mean and covariance as the Wiener Process.Note that a process G(t) is a Gaussian processs if and only if any finite linearcombination of samples of the Gaussian process will be normally distrbiuted.That is

G(t) is a G.P.⇐⇒∑i

aiG(ti) is Gaussian (9)

for ai, ti usually in R. Therefore, if we define some new process H(t) = a(t)G(c(t))note that ∑

i

aiH(ti) =∑i

ai · a(ti)G(c(ti))

=∑i

aiG(ti)

It follows that λ−1/2Wλt is in fact a Gaussian process. Its mean and covarianceare easily calculated using the same techniques we used for the Wiener Process.

3.3.2 First Passage Times

Given a > 0, we define the first passage time for a to be Ta := inf{t : Wt = a}.

Claim 2.

P(Wt > a) =1

2P(Ta < t) (10)

Page 6: Brownian Motion and An Introduction to Stochastic Integrationarturof/Teaching/STAT150/Notes/II... · Brownian Motion and An Introduction to Stochastic Integration Arturo Fernandez

Fernandez 6

Proof. Where the following second equality follows by the continuity of Wt andthe third by symmetry of Wt,

P(Wt > a) = P(Wt > a)

= P(Ta < t,Wt > a)

=1

2P(Ta < t)

Define Mt = sup0≤s≤t

Ws and mt = inf0≤s≤t

Ws. Note that by (10)

P(Mt > a) = P(Ta < t) = 2P(Wt > a) = 2

∫ ∞a

e−x2/2t

√2πt

dx (11)

Similarly, by a symmetric argument it follows that P(Mt > a) = P(mt < −a). Wenow shortly divert from the topic of Brownian Motion to introduce some conceptsin stochastic integration.

4 Foundation for Stochastic Integrals

(Note: The following introduction to stochastic integrals is based off the lecture notes referred to in [2].)

4.1 Motivation from Real Analysis

Suppose we want to evaluate I(x) ≡∫ ba x(t) dt. From Real Analysis, we know

that for a partition P = {a = t0 < t1 < · · · < tn = b} of n intervals and awell-behaved function x(t) that its Riemann Intergral, defined by a left endpointapproximation,

In(x) ≡n∑i=1

x(ti−1)(ti − ti−1) (12)

will converge to I(x) as n→∞ and mesh(P)→ 0, where mesh(P)= max{ti−ti−1 :1 ≤ i ≤ n}. Now suppose we would like to evaluate the integral of x(t) with respectto some function w(t)

Iw(x) =

∫ b

ax(t) dw(t) (13)

If w is differentiable on [a, b], then by change of variables Iw(x) =∫ ba x(t)w′(t) dt.

In this case, the approximating sum is now of the form

n∑i=1

x(ti−1)w′(ti−1)(ti − ti−1) (14)

Alternatively, for nice w(t), there is the Riemann-Stieltjes integral approximatingsum

n∑i=1

x(ti−1)(w(ti)− w(ti−1)) (15)

Page 7: Brownian Motion and An Introduction to Stochastic Integrationarturof/Teaching/STAT150/Notes/II... · Brownian Motion and An Introduction to Stochastic Integration Arturo Fernandez

Fernandez 7

which we can use even if w′ doesn’t exist.Continuing with an example in R, suppose we want to approximate the solu-

tion of dx/dt = f(x). A Euler scheme says that for a fixed ∆t, we iterate

x(t+ ∆t) = x(t) + f(x)∆t (16)

for a given x(t0) = x0, which in fact will converge to the true solution when∆t→ 0 (Arnold, 1973).

It would be great if we could extend this notion to random functions of timeX(t) and W (t). For example, given appropriate measurability conditions it wouldbe posssible to evaluate

∫X(t) dt.

∫X(t)dWt is also plausible according to (14)

if dW/dt existed but a noted property of the Wiener Process is that it is non-differentiable everywhere with probability 1. This suggests that we use the ap-proximation given by (15); that is we would like to say that∫ t=b

t=aX(t) dWt = lim

n→∞

n∑i=1

X(ti−1)(W (ti)−W (ti−1)) (17)

But, what does this actually mean? In the Ito Calculus lecture notes that followthis presentation, I go into a more thorough formulation of (17). For now, wereturn to our original development of Brownian Motion to introduce some moregeneral results in Stochastic Integration.

4.2 A Generalization

Recalling the definition of Sn and (2), and letting tn = n/N , WNt satisfies the

recurrence relation:WNtn+1

= WNtn + ξn+1

√∆t (18)

where ∆t = 1/N . We can generalize this further for some stochastic process X(t).A natural generalization of the recurrence relation (18) is

XNtn+1

= XNtn + b(XN

tn , tn)∆t+ σ(XNtn , tn)ξn+1

√∆t, X0 = x (19)

Intrestingly, if the last term is absent, then

XNtn+1

= XNtn + b(XN

tn , tn)∆t (20)

is just the Euler scheme (16) for the ODE dXt/dt = b(Wt, t). In addition, itcan be shown that, if σ(x, t) meets appropriate regularity requirements, then asN → ∞ (with ∆t → 0 and n∆t → t) Xt

N will converge to a stochastic processXt. The associted limiting equation of (19) for Xt is denoted as the StochasticDifferential Equation (SDE):

dXt = b(Xt, t)dt+ σ(Xt, t)dWt, X0 = x (21)

The convergence of XNt to Xt holds given that the ξn’s are i.i.d random variables

with mean zero, E[ξn] = 0, and variance one, E[ξ2n] = 1. A common choice in

numerical schemes is to take ξn = N (0, 1), in which case√

∆tξn+1d=Wtn+1 −Wtn (22)

We continue this discussion with some simple numerical examples.

Page 8: Brownian Motion and An Introduction to Stochastic Integrationarturof/Teaching/STAT150/Notes/II... · Brownian Motion and An Introduction to Stochastic Integration Arturo Fernandez

Fernandez 8

4.3 Numerical Examples

(Note: The following numerical examples are based on the tutorial referred to in [3].)

In the sections that follow, note that dWt = dW and tj is redefined.

4.3.1 White Noise

One good example to start of with is White Noise, denoted as η(t), which isdefined as the formal derivative of the Wiener process (again, a formal derivativebecause Wt has probability one of being nondifferentiable). White noise has theproperties that

• E[η(t)] = 0

• E[η(t) · η(s)] = δ(t− s)

where the Dirac delta function is defined as

δ(x) =

{∞ if x = 0,

0 if x 6= 0.

For some ε ∈ R\{0}, consider the SDE,

dX

dt= εη(t) = ε

dW

dt(23)

Multiplying equation (23) by dt, we have an alternative way of writing SDEs

dX = εdW (24)

Letting tj = jdt note that∫ tj

tj−1

dX =

∫ tj

tj−1

εdW = ε

∫ tj

tj−1

dW (25)

so thatX(tj) = X(tj−1) + ε(W (tj)−W (tj−1)) (26)

Finally, defining Xj ≡ X(tj) and dWj ≡W (tj)−W (tj−1), equation (26) simpliesto

Xj = Xj−1 + εdWj (27)

which can easily be programmed into Matlab. For ε = 1, the following graphicshows the output of such code, which can be found in Appendix A.

Page 9: Brownian Motion and An Introduction to Stochastic Integrationarturof/Teaching/STAT150/Notes/II... · Brownian Motion and An Introduction to Stochastic Integration Arturo Fernandez

Fernandez 9

Figure 2: Inherently, the solution to White Noise is just a Sample Path ofBrownian Motion

4.3.2 Euler-Maruyama Method

Continuing in the same fasion we consider the more general SDE

dX

dt= f(X(t)) + g(X(t)) · η(t) (28)

equivalently denoted as

dX = f(X(t))dt+ g(X(t))dW (29)

and using the same notation as in our previous example, we deduce that∫ tj

tj−1

dX︸ ︷︷ ︸Xj−Xj−1

=

∫ tj

tj−1

f(X(t))dt︸ ︷︷ ︸≈f(Xj−1)dt

+

∫ tj

tj−1

g(X(t))dW︸ ︷︷ ︸≈g(Xj−1)dWj

(30)

So that the approximation we are left with is

Xj −Xj−1 ≈ f(Xj−1)dt+ g(Xj−1)dWj (31)

Given an initial x(t0) = x0, the above formula is known as the Euler-Maruyama(E-M) Method for solving SDEs. We now apply the E-M method to the SDE

dX = µXdt+ σXdW, X(t0) = x0 (32)

Page 10: Brownian Motion and An Introduction to Stochastic Integrationarturof/Teaching/STAT150/Notes/II... · Brownian Motion and An Introduction to Stochastic Integration Arturo Fernandez

Fernandez 10

and compare its numerical solution using (31) to its exact solution (see Ito Cal-culus notes), which is known as Geometric Brownian Motion,

Xt = X0 · e(µ−σ2

2)t+σWt (33)

where X0 = X(t0).

Figure 3: The blue asterisk path is the Euler-Maruyama numericalapproximation. The solid pink path is the true solution.

4.3.3 Stochastic Runge-Kutta

There are more advanced SDE solution algorithms including Stochastic Runge-Kutta algorithms, some of which are presented in Stochastic Runge-Kutta algo-rithms I. White noise by R.L. Honeycutt, Phys. Rev. A 45:600-610, 1992.

5 Remarks

Hopefully, enough information has been presented to encourage the reader to trysome exercises involving brownian motion and to continue this topic by researchingIto Calculus.

Page 11: Brownian Motion and An Introduction to Stochastic Integrationarturof/Teaching/STAT150/Notes/II... · Brownian Motion and An Introduction to Stochastic Integration Arturo Fernandez

Fernandez 11

6 Appendix A: Code

6.1 Discrete Brownian Motion in R

# This code was written by: Arturo Fernandez

# for: Statistics 157, Spring 2011

#----------------------#

set.seed(157)

ones=c(1,-1)

n1=75

n1_xs=sample(ones,n1,replace=TRUE)

n2=300

n2_xs=sample(ones,n2,replace=TRUE)

n3=5000

n3_xs=sample(ones,n3,replace=TRUE)

#----------------------#

Sn3=cumsum(n3_xs)/sqrt(n3)

sn3=c(0,Sn3)

par(lab=c(10,10,10),las=1,tcl=0.5)

plot(seq(0,1,1/n3),sn3,type="s",col="blue",

xlab="",ylab="",ylim=c(-2,2))

Sn2=cumsum(n2_xs)/sqrt(n2)

sn2=c(0,Sn2)

lines(seq(0,1,1/n2),sn2,type="s",col="green")

Sn1=cumsum(n1_xs)/sqrt(n1)

sn1=c(0,Sn1)

lines(seq(0,1,1/n1),sn1,type="s",col="red")

6.2 Numerical Solution of White Noise in Matlab(Note: From [3].)

%BPATH1 Brownian path simulation

randn(’state’,100) % set the state of randn

T = 1; N = 500; dt = T/N;

dW = zeros(1,N); % preallocate arrays ...

W = zeros(1,N); % for efficiency

% Refer to Eqn.22 in notes

dW(1) = sqrt(dt)*randn; % first approximation outside the loop ...

W(1) = dW(1); % since W(0) = 0 is not allowed

for j = 2:N

dW(j) = sqrt(dt)*randn; % general increment(Notes Eqn.22)

W(j) = W(j-1) + dW(j);

end

plot([0:dt:T],[0,W],’r-’) % plot W against t

xlabel(’t’,’FontSize’,16)

ylabel(’W(t)’,’FontSize’,16,’Rotation’,0)

6.3 Euler-Maruyama for Geometric Brownian Motion in Matlab(Note: From [3].)

Page 12: Brownian Motion and An Introduction to Stochastic Integrationarturof/Teaching/STAT150/Notes/II... · Brownian Motion and An Introduction to Stochastic Integration Arturo Fernandez

Fernandez 12

%EM Euler-Maruyama method on linear SDE

%

% SDE is dX = lambda*X dt + mu*X dW, X(0) = Xzero,

% where lambda = 2, mu = 1 and Xzero = 1.

%

% Discretized Brownian path over [0,1] has dt = 2^(-8).

% Euler-Maruyama uses timestep dt.

randn(’state’,100)

lambda = 2 % problem parameters

mu = 1;

Xzero = 1;

T = 1;

N = 2^8; %# of Intervals

dt = 1/N; %Step Interval

dW = sqrt(dt)*randn(1,N); % Brownian increments

W = cumsum(dW); % discretized Brownian path

Xtrue = Xzero*exp((lambda-0.5*mu^2)*([dt:dt:T])+mu*W);

plot([0:dt:T],[Xzero,Xtrue],’m-’), hold on

Xem = zeros(1,N); % preallocate for efficiency

Xem(1) = Xzero + dt*lambda*Xzero + mu*Xzero*dW(1);

for j=2:N

Xem(j) = Xem(j-1) + dt*lambda*Xem(j-1) + mu*Xem(j-1)*dW(j);

end

plot([0:dt:T],[Xzero,Xem],’b--*’), hold off

xlabel(’t’,’FontSize’,12)

ylabel(’x’,’FontSize’,16,’Rotation’,0,’HorizontalAlignment’,’right’)

emerr = abs(Xem(end)-Xtrue(end))

Page 13: Brownian Motion and An Introduction to Stochastic Integrationarturof/Teaching/STAT150/Notes/II... · Brownian Motion and An Introduction to Stochastic Integration Arturo Fernandez

Fernandez 13

References

[1] Eric Vanden-Eijnden, Lecture Notes on the Wiener Process [PDF Document].Retrieved from Lecture Notes Online Web site:http://www.cims.nyu.edu/~eve2/chap4.pdf

http://www.cscamm.umd.edu/lectures/EVandenLectures_final.pdf

[2] Cosma Shalizi, A First Look at Stochastic Integrals with the Wiener Process[PDF Document]. 36-754, Advanced Probability II or Almost None of theTheory of Stochastic Processes. Retrieved from Lecture Notes Online Website:http://www.stat.cmu.edu/~cshalizi/754/notes/lecture-18.pdf

[3] Jeff Moehlis, A Standard Wiener Process and White Noise, [Web Pages].APC591 Tutorial 7: A Beginner’s Guide to Simulating Stochastic DifferentialEquations. Accessed at:http://www.me.ucsb.edu/~moehlis/APC591/tutorials/tutorial7/

node2.html

http://www.me.ucsb.edu/~moehlis/APC591/tutorials/tutorial7/

node3.html

http://www.me.ucsb.edu/~moehlis/APC591/tutorials/tutorial7/

node5.html