VarianceSwap Class Reference
[Financial instruments]
#include <ql/Instruments/varianceswap.hpp>
Inheritance diagram for VarianceSwap:

Detailed Description
Variance swap.
- Warning:
- This class does not manage seasoned variance swaps.
Public Types | |
|
typedef std::vector< std::pair< boost::shared_ptr< StrikedTypePayoff >, Real > > | WeightsType |
Public Member Functions | |
| VarianceSwap (Position::Type position, Real strike, Real notional, const boost::shared_ptr< StochasticProcess > &process, const Date &maturityDate, const boost::shared_ptr< PricingEngine > &engine) | |
| void | setupArguments (Arguments *args) const |
| void | fetchResults (const Results *) const |
Instrument interface | |
| bool | isExpired () const |
| returns whether the instrument is still tradable. | |
Additional interface | |
| Real | strike () const |
| Position::Type | position () const |
| Date | maturityDate () const |
| Date | settlementDate () const |
| Real | notional () const |
| Real | fairVariance () const |
|
std::vector< std::pair< Real, Real > > | optionWeights (Option::Type) const |
Protected Member Functions | |
| void | setupExpired () const |
| void | performCalculations () const |
Protected Attributes | |
| boost::shared_ptr< GeneralizedBlackScholesProcess > | process_ |
| Position::Type | position_ |
| Real | strike_ |
| Real | notional_ |
| Date | maturityDate_ |
| WeightsType | optionWeights_ |
| Real | fairVariance_ |
Classes | |
| class | arguments |
| Arguments for forward fair-variance calculation More... | |
| class | engine |
| base class for variance-swap engines More... | |
| class | results |
| Results from variance-swap calculation More... | |
Member Function Documentation
| void setupArguments | ( | Arguments * | args | ) | const [virtual] |
When a derived argument structure is defined for an instrument, this method should be overridden to fill it. This is mandatory in case a pricing engine is used.
Reimplemented from Instrument.
| void fetchResults | ( | const Results * | ) | const [virtual] |
When a derived result structure is defined for an instrument, this method should be overridden to read from it. This is mandatory in case a pricing engine is used.
Reimplemented from Instrument.
| void setupExpired | ( | ) | const [protected, virtual] |
This method must leave the instrument in a consistent state when the expiration condition is met.
Reimplemented from Instrument.
| void performCalculations | ( | ) | const [protected, virtual] |
In case a pricing engine is not used, this method must be overridden to perform the actual calculations and set any needed results. In case a pricing engine is used, the default implementation can be used.
Reimplemented from Instrument.