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

#include <fdmblackscholesop.hpp>

+ Inheritance diagram for FdmBlackScholesOp:
+ Collaboration diagram for FdmBlackScholesOp:

Public Member Functions

 FdmBlackScholesOp (const ext::shared_ptr< FdmMesher > &mesher, const ext::shared_ptr< GeneralizedBlackScholesProcess > &process, Real strike, bool localVol=false, Real illegalLocalVolOverwrite=-Null< Real >(), Size direction=0, ext::shared_ptr< FdmQuantoHelper > quantoHelper=ext::shared_ptr< FdmQuantoHelper >())
 
Size size () const override
 
void setTime (Time t1, Time t2) override
 Time \(t1 <= t2\) is required. More...
 
Array apply (const Array &r) const override
 
Array apply_mixed (const Array &r) const override
 
Array apply_direction (Size direction, const Array &r) const override
 
Array solve_splitting (Size direction, const Array &r, Real s) const override
 
Array preconditioner (const Array &r, Real s) const override
 
std::vector< SparseMatrixtoMatrixDecomp () const override
 
- Public Member Functions inherited from FdmLinearOpComposite
virtual Size size () const =0
 
virtual void setTime (Time t1, Time t2)=0
 Time \(t1 <= t2\) is required. More...
 
virtual Array apply_mixed (const Array &r) const =0
 
virtual Array apply_direction (Size direction, const Array &r) const =0
 
virtual Array solve_splitting (Size direction, const Array &r, Real s) const =0
 
virtual Array preconditioner (const Array &r, Real s) const =0
 
virtual std::vector< SparseMatrixtoMatrixDecomp () const
 
SparseMatrix toMatrix () const override
 
- Public Member Functions inherited from FdmLinearOp
virtual ~FdmLinearOp ()=default
 
virtual array_type apply (const array_type &r) const =0
 
virtual SparseMatrix toMatrix () const =0
 

Private Attributes

const ext::shared_ptr< FdmMeshermesher_
 
const ext::shared_ptr< YieldTermStructurerTS_
 
const ext::shared_ptr< YieldTermStructureqTS_
 
const ext::shared_ptr< BlackVolTermStructurevolTS_
 
const ext::shared_ptr< LocalVolTermStructurelocalVol_
 
const Array x_
 
const FirstDerivativeOp dxMap_
 
const TripleBandLinearOp dxxMap_
 
TripleBandLinearOp mapT_
 
const Real strike_
 
const Real illegalLocalVolOverwrite_
 
const Size direction_
 
const ext::shared_ptr< FdmQuantoHelperquantoHelper_
 

Additional Inherited Members

- Public Types inherited from FdmLinearOp
typedef Array array_type
 

Detailed Description

Definition at line 38 of file fdmblackscholesop.hpp.

Constructor & Destructor Documentation

◆ FdmBlackScholesOp()

FdmBlackScholesOp ( const ext::shared_ptr< FdmMesher > &  mesher,
const ext::shared_ptr< GeneralizedBlackScholesProcess > &  process,
Real  strike,
bool  localVol = false,
Real  illegalLocalVolOverwrite = -Null<Real>(),
Size  direction = 0,
ext::shared_ptr< FdmQuantoHelper quantoHelper = ext::shared_ptr<FdmQuantoHelper>() 
)

Definition at line 32 of file fdmblackscholesop.cpp.

Member Function Documentation

◆ size()

Size size ( ) const
overridevirtual

Implements FdmLinearOpComposite.

Definition at line 100 of file fdmblackscholesop.cpp.

◆ setTime()

void setTime ( Time  t1,
Time  t2 
)
overridevirtual

Time \(t1 <= t2\) is required.

Implements FdmLinearOpComposite.

Definition at line 51 of file fdmblackscholesop.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ apply()

Array apply ( const Array r) const
overridevirtual

Implements FdmLinearOp.

Definition at line 102 of file fdmblackscholesop.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ apply_mixed()

Array apply_mixed ( const Array r) const
overridevirtual

Implements FdmLinearOpComposite.

Definition at line 115 of file fdmblackscholesop.cpp.

◆ apply_direction()

Array apply_direction ( Size  direction,
const Array r 
) const
overridevirtual

Implements FdmLinearOpComposite.

Definition at line 106 of file fdmblackscholesop.cpp.

+ Here is the call graph for this function:

◆ solve_splitting()

Array solve_splitting ( Size  direction,
const Array r,
Real  s 
) const
overridevirtual

Implements FdmLinearOpComposite.

Definition at line 119 of file fdmblackscholesop.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ preconditioner()

Array preconditioner ( const Array r,
Real  s 
) const
overridevirtual

Implements FdmLinearOpComposite.

Definition at line 128 of file fdmblackscholesop.cpp.

+ Here is the call graph for this function:

◆ toMatrixDecomp()

std::vector< SparseMatrix > toMatrixDecomp ( ) const
overridevirtual

Reimplemented from FdmLinearOpComposite.

Definition at line 133 of file fdmblackscholesop.cpp.

+ Here is the call graph for this function:

Member Data Documentation

◆ mesher_

const ext::shared_ptr<FdmMesher> mesher_
private

Definition at line 61 of file fdmblackscholesop.hpp.

◆ rTS_

const ext::shared_ptr<YieldTermStructure> rTS_
private

Definition at line 62 of file fdmblackscholesop.hpp.

◆ qTS_

const ext::shared_ptr<YieldTermStructure> qTS_
private

Definition at line 62 of file fdmblackscholesop.hpp.

◆ volTS_

const ext::shared_ptr<BlackVolTermStructure> volTS_
private

Definition at line 63 of file fdmblackscholesop.hpp.

◆ localVol_

const ext::shared_ptr<LocalVolTermStructure> localVol_
private

Definition at line 64 of file fdmblackscholesop.hpp.

◆ x_

const Array x_
private

Definition at line 65 of file fdmblackscholesop.hpp.

◆ dxMap_

const FirstDerivativeOp dxMap_
private

Definition at line 66 of file fdmblackscholesop.hpp.

◆ dxxMap_

const TripleBandLinearOp dxxMap_
private

Definition at line 67 of file fdmblackscholesop.hpp.

◆ mapT_

TripleBandLinearOp mapT_
private

Definition at line 68 of file fdmblackscholesop.hpp.

◆ strike_

const Real strike_
private

Definition at line 69 of file fdmblackscholesop.hpp.

◆ illegalLocalVolOverwrite_

const Real illegalLocalVolOverwrite_
private

Definition at line 70 of file fdmblackscholesop.hpp.

◆ direction_

const Size direction_
private

Definition at line 71 of file fdmblackscholesop.hpp.

◆ quantoHelper_

const ext::shared_ptr<FdmQuantoHelper> quantoHelper_
private

Definition at line 72 of file fdmblackscholesop.hpp.