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

#include <fdmcirsolver.hpp>

+ Inheritance diagram for FdmCIRSolver:
+ Collaboration diagram for FdmCIRSolver:

Public Member Functions

 FdmCIRSolver (Handle< CoxIngersollRossProcess > process, Handle< GeneralizedBlackScholesProcess > bsProcess, FdmSolverDesc solverDesc, const FdmSchemeDesc &schemeDesc=FdmSchemeDesc::Hundsdorfer(), Real rho=1.0, Real strike=1.0)
 
Real valueAt (Real s, Real v) const
 
Real deltaAt (Real s, Real v) const
 
Real gammaAt (Real s, Real v) const
 
Real thetaAt (Real s, Real v) const
 
- Public Member Functions inherited from LazyObject
 LazyObject ()
 
 ~LazyObject () override=default
 
void update () override
 
bool isCalculated () const
 
void forwardFirstNotificationOnly ()
 
void alwaysForwardNotifications ()
 
void recalculate ()
 
void freeze ()
 
void unfreeze ()
 
- Public Member Functions inherited from Observable
 Observable ()
 
 Observable (const Observable &)
 
Observableoperator= (const Observable &)
 
 Observable (Observable &&)=delete
 
Observableoperator= (Observable &&)=delete
 
virtual ~Observable ()=default
 
void notifyObservers ()
 
- Public Member Functions inherited from Observer
 Observer ()=default
 
 Observer (const Observer &)
 
Observeroperator= (const Observer &)
 
virtual ~Observer ()
 
std::pair< iterator, boolregisterWith (const ext::shared_ptr< Observable > &)
 
void registerWithObservables (const ext::shared_ptr< Observer > &)
 
Size unregisterWith (const ext::shared_ptr< Observable > &)
 
void unregisterWithAll ()
 
virtual void update ()=0
 
virtual void deepUpdate ()
 

Protected Member Functions

void performCalculations () const override
 
- Protected Member Functions inherited from LazyObject
virtual void calculate () const
 

Private Attributes

const Handle< GeneralizedBlackScholesProcessbsProcess_
 
const Handle< CoxIngersollRossProcesscirProcess_
 
const FdmSolverDesc solverDesc_
 
const FdmSchemeDesc schemeDesc_
 
const Real rho_
 
const Real strike_
 
ext::shared_ptr< Fdm2DimSolversolver_
 

Additional Inherited Members

- Public Types inherited from Observer
typedef set_type::iterator iterator
 
- Protected Attributes inherited from LazyObject
bool calculated_ = false
 
bool frozen_ = false
 
bool alwaysForward_
 

Detailed Description

Definition at line 42 of file fdmcirsolver.hpp.

Constructor & Destructor Documentation

◆ FdmCIRSolver()

FdmCIRSolver ( Handle< CoxIngersollRossProcess process,
Handle< GeneralizedBlackScholesProcess bsProcess,
FdmSolverDesc  solverDesc,
const FdmSchemeDesc schemeDesc = FdmSchemeDesc::Hundsdorfer(),
Real  rho = 1.0,
Real  strike = 1.0 
)

Definition at line 28 of file fdmcirsolver.cpp.

+ Here is the call graph for this function:

Member Function Documentation

◆ valueAt()

Real valueAt ( Real  s,
Real  v 
) const

Definition at line 52 of file fdmcirsolver.cpp.

+ Here is the call graph for this function:

◆ deltaAt()

Real deltaAt ( Real  s,
Real  v 
) const

Definition at line 57 of file fdmcirsolver.cpp.

+ Here is the call graph for this function:

◆ gammaAt()

Real gammaAt ( Real  s,
Real  v 
) const

Definition at line 62 of file fdmcirsolver.cpp.

+ Here is the call graph for this function:

◆ thetaAt()

Real thetaAt ( Real  s,
Real  v 
) const

Definition at line 68 of file fdmcirsolver.cpp.

+ Here is the call graph for this function:

◆ performCalculations()

void performCalculations ( ) const
overrideprotectedvirtual

This method must implement any calculations which must be (re)done in order to calculate the desired results.

Implements LazyObject.

Definition at line 40 of file fdmcirsolver.cpp.

Member Data Documentation

◆ bsProcess_

const Handle<GeneralizedBlackScholesProcess> bsProcess_
private

Definition at line 60 of file fdmcirsolver.hpp.

◆ cirProcess_

const Handle<CoxIngersollRossProcess> cirProcess_
private

Definition at line 61 of file fdmcirsolver.hpp.

◆ solverDesc_

const FdmSolverDesc solverDesc_
private

Definition at line 62 of file fdmcirsolver.hpp.

◆ schemeDesc_

const FdmSchemeDesc schemeDesc_
private

Definition at line 63 of file fdmcirsolver.hpp.

◆ rho_

const Real rho_
private

Definition at line 64 of file fdmcirsolver.hpp.

◆ strike_

const Real strike_
private

Definition at line 65 of file fdmcirsolver.hpp.

◆ solver_

ext::shared_ptr<Fdm2DimSolver> solver_
mutableprivate

Definition at line 67 of file fdmcirsolver.hpp.