Fractional Brownian motion

In April 2002, I graduated from the Vrije Universiteit Amsterdam. My master's thesis is entitled `Simulation of fractional Brownian motion', and you can download a revised version (PDF). This version has been updated in September 2004, but the earlier version is still available.

Code for simulating fractional Brownian motion

I have programmed some algorithms for simulating fractional Brownian motion. The resulting C-programs are suited for dynamically loading into R, but the routines can be called from any C-program. See the note below how to use these files with R. The implementations of some algorithms make use of the C-packages Ranlib and Meschach, both available via Netlib ( Please feel free to send me suggestions for improving the code.

You can also have a look at, which contains a library (fArma) with many fBm methods.

Code for the Conditionalized Random Midpoint Displacement (RMDmn) method

To compute the covariance matrix of RMD samples with general truncation parameters, you can use the file rmdcov.c. Again, the C-program can be used for dynamically loading into R. This is done in the file rmdcov.S. See the note below on the usage in R.
The code is written in the same style as the RMDmn algorithm by Ilkka Norros and Petteri Mannersalo, on which the program is based. As a consequence, the C-package Meschach ( is used.

How to use the files with R

As an example, suppose you would like to use the file rmdcov.c in R. Compile the code in the following way (assuming you have access to the gcc compiler):
gcc -I /path/to/meschach -c rmdcov.c
gcc -shared -fPIC -I /path/to/meschach -o rmdcov.o /path/to/meschach/meschach.a -lm
Now you are able to load the compiled code dynamically into R, see the sample file rmdcov.S.

Perl version

Walter Szeliga has modified the code to help it stand alone, and ported it to Perl. For more details, see the corresponding website at CPAN.


Some findings of the thesis are described in the paper ` On spectral simulation of fractional Brownian motion', coauthored by Michel Mandjes. The paper appeared in Probability in the Engineering and Informational Sciences, 17, p. 417-434, 2003.