QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
QuantoEngine< Instr, Engine > Class Template Reference

Quanto engine. More...

#include <quantoengine.hpp>

+ Inheritance diagram for QuantoEngine< Instr, Engine >:
+ Collaboration diagram for QuantoEngine< Instr, Engine >:

Public Member Functions

 QuantoEngine (ext::shared_ptr< GeneralizedBlackScholesProcess >, Handle< YieldTermStructure > foreignRiskFreeRate, Handle< BlackVolTermStructure > exchangeRateVolatility, Handle< Quote > correlation)
 
void calculate () const override
 
- Public Member Functions inherited from GenericEngine< Instr::arguments, QuantoOptionResults< Instr::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 ()
 

Protected Attributes

ext::shared_ptr< GeneralizedBlackScholesProcessprocess_
 
Handle< YieldTermStructureforeignRiskFreeRate_
 
Handle< BlackVolTermStructureexchangeRateVolatility_
 
Handle< Quotecorrelation_
 
- Protected Attributes inherited from GenericEngine< Instr::arguments, QuantoOptionResults< Instr::results > >
Instr::arguments arguments_
 
QuantoOptionResults< Instr::results > results_
 

Additional Inherited Members

- Public Types inherited from Observer
typedef set_type::iterator iterator
 

Detailed Description

template<class Instr, class Engine>
class QuantLib::QuantoEngine< Instr, Engine >

Quanto engine.

Warning:
for the time being, this engine will only work with simple Black-Scholes processes (i.e., no Merton.)
Tests:
  • the correctness of the returned value is tested by reproducing results available in literature.
  • the correctness of the returned greeks is tested by reproducing numerical derivatives.

Definition at line 49 of file quantoengine.hpp.

Constructor & Destructor Documentation

◆ QuantoEngine()

QuantoEngine ( ext::shared_ptr< GeneralizedBlackScholesProcess process,
Handle< YieldTermStructure foreignRiskFreeRate,
Handle< BlackVolTermStructure exchangeRateVolatility,
Handle< Quote correlation 
)

Definition at line 70 of file quantoengine.hpp.

+ Here is the call graph for this function:

Member Function Documentation

◆ calculate()

void calculate
overridevirtual

Implements PricingEngine.

Definition at line 85 of file quantoengine.hpp.

Member Data Documentation

◆ process_

ext::shared_ptr<GeneralizedBlackScholesProcess> process_
protected

Definition at line 60 of file quantoengine.hpp.

◆ foreignRiskFreeRate_

Handle<YieldTermStructure> foreignRiskFreeRate_
protected

Definition at line 61 of file quantoengine.hpp.

◆ exchangeRateVolatility_

Handle<BlackVolTermStructure> exchangeRateVolatility_
protected

Definition at line 62 of file quantoengine.hpp.

◆ correlation_

Handle<Quote> correlation_
protected

Definition at line 63 of file quantoengine.hpp.