MATLAB Answers


What tools are available for solving stochastic differential equations in MATLAB 8.0 (R2012b)?

I would like to solve a stochastic differential equation.

1 Answer

Answer by MathWorks Support Team on 13 Sep 2012
 Accepted Answer

A stochastic differential equation is a differential equation with an element of randomness in the equation. A stochastic differential equation is typically written as

 dX = lambda*X dt + mu*X dW

where 'X' is the variable of interest, 't' is time, and 'W' is a random variable or process. lambda and mu are constant parameters of the problem.

A comprehensive introduction to solving SDEs numerically is found in the paper "An Algorithmic Introduction to Numerical Simulation of Stochastic Differential Equations", by Desmond J Higham (SIAM review, Volume 43, Number 3). This paper also has several links to MATLAB examples which help illustrate the paper's points.

You can find the examples listed in the above paper, as well as additional examples in the areas of finance, at the following URL:


Some toolboxes also contain stochastic solvers. SimBiology Toolbox has the function SBIOENSEMBLERUN. The Econometrics Toolbox contains SDE objects.


Log in to comment.

Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

MATLAB Academy

New to MATLAB?

Learn MATLAB today!