QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Protected Member Functions | Private Attributes | List of all members
SobolBrownianGeneratorBase Class Referenceabstract

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

#include <sobolbrowniangenerator.hpp>

+ Inheritance diagram for SobolBrownianGeneratorBase:
+ Collaboration diagram for SobolBrownianGeneratorBase:

Public Types

enum  Ordering { Factors , Steps , Diagonal }
 

Public Member Functions

 SobolBrownianGeneratorBase (Size factors, Size steps, Ordering ordering)
 
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
 

Protected Member Functions

virtual const SobolRsg::sample_typenextSequence ()=0
 

Private Attributes

Size factors_
 
Size steps_
 
Ordering ordering_
 
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 38 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 40 of file sobolbrowniangenerator.hpp.

Constructor & Destructor Documentation

◆ SobolBrownianGeneratorBase()

SobolBrownianGeneratorBase ( Size  factors,
Size  steps,
Ordering  ordering 
)

Definition at line 110 of file sobolbrowniangenerator.cpp.

Member Function Documentation

◆ nextPath()

Real nextPath ( )
overridevirtual

Implements BrownianGenerator.

Definition at line 133 of file sobolbrowniangenerator.cpp.

+ Here is the call graph for this function:

◆ nextStep()

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

Implements BrownianGenerator.

Definition at line 186 of file sobolbrowniangenerator.cpp.

◆ numberOfFactors()

Size numberOfFactors ( ) const
overridevirtual

Implements BrownianGenerator.

Definition at line 197 of file sobolbrowniangenerator.cpp.

+ Here is the caller graph for this function:

◆ numberOfSteps()

Size numberOfSteps ( ) const
overridevirtual

Implements BrownianGenerator.

Definition at line 199 of file sobolbrowniangenerator.cpp.

+ Here is the caller graph for this function:

◆ orderedIndices()

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

Definition at line 151 of file sobolbrowniangenerator.cpp.

◆ transform()

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

Definition at line 155 of file sobolbrowniangenerator.cpp.

+ Here is the call graph for this function:

◆ nextSequence()

virtual const SobolRsg::sample_type & nextSequence ( )
protectedpure virtual

Implemented in SobolBrownianGenerator, and Burley2020SobolBrownianGenerator.

+ Here is the caller graph for this function:

Member Data Documentation

◆ factors_

Size factors_
private

Definition at line 70 of file sobolbrowniangenerator.hpp.

◆ steps_

Size steps_
private

Definition at line 70 of file sobolbrowniangenerator.hpp.

◆ ordering_

Ordering ordering_
private

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.