SDE
Stochastic Differential Equations
SDE
is a MATLAB library which
illustrates the properties of stochastic differential equations and some
algorithms for handling them,
by Desmond Higham.
The original version of these routines is available at
"http://www.maths.strath.ac.uk/~aas96106/algfiles.html".
Languages:
SDE is available in
a C version and
a C++ version and
a FORTRAN77 version and
a FORTRAN90 version and
a MATLAB version.
Related Data and Programs:
BLACK_SCHOLES,
a MATLAB library which
implements some simple approaches to
the Black-Scholes option valuation theory,
by Desmond Higham.
BROWNIAN_MOTION_SIMULATION,
a MATLAB program which
simulates Brownian motion in an M-dimensional region.
CNOISE,
a MATLAB library which
generates samples of noise obeying a 1/f^alpha power law,
by Miroslav Stoyanov.
COLORED_NOISE,
a MATLAB library which
generates samples of noise obeying a 1/f^alpha power law.
CORRELATION,
a MATLAB library which
contains examples of statistical correlation functions.
PCE_BURGERS,
a MATLAB program which
defines and solves a version of the time-dependent viscous Burgers equation,
with uncertain viscosity, using a polynomial chaos expansion in terms
of Hermite polynomials,
by Gianluca Iaccarino.
PCE_LEGENDRE,
a MATLAB program which
assembles the system matrix associated with a polynomal chaos expansion
of a 2D stochastic PDE, using Legendre polynomials;
PCE_ODE_HERMITE,
a MATLAB program which
sets up a simple scalar ODE for exponential decay with an uncertain
decay rate, using a polynomial chaos expansion in terms of Hermite polynomials.
PINK_NOISE,
a MATLAB library which
computes a "pink noise" signal obeying a 1/f power law.
STOCHASTIC_DIFFUSION,
MATLAB functions which
implement several versions of a stochastic diffusivity coefficient.
STOCHASTIC_GRADIENT_ND_NOISE,
a MATLAB program which
solves an optimization problem involving a functional over a system
with stochastic noise.
STOCHASTIC_RK,
a MATLAB library which
applies a Runge Kutta (RK) scheme to a stochastic differential equation.
Author:
Desmond Higham
Reference:
-
Desmond Higham,
An Algorithmic Introduction to Numerical Simulation of
Stochastic Differential Equations,
SIAM Review,
Volume 43, Number 3, September 2001, pages 525-546.
Source Code:
-
bpath.m computes one simulation
of discretized Brownian motion over the time interval [0,1]
using 500 time steps and a user specified random number seed.
-
bpath_vectorized.m, a second version of BPATH
using faster, vectorized commands.
-
bpath_average.m,
displays the average of 1000 Brownian paths.
-
chain.m tests the stochastic Chain Rule.
-
em.m,
applies the Euler-Maruyama method to integrate a linear SDE.
-
emstrong.m
tests the strong convergence of the Euler-Maruyama method.
-
emweak.m
tests the weak convergence of the Euler-Maruyama method.
-
milstrong.m
tests the strong convergence of the Milstein method.
-
stab_asymptotic.m examines the
asymptotic stability of the Euler-Maruyama method applied
to a stochastic differential equation.
-
stab_meansquare.m examines the mean-square
stability of the Euler-Maruyama method applied
to a stochastic differential equation.
-
stochastic_integral_ito.m,
approximates the stochastic integral W(t) dW using the Ito integral.
-
stochastic_integral_strat.m,
approximates the stochastic integral W(t) dW using the Stratonovich integral.
-
timestamp.m,
prints the YMDHMS date as a timestamp.
Examples and Tests:
A number of graphics images are created by the example programs:
-
bpath.png,
an image of the computed path for BPATH.
-
bpath_vectorized.png,
an image of the computed path for BPATH_VECTORIZED.
-
bpath_average.png,
an image of the averaged paths for BPATH_AVERAGE.
-
chain.png,
an image comparing solutions done with and without the chain rule.
-
em.png,
an image of a true solution versus the Euler-Maruyama estimate.
-
emstrong.png,
an image of the strong convergence of the Euler-Maruyama error with stepsize.
-
emweak0.png,
an image of the weak convergence of the standard Euler-Maruyama method.
-
emweak1.png,
an image of the weak convergence of the weak Euler-Maruyama method.
-
milstrong.png,
an image of the strong convergence of the Milstein method.
-
stab_asymptotic.png,
an image of an asymptotic stability check.
-
stab_meansquare.png,
an image of a meansquare stability check.
You can go up one level to
the MATLAB source codes.
Last revised on 18 September 2012.