20#include <ql/event.hpp>
21#include <ql/experimental/varianceoption/varianceoption.hpp>
28 const Date& startDate,
29 const Date& maturityDate)
30 : payoff_(
std::move(payoff)), notional_(notional), startDate_(startDate),
31 maturityDate_(maturityDate) {}
35 QL_REQUIRE(
arguments !=
nullptr,
"wrong argument type");
44 QL_REQUIRE(
payoff,
"no strike given");
46 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
template class providing a null value for a given type.
Arguments for forward fair-variance calculation
void validate() const override
ext::shared_ptr< Payoff > payoff
bool isExpired() const override
returns whether the instrument might have value greater than zero.
VarianceOption(ext::shared_ptr< Payoff > payoff, Real notional, const Date &startDate, const Date &maturityDate)
ext::shared_ptr< Payoff > payoff_
void setupArguments(PricingEngine::arguments *args) const override