CFL
Functions | Variables

Implementations of the operator of conditional expectation with respect to gaussian distribution. More...

Functions

GaussRollback binomial ()
 
GaussRollback crankNicolson (const Function &rVarStep)
 
GaussRollback crankNicolson (double dVarStepCoeff=c_dCrankNicolsonVarStepCoeff)
 
GaussRollback implicit (const Function &rVarStep)
 
GaussRollback implicit (double dVarStepCoeff=c_dImplicitVarStepCoeff)
 
GaussRollback improved (const GaussRollback &rFast=crankNicolson(), const Function &rUniformSteps=Function(c_iImprovedExplicitSteps), const Function &rImplicitSteps=Function(c_iImprovedImplicitSteps))
 
GaussRollback uniform ()
 

Variables

const double c_dCrankNicolsonVarStepCoeff = 0.1
 
const double c_dImplicitVarStepCoeff = 10.
 
const int c_iImprovedExplicitSteps = 30
 
const int c_iImprovedImplicitSteps = 10
 

Detailed Description

This namespace contains different implementations of the class GaussRollback.

See also
IGaussRollback and GaussRollback

Function Documentation

GaussRollback cfl::NGaussRollback::binomial ( )

Implements the operator of conditional expectation with respect to gaussian distribution by an explicit finite difference scheme. The scheme is constructed so that the center weight is as close to zero as possible.

Returns
Implemenation of GaussRollback by means of binomial explicit finite difference scheme.
GaussRollback cfl::NGaussRollback::crankNicolson ( const Function rVarStep)

Returns the implementation of the operator of conditional expectation with respect to gaussian distribution by means of the Crank and Nicolson finite difference scheme.

Parameters
rVarStepThis functions determines the number of steps in the scheme by the formula dVar/(rVarStep(dH), where dVar is the variance of distribution.
Returns
Implementation of GaussRollback by means of Crank-Nicolson scheme.
GaussRollback cfl::NGaussRollback::crankNicolson ( double  dVarStepCoeff = c_dCrankNicolsonVarStepCoeff)

Returns the implementation of the operator of conditional expectation with respect to gaussian distribution by means of the Crank and Nicolson finite difference scheme.

Parameters
dVarStepCoeffThis number determines the number of steps in the scheme by the formula dVar/(dVarStepCoeff*dH), where dVar is the variance of distribution and dH is the step on the grid.
Returns
Implementation of GaussRollback by means of Crank-Nicolson scheme.
GaussRollback cfl::NGaussRollback::implicit ( const Function rVarStep)

Implements the operator of conditional expectation with respect to gaussian distribution by an implicit finite difference scheme.

Parameters
rVarStepThis functions determines the number of steps in the scheme by the formula dVar/(rVarStep(dH), where dVar is the variance of distribution.
Returns
Implementation of GaussRollback by means of a implicit finite difference scheme.
GaussRollback cfl::NGaussRollback::implicit ( double  dVarStepCoeff = c_dImplicitVarStepCoeff)

Implements the operator of conditional expectation with respect to gaussian distribution by an implicit finite difference scheme.

Parameters
dVarStepCoeffThis number determines the number of steps in the scheme by the formula dVar/(dVarStepCoeff*dH*dH), where dVar is the variance of distribution and dH is the step on the grid.
Returns
Implementation of GaussRollback by means of a implicit finite difference scheme.
GaussRollback cfl::NGaussRollback::improved ( const GaussRollback rFast = crankNicolson(),
const Function rUniformSteps = Function(c_iImprovedExplicitSteps),
const Function rImplicitSteps = Function(c_iImprovedImplicitSteps) 
)

Returns the implementation of the operator of conditional expectation with respect to gaussian distribution by means of sequential application of three schemes. First, we use explicit scheme with equal weights. This scheme efficiently handles possible discontinuities of input functions. Second, we run some "fast" scheme (such as Crank and Nicolson). We finish with pure implicit scheme. This scheme cuts of random errors.

Parameters
rFastAn implementation of "fast" numerical scheme (such as Crank and Nicolson).
rUniformStepsThis function determines the number of steps in the explicit scheme with equal weights. The number of steps in the schema equals rUniformSteps(dH).
rImplicitStepsThis function determines the number of steps in the implicit scheme. The number of steps in the scheme equals rImplicitSteps(dH).
Returns
Implementation of GaussRollback by a sequence of a three "rollback" operations: start with uniform explicit for smoothness, proceed with some "fast" scheme and finish with a pure implicit scheme for extra stability.
GaussRollback cfl::NGaussRollback::uniform ( )

Implements the operator of conditional expectation with respect to gaussian distribution by an explicit finite difference scheme. The scheme is constructed so that all weights are almost equal to each other.

Returns
Implemenation of GaussRollback by means of uniform explicit finite difference scheme.

Variable Documentation

const double cfl::NGaussRollback::c_dCrankNicolsonVarStepCoeff = 0.1

Default value for the coefficient that determines the number of steps in the Crank and Nicolson scheme.

const double cfl::NGaussRollback::c_dImplicitVarStepCoeff = 10.

Default value for the coefficient that determines the number of steps in the implicit scheme.

const int cfl::NGaussRollback::c_iImprovedExplicitSteps = 30

Default value for the number of steps of uniform explicit scheme at the beginning of the "three-layer" implementation of the operator of conditional expectation for Gaussian distribution.

const int cfl::NGaussRollback::c_iImprovedImplicitSteps = 10

Default value for the number of steps of implicit scheme at the end of the "three-layer" implementation of the operator of conditional expectation for Gaussian distribution.