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

#include <squarerootclvmodel.hpp>

+ Inheritance diagram for SquareRootCLVModel:
+ Collaboration diagram for SquareRootCLVModel:

Classes

class  MappingFunction
 

Public Member Functions

 SquareRootCLVModel (const ext::shared_ptr< GeneralizedBlackScholesProcess > &bsProcess, ext::shared_ptr< SquareRootProcess > sqrtProcess, std::vector< Date > maturityDates, Size lagrangeOrder, Real pMax=Null< Real >(), Real pMin=Null< Real >())
 
Real cdf (const Date &d, Real x) const
 
Real invCDF (const Date &d, Real q) const
 
Array collocationPointsX (const Date &d) const
 
Array collocationPointsY (const Date &d) const
 
ext::function< Real(Time, Real)> g () 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 Member Functions

std::pair< Real, RealnonCentralChiSquaredParams (const Date &d) const
 

Private Attributes

const Real pMax_
 
const Real pMin_
 
const ext::shared_ptr< GeneralizedBlackScholesProcessbsProcess_
 
const ext::shared_ptr< SquareRootProcesssqrtProcess_
 
const std::vector< DatematurityDates_
 
const Size lagrangeOrder_
 
const ext::shared_ptr< GBSMRNDCalculatorrndCalculator_
 
ext::function< Real(Time, Real)> g_
 

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 41 of file squarerootclvmodel.hpp.

Constructor & Destructor Documentation

◆ SquareRootCLVModel()

SquareRootCLVModel ( const ext::shared_ptr< GeneralizedBlackScholesProcess > &  bsProcess,
ext::shared_ptr< SquareRootProcess sqrtProcess,
std::vector< Date maturityDates,
Size  lagrangeOrder,
Real  pMax = Null<Real>(),
Real  pMin = Null<Real>() 
)

Definition at line 36 of file squarerootclvmodel.cpp.

Member Function Documentation

◆ cdf()

Real cdf ( const Date d,
Real  x 
) const

Definition at line 47 of file squarerootclvmodel.cpp.

◆ invCDF()

Real invCDF ( const Date d,
Real  q 
) const

Definition at line 52 of file squarerootclvmodel.cpp.

+ Here is the caller graph for this function:

◆ collocationPointsX()

Array collocationPointsX ( const Date d) const

Definition at line 73 of file squarerootclvmodel.cpp.

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

◆ collocationPointsY()

Array collocationPointsY ( const Date d) const

Definition at line 104 of file squarerootclvmodel.cpp.

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

◆ g()

ext::function< Real(Time, Real)> g ( ) const

Definition at line 121 of file squarerootclvmodel.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 126 of file squarerootclvmodel.cpp.

◆ nonCentralChiSquaredParams()

std::pair< Real, Real > nonCentralChiSquaredParams ( const Date d) const
private

Definition at line 56 of file squarerootclvmodel.cpp.

+ Here is the caller graph for this function:

Member Data Documentation

◆ pMax_

const Real pMax_
private

Definition at line 85 of file squarerootclvmodel.hpp.

◆ pMin_

const Real pMin_
private

Definition at line 85 of file squarerootclvmodel.hpp.

◆ bsProcess_

const ext::shared_ptr<GeneralizedBlackScholesProcess> bsProcess_
private

Definition at line 86 of file squarerootclvmodel.hpp.

◆ sqrtProcess_

const ext::shared_ptr<SquareRootProcess> sqrtProcess_
private

Definition at line 87 of file squarerootclvmodel.hpp.

◆ maturityDates_

const std::vector<Date> maturityDates_
private

Definition at line 88 of file squarerootclvmodel.hpp.

◆ lagrangeOrder_

const Size lagrangeOrder_
private

Definition at line 89 of file squarerootclvmodel.hpp.

◆ rndCalculator_

const ext::shared_ptr<GBSMRNDCalculator> rndCalculator_
private

Definition at line 90 of file squarerootclvmodel.hpp.

◆ g_

ext::function<Real(Time, Real)> g_
mutableprivate

Definition at line 92 of file squarerootclvmodel.hpp.