- QuantLib
- VarianceSwap
 
Variance swap. More...
#include <ql/instruments/varianceswap.hpp>

| 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... | |
| Public Member Functions | |
| VarianceSwap (Position::Type position, Real strike, Real notional, const Date &startDate, const Date &maturityDate) | |
| void | setupArguments (PricingEngine::arguments *args) const | 
| void | fetchResults (const PricingEngine::results *) const | 
| Instrument interface | |
| bool | isExpired () const | 
| returns whether the instrument might have value greater than zero. | |
| Additional interface | |
| Real | strike () const | 
| Position::Type | position () const | 
| Date | startDate () const | 
| Date | maturityDate () const | 
| Real | notional () const | 
| Real | variance () const | 
| Protected Member Functions | |
| void | setupExpired () const | 
| Protected Attributes | |
| Position::Type | position_ | 
| Real | strike_ | 
| Real | notional_ | 
| Date | startDate_ | 
| Date | maturityDate_ | 
| Real | variance_ | 
Variance swap.
| void setupArguments | ( | PricingEngine::arguments * | ) | 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 PricingEngine::results * | r | ) | 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.