Class SobolBrownianGenerator
The Sobol Brownian generator for market-model simulations: each path a Sobol sequence of the factors times the steps, turned into Gaussian variates by the inverse cumulative normal and Brownian-bridged by the base's ordering.
[WorkingType]
public sealed class SobolBrownianGenerator : SobolBrownianGeneratorBase
- Inheritance
-
SobolBrownianGenerator
- Inherited Members
Remarks
A working type. Its seed is explicit, in [1, 4294967295], as SobolRsg takes it: QuantLib's default 0 draws one from the clock.
Constructors
SobolBrownianGenerator(int, int, SobolBrownianGeneratorBaseOrdering, long, SobolRsgDirectionIntegers)
Initializes a new instance of the SobolBrownianGenerator class.
public SobolBrownianGenerator(int factors, int steps, SobolBrownianGeneratorBaseOrdering ordering, long seed, SobolRsgDirectionIntegers directionIntegers = SobolRsgDirectionIntegers.Jaeckel)
Parameters
factorsintThe number of factors each step draws, at least 1.
stepsintThe number of steps each path draws, at least 1.
orderingSobolBrownianGeneratorBaseOrderingHow the variates are assigned to the factors and steps.
seedlongThe Sobol sequence's seed, in [1, 4294967295].
directionIntegersSobolRsgDirectionIntegersThe Sobol sequence's direction integers.
Exceptions
- ArgumentOutOfRangeException
factorsorstepsis below 1, their product is outside the Sobol sequence's dimensions, orordering,seedordirectionIntegersis out of range.
Methods
NextSequence()
The next sequence of Gaussian variates, of the factors times the steps.
protected override Sample<ReadOnlyMemory<double>> NextSequence()
Returns
- Sample<ReadOnlyMemory<double>>
The sequence and its weight, a view valid until the next draw.