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

#include <squarerootandersen.hpp>

+ Inheritance diagram for SquareRootAndersen:
+ Collaboration diagram for SquareRootAndersen:

Public Member Functions

 SquareRootAndersen (Real meanLevel, Real reversionSpeed, Real volVar, Real v0, const std::vector< Real > &evolutionTimes, Size numberSubSteps_, Real w1, Real w2, Real cutPoint=1.5)
 
Size variatesPerStep () override
 
Size numberSteps () override
 
void nextPath () override
 
Real nextstep (const std::vector< Real > &variates) override
 
Real stepSd () const override
 
const std::vector< Real > & stateVariables () const override
 
Size numberStateVariables () const override
 
- Public Member Functions inherited from MarketModelVolProcess
 MarketModelVolProcess ()=default
 
virtual ~MarketModelVolProcess ()=default
 
virtual Size variatesPerStep ()=0
 
virtual Size numberSteps ()=0
 
virtual void nextPath ()=0
 
virtual Real nextstep (const std::vector< Real > &variates)=0
 
virtual Real stepSd () const =0
 
virtual const std::vector< Real > & stateVariables () const =0
 
virtual Size numberStateVariables () const =0
 

Private Member Functions

void DoOneSubStep (Real &v, Real variate, Size j)
 

Private Attributes

Real theta_
 
Real k_
 
Real epsilon_
 
Real v0_
 
Size numberSubSteps_
 
std::vector< Realdt_
 
std::vector< RealeMinuskDt_
 
Real w1_
 
Real w2_
 
Real PsiC_
 
Real v_
 evolving values More...
 
Size currentStep_
 
Size subStep_
 
std::vector< RealvPath_
 
std::vector< Realstate_
 

Detailed Description

Displaced diffusion LMM with uncorrelated vol process. Called "Shifted BGM" with Heston vol by Brace in "Engineering BGM." Vol process is an external input.

Definition at line 34 of file squarerootandersen.hpp.

Constructor & Destructor Documentation

◆ SquareRootAndersen()

SquareRootAndersen ( Real  meanLevel,
Real  reversionSpeed,
Real  volVar,
Real  v0,
const std::vector< Real > &  evolutionTimes,
Size  numberSubSteps_,
Real  w1,
Real  w2,
Real  cutPoint = 1.5 
)

Definition at line 27 of file squarerootandersen.cpp.

Member Function Documentation

◆ variatesPerStep()

Size variatesPerStep ( )
overridevirtual

Implements MarketModelVolProcess.

Definition at line 73 of file squarerootandersen.cpp.

◆ numberSteps()

Size numberSteps ( )
overridevirtual

Implements MarketModelVolProcess.

Definition at line 78 of file squarerootandersen.cpp.

◆ nextPath()

void nextPath ( )
overridevirtual

Implements MarketModelVolProcess.

Definition at line 83 of file squarerootandersen.cpp.

◆ nextstep()

Real nextstep ( const std::vector< Real > &  variates)
overridevirtual

Implements MarketModelVolProcess.

Definition at line 126 of file squarerootandersen.cpp.

+ Here is the call graph for this function:

◆ stepSd()

Real stepSd ( ) const
overridevirtual

Implements MarketModelVolProcess.

Definition at line 140 of file squarerootandersen.cpp.

◆ stateVariables()

const std::vector< Real > & stateVariables ( ) const
overridevirtual

Implements MarketModelVolProcess.

Definition at line 153 of file squarerootandersen.cpp.

◆ numberStateVariables()

Size numberStateVariables ( ) const
overridevirtual

Implements MarketModelVolProcess.

Definition at line 159 of file squarerootandersen.cpp.

◆ DoOneSubStep()

void DoOneSubStep ( Real v,
Real  variate,
Size  j 
)
private

Definition at line 91 of file squarerootandersen.cpp.

+ Here is the caller graph for this function:

Member Data Documentation

◆ theta_

Real theta_
private

Definition at line 61 of file squarerootandersen.hpp.

◆ k_

Real k_
private

Definition at line 63 of file squarerootandersen.hpp.

◆ epsilon_

Real epsilon_
private

Definition at line 64 of file squarerootandersen.hpp.

◆ v0_

Real v0_
private

Definition at line 66 of file squarerootandersen.hpp.

◆ numberSubSteps_

Size numberSubSteps_
private

Definition at line 67 of file squarerootandersen.hpp.

◆ dt_

std::vector<Real> dt_
private

Definition at line 70 of file squarerootandersen.hpp.

◆ eMinuskDt_

std::vector<Real> eMinuskDt_
private

Definition at line 71 of file squarerootandersen.hpp.

◆ w1_

Real w1_
private

Definition at line 73 of file squarerootandersen.hpp.

◆ w2_

Real w2_
private

Definition at line 74 of file squarerootandersen.hpp.

◆ PsiC_

Real PsiC_
private

Definition at line 75 of file squarerootandersen.hpp.

◆ v_

Real v_
private

evolving values

Definition at line 78 of file squarerootandersen.hpp.

◆ currentStep_

Size currentStep_
private

Definition at line 79 of file squarerootandersen.hpp.

◆ subStep_

Size subStep_
private

Definition at line 80 of file squarerootandersen.hpp.

◆ vPath_

std::vector<Real> vPath_
private

Definition at line 81 of file squarerootandersen.hpp.

◆ state_

std::vector<Real> state_
mutableprivate

Definition at line 83 of file squarerootandersen.hpp.