QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
|
Longstaff-Schwarz path pricer for early exercise options. More...
#include <longstaffschwartzmultipathpricer.hpp>
Classes | |
struct | PathInfo |
Public Member Functions | |
LongstaffSchwartzMultiPathPricer (const ext::shared_ptr< PathPayoff > &payoff, const std::vector< Size > &timePositions, std::vector< Handle< YieldTermStructure > > forwardTermStructure, Array discounts, Size polynomialOrder, LsmBasisSystem::PolynomialType polynomialType) | |
Real | operator() (const MultiPath &multiPath) const override |
virtual void | calibrate () |
Public Member Functions inherited from PathPricer< MultiPath > | |
virtual | ~PathPricer ()=default |
virtual Real | operator() (const MultiPath &path) const=0 |
Protected Member Functions | |
PathInfo | transformPath (const MultiPath &path) const |
Protected Attributes | |
bool | calibrationPhase_ = true |
const ext::shared_ptr< PathPayoff > | payoff_ |
std::unique_ptr< Array[]> | coeff_ |
std::unique_ptr< Real[]> | lowerBounds_ |
const std::vector< Size > | timePositions_ |
const std::vector< Handle< YieldTermStructure > > | forwardTermStructures_ |
const Array | dF_ |
std::vector< PathInfo > | paths_ |
const std::vector< ext::function< Real(Array)> > | v_ |
Additional Inherited Members | |
Public Types inherited from PathPricer< MultiPath > | |
typedef Real | result_type |
Longstaff-Schwarz path pricer for early exercise options.
References:
Francis Longstaff, Eduardo Schwartz, 2001. Valuing American Options by Simulation: A Simple Least-Squares Approach, The Review of Financial Studies, Volume 14, No. 1, 113-147
Definition at line 45 of file longstaffschwartzmultipathpricer.hpp.
LongstaffSchwartzMultiPathPricer | ( | const ext::shared_ptr< PathPayoff > & | payoff, |
const std::vector< Size > & | timePositions, | ||
std::vector< Handle< YieldTermStructure > > | forwardTermStructure, | ||
Array | discounts, | ||
Size | polynomialOrder, | ||
LsmBasisSystem::PolynomialType | polynomialType | ||
) |
Definition at line 38 of file longstaffschwartzmultipathpricer.cpp.
Implements PathPricer< MultiPath >.
Definition at line 82 of file longstaffschwartzmultipathpricer.cpp.
|
virtual |
Definition at line 155 of file longstaffschwartzmultipathpricer.cpp.
|
protected |
Definition at line 62 of file longstaffschwartzmultipathpricer.cpp.
|
protected |
Definition at line 70 of file longstaffschwartzmultipathpricer.hpp.
|
protected |
Definition at line 72 of file longstaffschwartzmultipathpricer.hpp.
|
protected |
Definition at line 74 of file longstaffschwartzmultipathpricer.hpp.
|
protected |
Definition at line 75 of file longstaffschwartzmultipathpricer.hpp.
|
protected |
Definition at line 77 of file longstaffschwartzmultipathpricer.hpp.
|
protected |
Definition at line 78 of file longstaffschwartzmultipathpricer.hpp.
|
protected |
Definition at line 79 of file longstaffschwartzmultipathpricer.hpp.
|
mutableprotected |
Definition at line 81 of file longstaffschwartzmultipathpricer.hpp.
Definition at line 82 of file longstaffschwartzmultipathpricer.hpp.