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

Pricing engine for basket option on multiple underlyings. More...

#include <choibasketengine.hpp>

+ Inheritance diagram for ChoiBasketEngine:
+ Collaboration diagram for ChoiBasketEngine:

Public Member Functions

 ChoiBasketEngine (std::vector< ext::shared_ptr< GeneralizedBlackScholesProcess > > processes, Matrix rho, Real lambda=10.0, Size maxNrIntegrationSteps=std::numeric_limits< Size >::max(), bool calcfwdDelta=false, bool controlVariate=false)
 
void calculate () const override
 
- Public Member Functions inherited from GenericEngine< BasketOption::arguments, BasketOption::results >
PricingEngine::argumentsgetArguments () const override
 
const PricingEngine::resultsgetResults () const override
 
void reset () override
 
void update () override
 
- Public Member Functions inherited from PricingEngine
 ~PricingEngine () override=default
 
virtual argumentsgetArguments () const =0
 
virtual const resultsgetResults () const =0
 
virtual void reset ()=0
 
virtual void calculate () const =0
 
- Public Member Functions inherited from Observable
 Observable ()=default
 
 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 ()
 

Private Attributes

const Size n_
 
const std::vector< ext::shared_ptr< GeneralizedBlackScholesProcess > > processes_
 
const Matrix rho_
 
const Real lambda_
 
const Size maxNrIntegrationSteps_
 
const bool calcFwdDelta_
 
const bool controlVariate_
 

Additional Inherited Members

- Public Types inherited from Observer
typedef set_type::iterator iterator
 
- Protected Attributes inherited from GenericEngine< BasketOption::arguments, BasketOption::results >
BasketOption::arguments arguments_
 
BasketOption::results results_
 

Detailed Description

Pricing engine for basket option on multiple underlyings.

This class implements the pricing formula from "Sum of all Black-Scholes-Merton Models: An efficient Pricing Method for Spread, Basket and Asian Options", Jaehyuk Choi, 2018 https://papers.ssrn.com/sol3/papers.cfm?abstract_id=2913048

A Python implementation from the author of the paper is also available https://github.com/PyFE/PyFENG

Tests:
the correctness of the returned value is tested by reproducing results available in literature.

Definition at line 46 of file choibasketengine.hpp.

Constructor & Destructor Documentation

◆ ChoiBasketEngine()

ChoiBasketEngine ( std::vector< ext::shared_ptr< GeneralizedBlackScholesProcess > >  processes,
Matrix  rho,
Real  lambda = 10.0,
Size  maxNrIntegrationSteps = std::numeric_limits<Size>::max(),
bool  calcfwdDelta = false,
bool  controlVariate = false 
)

Definition at line 40 of file choibasketengine.cpp.

+ Here is the call graph for this function:

Member Function Documentation

◆ calculate()

void calculate ( ) const
overridevirtual

Implements PricingEngine.

Definition at line 63 of file choibasketengine.cpp.

+ Here is the call graph for this function:

Member Data Documentation

◆ n_

const Size n_
private

Definition at line 60 of file choibasketengine.hpp.

◆ processes_

const std::vector<ext::shared_ptr<GeneralizedBlackScholesProcess> > processes_
private

Definition at line 61 of file choibasketengine.hpp.

◆ rho_

const Matrix rho_
private

Definition at line 62 of file choibasketengine.hpp.

◆ lambda_

const Real lambda_
private

Definition at line 63 of file choibasketengine.hpp.

◆ maxNrIntegrationSteps_

const Size maxNrIntegrationSteps_
private

Definition at line 64 of file choibasketengine.hpp.

◆ calcFwdDelta_

const bool calcFwdDelta_
private

Definition at line 65 of file choibasketengine.hpp.

◆ controlVariate_

const bool controlVariate_
private

Definition at line 65 of file choibasketengine.hpp.