Fractional Brownian motion
In April 2002, I graduated from the Vrije Universiteit
My master's thesis is entitled
`Simulation of fractional Brownian motion', and
you can download a revised version
This version has been updated in September 2004, but the
version is still available.
Code for simulating fractional Brownian motion
I have programmed some algorithms for simulating fractional Brownian
The resulting C-programs are suited for dynamically loading into
should work as well),
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 www.rmetrics.org,
which contains a library (fSeries) with many fBm methods.
- The recursive method by Hosking (exact); hosking.h,
- The circulant method by Davis and Harte (exact);
- The Paxson method (approximate);
- The approximate circulant method (approximate); apprcirc.h,
- Wavelet-based simulation (approximate, theoretically
incorrect; see master's thesis);
Code for computing the covariance matrix of the Conditionalized
Random Midpoint Displacement (RMDmn) method
To compute the covariance matrix of RMD samples
with general truncation parameters, you can use the
Again, the C-program can be used for dynamically loading into
R. This is done in the file
See the note below on the usage in R.
The code is written in the same style as the
by Ilkka Norros and Petteri Mannersalo, on which the program is based.
As a consequence, the C-package Meschach
(www.netlib.org) is used.
How to use the files with R
As an example, suppose you would like to use the file
Compile the code in the following way (assuming you have access to the
gcc -I /path/to/meschach -c rmdcov.c
gcc -shared -fPIC -I /path/to/meschach -o rmdcov.so rmdcov.o
Now you are able to load the compiled code dynamically into R, see the
sample file rmdcov.S.
has modified the code to help it stand alone, and ported it to Perl.
For more details, see the
website at CPAN.
Some findings of the thesis are described in the paper
On spectral simulation of fractional Brownian motion',
by Michel Mandjes.
The paper appeared in Probability in the Engineering
and Informational Sciences, 17, p. 417-434, 2003.
Back to my