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
Fdm2dBlackScholesSolver Class Reference

#include <fdm2dblackscholessolver.hpp>

+ Inheritance diagram for Fdm2dBlackScholesSolver:
+ Collaboration diagram for Fdm2dBlackScholesSolver:

Public Member Functions

 Fdm2dBlackScholesSolver (Handle< GeneralizedBlackScholesProcess > p1, Handle< GeneralizedBlackScholesProcess > p2, Real correlation, FdmSolverDesc solverDesc, const FdmSchemeDesc &schemeDesc=FdmSchemeDesc::Hundsdorfer(), bool localVol=false, Real illegalLocalVolOverwrite=-Null< Real >())
 
Real valueAt (Real x, Real y) const
 
Real thetaAt (Real x, Real y) const
 
Real deltaXat (Real x, Real y) const
 
Real deltaYat (Real x, Real y) const
 
Real gammaXat (Real x, Real y) const
 
Real gammaYat (Real x, Real y) const
 
Real gammaXYat (Real x, Real y) 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< GeneralizedBlackScholesProcessp1_
 
const Handle< GeneralizedBlackScholesProcessp2_
 
const Real correlation_
 
const FdmSolverDesc solverDesc_
 
const FdmSchemeDesc schemeDesc_
 
const bool localVol_
 
const Real illegalLocalVolOverwrite_
 
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 36 of file fdm2dblackscholessolver.hpp.

Constructor & Destructor Documentation

◆ Fdm2dBlackScholesSolver()

Fdm2dBlackScholesSolver ( Handle< GeneralizedBlackScholesProcess p1,
Handle< GeneralizedBlackScholesProcess p2,
Real  correlation,
FdmSolverDesc  solverDesc,
const FdmSchemeDesc schemeDesc = FdmSchemeDesc::Hundsdorfer(),
bool  localVol = false,
Real  illegalLocalVolOverwrite = -Null<Real>() 
)

Definition at line 28 of file fdm2dblackscholessolver.cpp.

+ Here is the call graph for this function:

Member Function Documentation

◆ valueAt()

Real valueAt ( Real  x,
Real  y 
) const

Definition at line 58 of file fdm2dblackscholessolver.cpp.

+ Here is the call graph for this function:

◆ thetaAt()

Real thetaAt ( Real  x,
Real  y 
) const

Definition at line 66 of file fdm2dblackscholessolver.cpp.

+ Here is the call graph for this function:

◆ deltaXat()

Real deltaXat ( Real  x,
Real  y 
) const

Definition at line 74 of file fdm2dblackscholessolver.cpp.

+ Here is the call graph for this function:

◆ deltaYat()

Real deltaYat ( Real  x,
Real  y 
) const

Definition at line 83 of file fdm2dblackscholessolver.cpp.

+ Here is the call graph for this function:

◆ gammaXat()

Real gammaXat ( Real  x,
Real  y 
) const

Definition at line 92 of file fdm2dblackscholessolver.cpp.

+ Here is the call graph for this function:

◆ gammaYat()

Real gammaYat ( Real  x,
Real  y 
) const

Definition at line 102 of file fdm2dblackscholessolver.cpp.

+ Here is the call graph for this function:

◆ gammaXYat()

Real gammaXYat ( Real  x,
Real  y 
) const

Definition at line 112 of file fdm2dblackscholessolver.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 44 of file fdm2dblackscholessolver.cpp.

Member Data Documentation

◆ p1_

Definition at line 59 of file fdm2dblackscholessolver.hpp.

◆ p2_

Definition at line 60 of file fdm2dblackscholessolver.hpp.

◆ correlation_

const Real correlation_
private

Definition at line 61 of file fdm2dblackscholessolver.hpp.

◆ solverDesc_

const FdmSolverDesc solverDesc_
private

Definition at line 62 of file fdm2dblackscholessolver.hpp.

◆ schemeDesc_

const FdmSchemeDesc schemeDesc_
private

Definition at line 63 of file fdm2dblackscholessolver.hpp.

◆ localVol_

const bool localVol_
private

Definition at line 64 of file fdm2dblackscholessolver.hpp.

◆ illegalLocalVolOverwrite_

const Real illegalLocalVolOverwrite_
private

Definition at line 65 of file fdm2dblackscholessolver.hpp.

◆ solver_

ext::shared_ptr<Fdm2DimSolver> solver_
mutableprivate

Definition at line 67 of file fdm2dblackscholessolver.hpp.