SobolRsg Class Reference

#include <ql/RandomNumbers/sobolrsg.hpp>

List of all members.


Detailed Description

Sobol low-discrepancy sequence generator.

A Gray code counter and bitwise operations are used for very fast sequence generation.

The implementation relies on primitive polynomials modulo two and initialization numbers from the book "Monte Carlo Methods in Finance" by Peter Jäckel.

21200 primitive polynomials modulo two are provided by default. There are 8 129 334 polynomials as provided by Jäckel which can be downloaded from quantlib.org. If you need that many dimensions you must replace the primitivepolynomial.* files with the ones downloaded and recompile the library.

The choice of initialization numbers is crucial for the homogeneity properties of the sequence. Jäckel's initialization numbers are superior to the "unit initialization" suggested in "Numerical Recipes in C" by Press, Teukolsky, Vetterling, and Flannery.

For more info on Sobol sequences see "Monte Carlo Methods in Finance", by Peter Jäckel, section 8.3 and "Numerical Recipes in C", 2nd edition, by Press, Teukolsky, Vetterling, and Flannery, section 7.7.


Public Types

typedef Sample< Arraysample_type

Public Member Functions

 SobolRsg (Size dimensionality, unsigned long seed=0, bool unitInitialization=false)
const sample_typenextSequence () const
const sample_typelastSequence () const
Size dimension () const


QuantLib.org
QuantLib
Hosted by
SourceForge.net Logo
Documentation generated by
doxygen