Numerical Simulation of Stochastic Differential Equations: Lecture, Part Des Higham Department of Mathematics University of Strathclyde Lecture, part : SDEs Ito stochastic integrals Ito SDEs Examples of SDEs 6 p./ Integration For deterministic h : R R, t i iδt, δt T/L, Riemann sum based on left endpoints Integral T h(t i )(t i+ t i ) h(t) dt defined by δt Stochastic Integration Integrate with respect to Brownian motion: Riemann sum based on left endpoints Integral T h(t i )(W(t i+ ) W(t i )) h(t) dw(t) defined by δt h(t) t 6 p./
E E ( δw i Digression: δw i [ δw i ) j,i j j E [ δw i Lδt T E [ δw i δw j,i j j E [ δw i δw j + E [ δw i L(L )δt + Lδt [ E δw j + E [ δw i E [ δw i T + O(δt) 6 p.5/ Reminder: Stochastic Integration Integrate with respect to Brownian motion: Riemann sum based on left endpoints Integral T h(t i )(W(t i+ ) W(t i )) h(t) dw(t) defined by δt Hence, var Digression continued: δw i [ δw i : E The sum δw i ( δw i T + O(δt) T O(δt) ) ( E [ δw i has mean T and variance O(δt). Hence, as δt it looks like the constant T. Example: h(t) W(t) ) ( W(t i ) (W(t i+ ) W(t i )) W(ti+ ) W(t i ) (W(t i+ ) W(t i )) ) ( W(ti+ ) W(t i ) ) δw i W(T ) T So T W(t) dw(t) W(T ) T 6 p.7/
Warning! Properties of the Ito Integral Similar analysis for the midpoint Riemann sum: W( (t i + t i+ )) (W(t i+ ) W(t i )) W(T ) We will always use the left endpoint definition: Ito We assume integrand is non-anticipative: h(t) independent of {W (s)} s>t Now E [ h(t i )δw i E [h(t i )δw i E[h(t i )E[δW i [ T E h(t) dw(t) martingale property 6 p.9/ E ( Properties of the Ito Integral ) h(t i )δw i E [h(t i )h(t j )δw i δw j + i<j A + B E [ h(t i ) δw i A i<j E [h(t i)h(t j )δw i E [δw j, B E [ h(t i ) E [ δw i δt E [ h(t i ) [ ( ) T E h(t) dw(t) T E [ h(t) dt Ito isometry Given f : R R: dx(t) dt ODE f(x(t)) Typically, x() given, solution required over [, T Fundamental Theorem of Calculus x(t) x() Can extend this to define an SDE... f(x(s)) ds 6 p./
SDE Given functions f and g, the stochastic process X(t) is a soluton of the SDE dx(t) f(x(t))dt + g(x(t))dw(t) if X(t) solves the integral equation X(t) X() f(x(s)) ds + g(x(s)) dw(s) Note : dx(t) and dw(t) are just shorthand Note : dw(t) not diff ble, so we cannot write dw(t)/dt If X(t) satisfies X(t) X() Repeat this: f(x(s)) ds + g(x(s)) dw(s) then we say that X(t) solves the SDE dx(t) f(x(t))dt + g(x(t))dw(t) Typically, X() given, solution required over [, T We say f( ) is the drift and g( ) is the diffusion Note: X(t) is a random variable at each time t 6 p./ SDE Example: f(x) µx and g(x) σx dx(t) µx(t)dt + σx(t)dw(t) Here µ and σ are real constants Used to model asset prices in finance Arises in Black Scholes theory for option valuation Solution: X(t) X()e (µ σ )t+σw(t) Satisfies E [X(t) E [X() e µt var [ X(t) E [ X() e (µ+σ )t f(x) µx and g(x) σx: Density.5.5.5.5.5.5.5.5 t t 5 σ. σ.5 σ. σ.5.5.5.5.5 6 p.5/
f(x) µx and g(x) σx: paths discretized Brownian paths, µ σ. σ. SDE Example: Interest Rates Mean-reverting square root process dx(t) λ (µ X(t)) dt + σ X(t)dW(t)...6.8...6.8 Also named after Cox, Ingersoll and Ross, 985 σ.6 σ.8 We assume that X() > If σ > λµ then X(t) can attain the value...6.8...6.8 6 p.7/ SDE Example: Stochastic Volatility SDE Example: Population Dynamics Heston (99) ds(t) λ (µ S(t)) dt + σ S(t) X(t)dW (t) dx(t) λ (µ X(t)) dt + σ X(t)dW (t) S(t) is asset price X(t) is squared volatility dx(t) r (K X(t)) dt + βx(t)dw(t) X(t) is population size /r is a characteristic timescale K is carrying capacity β is environmental noise strength Solution: X(t) X() e (rk β )t+βw(t) + X() r e(rk β )s+βw(s) ds 6 p.9/
SDE Example: Political Opinions, Cobb (98) Double-Well Potential: V (x) x (x ) dx(t) r (G X(t)) dt + ɛx(t)( X(t))dW(t) X(t) is political opinion of an individual at time t X(t) means ultra-liberal X(t) means ultra-conservative.6.. V(x).8.6.. G is the long term average (E[X(t) G) r is the rate at which E[X(t) approaches G ɛ is a noise strength Idea: Extreme views less likely to change mind ODE version : dx(t) dt.5.5.5.5 x V (x(t)) satisfies d dt V (x(t)) V (x(t)) dx(t) dt ( V (x(t)) ) SDE version : dx(t) V (X(t))dt + σdw(t) 6 p./ stint.m %STINT Approximate stochastic integral % % Ito integral of W dw randn( state,) % set the state of randn T ; N 5; dt T/N; dw sqrt(dt)*randn(,n); % increments W cumsum(dw); % cumulative sum ito sum([,w(:end-).*dw) itoerr abs(ito -.5*(W(end)ˆ-T)) 6 p./