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
TurnbullWakemanAsianEngine Class Reference

#include <turnbullwakemanasianengine.hpp>

+ Inheritance diagram for TurnbullWakemanAsianEngine:
+ Collaboration diagram for TurnbullWakemanAsianEngine:

Public Member Functions

 TurnbullWakemanAsianEngine (ext::shared_ptr< GeneralizedBlackScholesProcess > process)
 
void calculate () const override
 
- Public Member Functions inherited from GenericEngine< DiscreteAveragingAsianOption::arguments, DiscreteAveragingAsianOption::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 ()
 
 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

ext::shared_ptr< GeneralizedBlackScholesProcessprocess_
 

Additional Inherited Members

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

Detailed Description

Turnbull Wakeman two moment-matching Asian option Engine Analytical pricing based on the two-moment Turnbull-Wakeman approximation. References: "Commodity Option Pricing", Iain Clark, Wiley, section 2.7.4. "Option Pricing Formulas, Second Edition", E.G. Haug, 2006, pp. 192-202. Some parts of the implementation were modeled after calculations from the CommodityAveragePriceOptionAnalyticalEngine class in Open Source Risk Engine (https://github.com/OpenSourceRisk/Engine).

Tests:
  • the correctness of the returned value is tested by reproducing results in literature with flat as well as upward and downward sloping volatility term structures.
  • the pricing of trades with guaranteed exercise/OTM is also tested.

Definition at line 47 of file turnbullwakemanasianengine.hpp.

Constructor & Destructor Documentation

◆ TurnbullWakemanAsianEngine()

TurnbullWakemanAsianEngine ( ext::shared_ptr< GeneralizedBlackScholesProcess process)
explicit

Definition at line 49 of file turnbullwakemanasianengine.hpp.

+ Here is the call graph for this function:

Member Function Documentation

◆ calculate()

void calculate ( ) const
overridevirtual

Implements PricingEngine.

Definition at line 24 of file turnbullwakemanasianengine.cpp.

+ Here is the call graph for this function:

Member Data Documentation

◆ process_

ext::shared_ptr<GeneralizedBlackScholesProcess> process_
private

Definition at line 57 of file turnbullwakemanasianengine.hpp.