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 | Protected Attributes | List of all members
AmericanBasketPathPricer Class Reference

#include <mcamericanbasketengine.hpp>

+ Inheritance diagram for AmericanBasketPathPricer:
+ Collaboration diagram for AmericanBasketPathPricer:

Public Member Functions

 AmericanBasketPathPricer (Size assetNumber, ext::shared_ptr< Payoff > payoff, Size polynomialOrder=2, LsmBasisSystem::PolynomialType polynomialType=LsmBasisSystem::Monomial)
 
Array state (const MultiPath &path, Size t) const override
 
Real operator() (const MultiPath &path, Size t) const override
 
std::vector< ext::function< Real(Array)> > basisSystem () const override
 
- Public Member Functions inherited from EarlyExercisePathPricer< MultiPath >
virtual ~EarlyExercisePathPricer ()=default
 
virtual Real operator() (const MultiPath &path, Size t) const=0
 
virtual StateType state (const MultiPath &path, Size t) const=0
 
virtual std::vector< ext::function< Real(StateType)> > basisSystem () const=0
 

Protected Member Functions

Real payoff (const Array &state) const
 

Protected Attributes

const Size assetNumber_
 
const ext::shared_ptr< Payoffpayoff_
 
Real scalingValue_ = 1.0
 
std::vector< ext::function< Real(Array)> > v_
 

Additional Inherited Members

- Public Types inherited from EarlyExercisePathPricer< MultiPath >
typedef EarlyExerciseTraits< MultiPath >::StateType StateType
 

Detailed Description

Definition at line 104 of file mcamericanbasketengine.hpp.

Constructor & Destructor Documentation

◆ AmericanBasketPathPricer()

AmericanBasketPathPricer ( Size  assetNumber,
ext::shared_ptr< Payoff payoff,
Size  polynomialOrder = 2,
LsmBasisSystem::PolynomialType  polynomialType = LsmBasisSystem::Monomial 
)

Definition at line 27 of file mcamericanbasketengine.cpp.

+ Here is the call graph for this function:

Member Function Documentation

◆ state()

Array state ( const MultiPath path,
Size  t 
) const
overridevirtual

Implements EarlyExercisePathPricer< MultiPath >.

Definition at line 55 of file mcamericanbasketengine.cpp.

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

◆ operator()()

Real operator() ( const MultiPath path,
Size  t 
) const
overridevirtual

Implements EarlyExercisePathPricer< MultiPath >.

Definition at line 76 of file mcamericanbasketengine.cpp.

+ Here is the call graph for this function:

◆ basisSystem()

std::vector< ext::function< Real(Array)> > basisSystem ( ) const
overridevirtual

Implements EarlyExercisePathPricer< MultiPath >.

Definition at line 82 of file mcamericanbasketengine.cpp.

◆ payoff()

Real payoff ( const Array state) const
protected

Definition at line 67 of file mcamericanbasketengine.cpp.

+ Here is the call graph for this function:

Member Data Documentation

◆ assetNumber_

const Size assetNumber_
protected

Definition at line 121 of file mcamericanbasketengine.hpp.

◆ payoff_

const ext::shared_ptr<Payoff> payoff_
protected

Definition at line 122 of file mcamericanbasketengine.hpp.

◆ scalingValue_

Real scalingValue_ = 1.0
protected

Definition at line 124 of file mcamericanbasketengine.hpp.

◆ v_

std::vector<ext::function<Real(Array)> > v_
protected

Definition at line 125 of file mcamericanbasketengine.hpp.