QuantLib: a free/open-source library for quantitative finance
Fully annotated sources - version 1.32
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Private Attributes | List of all members
SobolBrownianGenerator Class Reference

Sobol Brownian generator for market-model simulations. More...

#include <ql/models/marketmodels/browniangenerators/sobolbrowniangenerator.hpp>

+ Inheritance diagram for SobolBrownianGenerator:
+ Collaboration diagram for SobolBrownianGenerator:

Public Types

enum  Ordering { Factors , Steps , Diagonal }
 

Public Member Functions

 SobolBrownianGenerator (Size factors, Size steps, Ordering ordering, unsigned long seed=0, SobolRsg::DirectionIntegers directionIntegers=SobolRsg::Jaeckel)
 
Real nextPath () override
 
Real nextStep (std::vector< Real > &) override
 
Size numberOfFactors () const override
 
Size numberOfSteps () const override
 
const std::vector< std::vector< Size > > & orderedIndices () const
 
std::vector< std::vector< Real > > transform (const std::vector< std::vector< Real > > &variates)
 
- Public Member Functions inherited from BrownianGenerator
virtual ~BrownianGenerator ()=default
 
virtual Real nextStep (std::vector< Real > &)=0
 
virtual Real nextPath ()=0
 
virtual Size numberOfFactors () const =0
 
virtual Size numberOfSteps () const =0
 

Private Attributes

Size factors_
 
Size steps_
 
Ordering ordering_
 
InverseCumulativeRsg< SobolRsg, InverseCumulativeNormalgenerator_
 
BrownianBridge bridge_
 
Size lastStep_ = 0
 
std::vector< std::vector< Size > > orderedIndices_
 
std::vector< std::vector< Real > > bridgedVariates_
 

Detailed Description

Sobol Brownian generator for market-model simulations.

Incremental Brownian generator using a Sobol generator, inverse-cumulative Gaussian method, and Brownian bridging.

Definition at line 37 of file sobolbrowniangenerator.hpp.

Member Enumeration Documentation

◆ Ordering

enum Ordering
Enumerator
Factors 

The variates with the best quality will be used for the evolution of the first factor.

Steps 

The variates with the best quality will be used for the largest steps of all factors.

Diagonal 

A diagonal schema will be used to assign the variates with the best quality to the most important factors and the largest steps.

Definition at line 39 of file sobolbrowniangenerator.hpp.

Constructor & Destructor Documentation

◆ SobolBrownianGenerator()

SobolBrownianGenerator ( Size  factors,
Size  steps,
Ordering  ordering,
unsigned long  seed = 0,
SobolRsg::DirectionIntegers  directionIntegers = SobolRsg::Jaeckel 
)

Definition at line 110 of file sobolbrowniangenerator.cpp.

Member Function Documentation

◆ nextPath()

Real nextPath ( )
overridevirtual

Implements BrownianGenerator.

Definition at line 136 of file sobolbrowniangenerator.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ nextStep()

Real nextStep ( std::vector< Real > &  output)
overridevirtual

Implements BrownianGenerator.

Definition at line 193 of file sobolbrowniangenerator.cpp.

+ Here is the caller graph for this function:

◆ numberOfFactors()

Size numberOfFactors ( ) const
overridevirtual

Implements BrownianGenerator.

Definition at line 204 of file sobolbrowniangenerator.cpp.

◆ numberOfSteps()

Size numberOfSteps ( ) const
overridevirtual

Implements BrownianGenerator.

Definition at line 206 of file sobolbrowniangenerator.cpp.

◆ orderedIndices()

const std::vector< std::vector< Size > > & orderedIndices ( ) const

Definition at line 158 of file sobolbrowniangenerator.cpp.

◆ transform()

std::vector< std::vector< Real > > transform ( const std::vector< std::vector< Real > > &  variates)

Definition at line 162 of file sobolbrowniangenerator.cpp.

+ Here is the call graph for this function:

Member Data Documentation

◆ factors_

Size factors_
private

Definition at line 69 of file sobolbrowniangenerator.hpp.

◆ steps_

Size steps_
private

Definition at line 69 of file sobolbrowniangenerator.hpp.

◆ ordering_

Ordering ordering_
private

Definition at line 70 of file sobolbrowniangenerator.hpp.

◆ generator_

Definition at line 71 of file sobolbrowniangenerator.hpp.

◆ bridge_

BrownianBridge bridge_
private

Definition at line 72 of file sobolbrowniangenerator.hpp.

◆ lastStep_

Size lastStep_ = 0
private

Definition at line 74 of file sobolbrowniangenerator.hpp.

◆ orderedIndices_

std::vector<std::vector<Size> > orderedIndices_
private

Definition at line 75 of file sobolbrowniangenerator.hpp.

◆ bridgedVariates_

std::vector<std::vector<Real> > bridgedVariates_
private

Definition at line 76 of file sobolbrowniangenerator.hpp.