|
QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.38
|
Variance-swap pricing engine using replicating cost,. More...
#include <replicatingvarianceswapengine.hpp>
Inheritance diagram for ReplicatingVarianceSwapEngine:
Collaboration diagram for ReplicatingVarianceSwapEngine:Public Types | |
| typedef std::vector< std::pair< ext::shared_ptr< StrikedTypePayoff >, Real > > | weights_type |
Public Types inherited from Observer | |
| typedef set_type::iterator | iterator |
Public Member Functions | |
| ReplicatingVarianceSwapEngine (ext::shared_ptr< GeneralizedBlackScholesProcess > process, Real dk=5.0, const std::vector< Real > &callStrikes=std::vector< Real >(), const std::vector< Real > &putStrikes=std::vector< Real >()) | |
| void | calculate () const override |
Public Member Functions inherited from GenericEngine< VarianceSwap::arguments, VarianceSwap::results > | |
| PricingEngine::arguments * | getArguments () const override |
| const PricingEngine::results * | getResults () const override |
| void | reset () override |
| void | update () override |
Public Member Functions inherited from PricingEngine | |
| ~PricingEngine () override=default | |
| virtual arguments * | getArguments () const =0 |
| virtual const results * | getResults () const =0 |
| virtual void | reset ()=0 |
| virtual void | calculate () const =0 |
Public Member Functions inherited from Observable | |
| Observable ()=default | |
| Observable (const Observable &) | |
| Observable & | operator= (const Observable &) |
| Observable (Observable &&)=delete | |
| Observable & | operator= (Observable &&)=delete |
| virtual | ~Observable ()=default |
| void | notifyObservers () |
Public Member Functions inherited from Observer | |
| Observer ()=default | |
| Observer (const Observer &) | |
| Observer & | operator= (const Observer &) |
| virtual | ~Observer () |
| std::pair< iterator, bool > | registerWith (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 Member Functions | |
| void | computeOptionWeights (const std::vector< Real > &, Option::Type, weights_type &optionWeights) const |
| Real | computeLogPayoff (Real, Real) const |
| Real | computeReplicatingPortfolio (const weights_type &optionWeights) const |
| Rate | riskFreeRate () const |
| DiscountFactor | riskFreeDiscount () const |
| Real | underlying () const |
| Time | residualTime () const |
Private Attributes | |
| ext::shared_ptr< GeneralizedBlackScholesProcess > | process_ |
| Real | dk_ |
| std::vector< Real > | callStrikes_ |
| std::vector< Real > | putStrikes_ |
Additional Inherited Members | |
Protected Attributes inherited from GenericEngine< VarianceSwap::arguments, VarianceSwap::results > | |
| VarianceSwap::arguments | arguments_ |
| VarianceSwap::results | results_ |
Variance-swap pricing engine using replicating cost,.
as described in Demeterfi, Derman, Kamal & Zou, "A Guide to Volatility and Variance Swaps", 1999
Definition at line 44 of file replicatingvarianceswapengine.hpp.
| typedef std::vector<std::pair< ext::shared_ptr<StrikedTypePayoff>, Real> > weights_type |
Definition at line 47 of file replicatingvarianceswapengine.hpp.
| ReplicatingVarianceSwapEngine | ( | ext::shared_ptr< GeneralizedBlackScholesProcess > | process, |
| Real | dk = 5.0, |
||
| const std::vector< Real > & | callStrikes = std::vector<Real>(), |
||
| const std::vector< Real > & | putStrikes = std::vector<Real>() |
||
| ) |
Definition at line 76 of file replicatingvarianceswapengine.hpp.
|
overridevirtual |
Implements PricingEngine.
Definition at line 182 of file replicatingvarianceswapengine.hpp.
Here is the call graph for this function:
|
protected |
Definition at line 94 of file replicatingvarianceswapengine.hpp.
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 146 of file replicatingvarianceswapengine.hpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
protected |
Definition at line 155 of file replicatingvarianceswapengine.hpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
protected |
Definition at line 219 of file replicatingvarianceswapengine.hpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
protected |
Definition at line 226 of file replicatingvarianceswapengine.hpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
protected |
Definition at line 209 of file replicatingvarianceswapengine.hpp.
Here is the caller graph for this function:
|
protected |
Definition at line 214 of file replicatingvarianceswapengine.hpp.
Here is the caller graph for this function:
|
private |
Definition at line 68 of file replicatingvarianceswapengine.hpp.
|
private |
Definition at line 69 of file replicatingvarianceswapengine.hpp.
|
private |
Definition at line 70 of file replicatingvarianceswapengine.hpp.
|
private |
Definition at line 70 of file replicatingvarianceswapengine.hpp.