21#include <ql/instruments/varianceswap.hpp>
22#include <ql/event.hpp>
30 const Date& startDate,
31 const Date& maturityDate)
32 : position_(position), strike_(strike), notional_(notional),
33 startDate_(startDate), maturityDate_(maturityDate) {}
48 QL_REQUIRE(
arguments !=
nullptr,
"wrong argument type");
65 QL_REQUIRE(
strike > 0.0,
"negative or null strike given");
67 QL_REQUIRE(
notional > 0.0,
"negative or null notional given");
virtual bool hasOccurred(const Date &refDate=Date(), ext::optional< bool > includeRefDate=ext::nullopt) const
returns true if an event has already occurred before a date
void calculate() const override
virtual void fetchResults(const PricingEngine::results *) const
virtual void setupExpired() const
template class providing a null value for a given type.
Arguments for forward fair-variance calculation
void validate() const override
Results from variance-swap calculation
bool isExpired() const override
returns whether the instrument might have value greater than zero.
VarianceSwap(Position::Type position, Real strike, Real notional, const Date &startDate, const Date &maturityDate)
void setupArguments(PricingEngine::arguments *args) const override
void setupExpired() const override
void fetchResults(const PricingEngine::results *) const override