SDE Toolbox is a (still under development) free MATLAB® package to simulate the solution of a user defined Itô
or Stratonovich stochastic differential equation (SDE), estimate parameters from data and visualize statistics; users can also simulate an SDE model
chosen from a model library.
More in detail, the user can specify:
- the Itô or the Stratonovich SDE to be simulated. This can be a user defined SDE or an SDE chosen from the SDE Toolbox models library;
- the SDE structural parameter values;
- the number of the SDE's solution trajectories to be simulated;
- the numerical integration method (Euler-Maruyama or Milstein);
- the time interval [t0,T] to be considered;
- the integration stepsize;
- the parameter estimation method;
to obtain (see also the screenshots):
- parameter estimates and confidence intervals;
- plot(s) of the solution trajectories;
- plot(s) of the trajectories empirical mean, together with their 95% confidence bands and the 1st and 3rd quartiles;
- histogram(s) of the trajectories distribution at the endtime T;
- Monte-Carlo statistics of the solution process at the endtime T, i.e. mean, moments, skewness, kurtosis, 95% confidence bands etc.;
News
5th December 2007: Version 1.4.1 is available here.
(i) This version includes faster implementations of the parameter estimation procedures:
the parametric estimation procedure (SDE_PSML.m) speed has been boosted for the case
of multi-dimensional SDEs, now it is 14x-27x times faster, depending on the machine; negligible
improvement for the non-parametric estimation procedure (SDE_NPSML.m); no improvement for
the estimation of one-dimensional SDEs.
(ii) The parametric estimation with Milstein integration scheme (SDE_PSML_milstein.m) has been
removed: in fact the parametric SML procedure, as presented in Pedersen (1995) and Brandt-Santa-Clara (2002),
is defined only with respect to the Euler-Maruyama (EM) approximation.
Scroll this page for the complete list of the changes. 26th November 2007: Version 1.4.0 is available here. With this new version the use of global variables is avoided (except for the demo files): this makes the present version much more capable of interfacing with other
Matlab programs, but the structure of the 'sdefiles' is different. Thus sdefiles created under previous versions will not work with v. 1.4.0
(however, it is straightforward to adapt them, just look at the new sdefiles in the "models_library" folder); as a consequence the Toolbox can be used
without necessarily running SDE_library_run.m, and can be integrated into user defined Matlab programs; several examples are provided in the User's Guide.
Approximated parameters 95% intervals can now be calculated. Scroll this page for the complete list of
the changes. 10th September 2007: Version 1.3.0 is available here. With this new version it is possible to estimate the parameters of the SDE model from data. Two methods are implemented: a parametric and a non-parametric one. See the User's Guide for details.
Only MATLAB base is required to
run the toolbox. SDE Toolbox has been developed and tested with MATLAB 6.5 (R13) and 7.3.0 (R2006b)
for Windows; however it should work under different platforms/versions as well.
Download
SDE Toolbox is free software (with some restrictions) hosted on SourceForge and can be downloaded here; previous versions are available.
Donations: If you enjoy SDE Toolbox a gift is the perfect way to say thank you! I have setup an Amazon wish list with books, CDs and other things I would enjoy.
Intentions
The area of deterministic differential equations (ordinary (ODE),
partial (PDE), or delay (DDE)) is a rich one, well-researched with
plenty of software packages and tools available for the numerical
solution of such systems. On the other side, a
Mathworks supported MATLAB
toolbox for the numerical treatment of stochastic differential
equations (SDEs) has been lacking for years and has been introduced only recently in the GARCH Toolbox (since MATLAB R2008a), but without considering parameter estimation tools. SDE Toolbox is not intended to provide a complete
package for the numerical treatment of SDEs: this is a free toolbox for
simulating sample paths of an SDE solution, computing statistics and
estimating the parameters from data. Other important issues
(e.g. stability of the solutions) are not
treated. This has to be intended
as a customizable piece of code which, in the author's intentions,
should furnish ideas to stimulate the users in developing their own
SDE package, and give some programming hints to SDE newbies.
From a numerical point of view, SDE newbies are highly encouraged in taking a look into the References section, in particular the
excellent monographies [1,2] and the
article [3], the latter giving a MATLAB-based
introduction to SDE simulation. Other useful references for numerical
methods are [4,5,6,7]. Highly specialistic references for SDE
theory and stochastic calculus are [8,9,10,11]; important references for parameter estimation of diffusion processes are [12,13].
See also the Toolbox
User's Guide and references therein.
Documentation
Take a look at the pdf User's Guide (~3.4 Mb). I suggest to download it (click the right mouse button and select "save target as") instead of
open it with a browser.
Restrictions
This program is free software (read the License); however if you have used it in your
researches and if you have published any results, please give me credit and cite my work as:
Umberto Picchini. SDE Toolbox: Simulation
and Estimation of Stochastic Differential Equations with
MATLAB, http://sdetoolbox.sourceforge.net.
Furthermore you are encouraged to send me a corresponding reprint.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program. If not, see http://www.gnu.org/licenses/.
References
[1] Peter E. Kloeden and Eckhard Platen. Numerical solution of stochastic differential equations.
Springer, 1992.
[2] Peter E. Kloeden, Eckhard Platen and Henri Schurz. Numerical solution of SDE through
computer experiments. Springer, 1994.
[3] Desmond J. Higham. An algorithmic introduction to numerical simulation of stochastic differential
equations. SIAM J. Numer. Anal., 43(3):525–546, 2001. http://www.caam.rice.edu/~cox/stoch/dhigham.pdf
[4] K. Burrage and P.M. Burrage. High strong order explicit Runge–Kutta methods for stochastic
ordinary differential equations. Applied Numer. Mathematics, 22:81–101, 1996.
[5] P.M. Burrage and K. Burrage. A variable stepsize implementation for stochastic differential
equations. SIAM J. Sci. Comput., 24(3):848–864, 2002.
[6] Pamela Marion Burrage. Runge–Kutta methods for stochastic differential equations. PhD
thesis, Department of Mathematics, University of Queensland (Australia), 1999. http://www.maths.uq.edu.au/~kb/pam.ps
[7] Andreas Rößler. Runge–Kutta methods for the numerical solution of stochastic differential
equations. PhD thesis, Department of Mathematics, University of Darmstadt, 2003.
[8] Ioannis Karatzas and Steven E. Shreve. Brownian motion and stochastic calculus. Springer-
Verlag, 1991.
[9] Bernt Øksendal. Stochastic differential equations: an introduction with applications. Springer,
second edition, 2000.
[10] L.C.G. Rogers and David Williams. Diffusions, Markov processes and martingales. Volume
2: Itô calculus. John Wiley & Sons, 1987.
[11] D.W. Stroock and S.R.S. Varadhan. Multidimensional Diffusion Processes. Springer-Verlag,
1979.
[12] B.L.S. Prakasa Rao. Statistical Inference for Diffusion Type Processes. Arnold, London and Oxford University press, New York, 1999.
[13] Y.A. Kutoyants. Statistical Inference for Ergodic Diffusion Processes. Springer, London, 2004.