Multilevel Monte Carlo software

This page provides software developed in a MLMC software project for MLMC computations in a variety of languages.

This software differs from my previous MLMC software in separating the computations from the plotting of the results. Each application code has two parts, a high-level part which calls "mlmc_test" to perform the MLMC tests, using the routine "mlmc", and a low-level part which is called by both "mlmc_test" and "mlmc" to compute the MLMC differences for one particular level of correction.

The application codes produce one or more output text files. The MATLAB routine "mlmc_plot" can then be used to generate the standard set of figures which I use in most of my papers.


Languages


MATLAB

Common routines used by all applications:
opre -- financial options based on scalar geometric Brownian motion and Heston models, similar to my original 2008 Operations Research paper, using an Euler-Maruyama discretisation
mcqmc06 -- financial options based on scalar geometric Brownian motion, similar to my 2008 MCQMC06 paper, using a Milstein discretisation
basket -- basket options based on 5 underlying assets, similar to my 2009 Winter Simulation Conference paper, using a Milstein discretisation
ctmp -- continuous time Markov process, giving results for a testcase in a 2012 paper by Anderson and Higham
spde -- SPDE arising from modelling of credit derivatives, giving results similar to those in a 2012 paper with Christoph Reisinger
antithetic -- Heston SDE example using the Milstein discretisation without the simulation of Levy areas, showing the benefits of the antithetic treatment analysed in a 2014 Annals of Applied Probability paper with Lukasz Szpruch
adapted -- non-standard SDE calculation with an adapted timestep, giving results for a testcase in a 2015 MCQMC14 paper
reflected1D -- 1D reflected diffusions of particles with and without mass, giving results for a presentation at SciCADE 2015
reflected -- 3D reflected diffusions using adaptive timesteps, giving similar results to a presentation at MCQMC16
nested -- a very simple nested expectation testcase for estimating EVPPI from a 2019 paper with Takashi Goda
EVPPI -- a set of 3 medical decision making EVPPI test problems from the same 2019 paper with Takashi Goda


C/C++

Note: the Makefiles for these testcases are setup to produce two different executables: In each case, they are based on the same C++ code, with the details of the random number generator hidden within mlmc_rng.cpp. Depending on the CPU(s) being used, the OpenMP executable is typically up to 100 times faster.

Common routines used by all applications:
mcqmc06 -- financial options based on scalar geometric Brownian motion, similar to my 2008 MCQMC06 paper, using a Milstein discretisation
ctmp -- continuous time Markov process, giving results for a testcase in a 2012 paper by Anderson and Higham
adapted -- non-standard SDE calculation with an adapted timestep, giving results for a testcase in a 2015 MCQMC14 paper
reflected -- 3D reflected diffusions using adaptive timesteps, giving similar results to a presentation at MCQMC16
feynman-kac -- stopped diffusions, giving very similar results to a 2018 paper with Francisco Bernal
nested -- a very simple nested expectation testcase for estimating EVPPI from a 2019 paper with Takashi Goda

Python

Please follow this link.


R

Please follow this link.


Licensing and acknowledgements

This software is freely available to all under a GPL license -- anyone requiring a more permissive license for commercial purposes should contact me.

The software is based on the research reported in the papers listed here. If you find it helpful in your research, the papers there can be cited in any publications. I would also be interested to hear about it, particularly if it is used for novel applications.

The underlying research has been supported by