Documentation of 'org.jquantlib.math.randomnumbers.SobolRsg' Java class
SobolRsg
org.jquantlib.math.randomnumbers

Class SobolRsg

  • All Implemented Interfaces:
    UniformRandomSequenceGenerator


    public class SobolRsg
    extends java.lang.Object
    implements UniformRandomSequenceGenerator
    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 from the book "Monte Carlo Methods in Finance" by Peter Jaeckel.

    21 200 primitive polynomials modulo two are provided in QuantLib. Jaeckel has calculated 8 129 334 polynomials: if you need that many dimensions you can replace the primitivepolynomials.c file included in QuantLib with the one provided in the CD of the "Monte Carlo Methods in Finance" book.

    The choice of initialization numbers (also know as free direction integers) is crucial for the homogeneity properties of the sequence. Sobol defines two homogeneity properties: Property A and Property A'.

    The unit initialization numbers suggested in "Numerical Recipes in C", 2nd edition, by Press, Teukolsky, Vetterling, and Flannery (section 7.7) fail the test for Property A even for low dimensions.

    Bratley and Fox published coefficients of the free direction integers up to dimension 40, crediting unpublished work of Sobol' and Levitan. See Bratley, P., Fox, B.L. (1988) "Algorithm 659: Implementing Sobol's quasirandom sequence generator," ACM Transactions on Mathematical Software 14:88-100. These values satisfy Property A for d<=20 and d = 23, 31, 33, 34, 37; Property A' holds for d<=6.

    Jaeckel provides in his book (section 8.3) initialization numbers up to dimension 32. Coefficients for d<=8 are the same as in Bradley-Fox, so Property A' holds for d<=6 but Property A holds for d<=32.

    The implementation of Lemieux, Cieslak, and Luttmer includes coefficients of the free direction integers up to dimension 360. Coefficients for d<=40 are the same as in Bradley-Fox. For dimension 40 For more info on Sobol' sequences see also "Monte Carlo Methods in Financial Engineering," by P. Glasserman, 2004, Springer, section 5.2.3

    • Constructor Summary

      Constructors 
      Constructor and Description
      SobolRsg(int dimensionality)
      dimensionality must be <= PPMT_MAX_DIM
      SobolRsg(int dimensionality, long seed) 
      SobolRsg(int dimensionality, long seed, SobolRsg.DirectionIntegers direction) 
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      int dimension() 
      Sample<double[]> lastSequence() 
      long[] nextInt32Sequence()
      Once JVM does not support unsigned fixed arithmetic, we use 64bit variables as containers for 32bit values in order to reduce the complexity and performance overhead of certain fixed arithmetic operations.
      Sample<double[]> nextSequence() 
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SobolRsg

        public SobolRsg(int dimensionality)
        dimensionality must be <= PPMT_MAX_DIM
      • SobolRsg

        public SobolRsg(int dimensionality,
                        long seed)

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.