Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
Classes | Public Member Functions | List of all members
VarianceSwap2 Class Reference

Variance swap. More...

#include <qle/instruments/varianceswap.hpp>

+ Inheritance diagram for VarianceSwap2:
+ Collaboration diagram for VarianceSwap2:

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

 VarianceSwap2 (Position::Type position, Real strike, Real notional, const Date &startDate, const Date &maturityDate, const Calendar &calendar, bool addPastDividends)
 

Additional interface

Calendar calendar_
 
bool addPastDividends_
 
Calendar calendar () const
 
bool addPastDividends () const
 
void setupArguments (PricingEngine::arguments *args) const override
 

Detailed Description

Variance swap.

Warning:
This class does not manage seasoned variance swaps.

Definition at line 36 of file varianceswap.hpp.

Constructor & Destructor Documentation

◆ VarianceSwap2()

VarianceSwap2 ( Position::Type  position,
Real  strike,
Real  notional,
const Date &  startDate,
const Date &  maturityDate,
const Calendar &  calendar,
bool  addPastDividends 
)

Definition at line 23 of file varianceswap.cpp.

25 : QuantLib::VarianceSwap(position, strike, notional, startDate, maturityDate), calendar_(calendar),
Calendar calendar() const
bool addPastDividends() const

Member Function Documentation

◆ calendar()

Calendar calendar ( ) const

Definition at line 75 of file varianceswap.hpp.

75{ return calendar_; }

◆ addPastDividends()

bool addPastDividends ( ) const

Definition at line 77 of file varianceswap.hpp.

77{ return addPastDividends_; }

◆ setupArguments()

void setupArguments ( PricingEngine::arguments *  args) const
override

Definition at line 28 of file varianceswap.cpp.

28 {
29 QuantLib::VarianceSwap::setupArguments(args);
31 QL_REQUIRE(arguments != 0, "wrong argument type");
32
33 arguments->calendar = calendar_;
35}
Arguments for forward fair-variance calculation

Member Data Documentation

◆ calendar_

Calendar calendar_
protected

Definition at line 54 of file varianceswap.hpp.

◆ addPastDividends_

bool addPastDividends_
protected

Definition at line 55 of file varianceswap.hpp.