QuantLib: ReplicatingVarianceSwapEngine Class Reference

A free/open-source library for quantitative finance Reference manual - version 1.6

- Main Page
- Related Pages
- Modules
- Classes
- Examples

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Types | Public Member Functions | Protected Member Functions | List of all members
ReplicatingVarianceSwapEngine Class Reference
Pricing engines » Forward option engines

Variance-swap pricing engine using replicating cost,. More...

`#include <ql/pricingengines/forward/replicatingvarianceswapengine.hpp>`

Inheritance diagram for ReplicatingVarianceSwapEngine:
[legend]

## Public Types
typedef std::vector< std::pair< boost::shared_ptr< StrikedTypePayoff >, Real > > | weights_type

## Public Member Functions
| ReplicatingVarianceSwapEngine (const boost::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
Public Member Functions inherited from GenericEngine< VarianceSwap::arguments, VarianceSwap::results >
PricingEngine::arguments * | getArguments () const
const PricingEngine::results * | getResults () const
void | reset ()
void | update ()
Public Member Functions inherited from Observable
| Observable (const Observable &)
Observable & | operator= (const Observable &)
void | notifyObservers ()
Public Member Functions inherited from Observer
| Observer (const Observer &)
Observer & | operator= (const Observer &)
std::pair< std::set< boost::shared_ptr< Observable > >::iterator, bool > | registerWith (const boost::shared_ptr< Observable > &)
void | registerWithObservables (const boost::shared_ptr< Observer > &)
Size | unregisterWith (const boost::shared_ptr< Observable > &)
void | unregisterWithAll ()

## Protected Member Functions
void | computeOptionWeights (const std::vector< Real > &, const Option::Type, weights_type &optionWeights) const
Real | computeLogPayoff (const Real, const Real) const
Real | computeReplicatingPortfolio (const weights_type &optionWeights) const
Rate | riskFreeRate () const
DiscountFactor | riskFreeDiscount () const
Real | underlying () const
Time | residualTime () const

## Additional Inherited Members
Protected Attributes inherited from GenericEngine< VarianceSwap::arguments, VarianceSwap::results >
VarianceSwap::arguments | arguments_
VarianceSwap::results | results_

## Detailed Description

Variance-swap pricing engine using replicating cost,.

as described in Demeterfi, Derman, Kamal & Zou, "A Guide to Volatility and Variance Swaps", 1999

Tests:
  returned variances verified against results from literature