31 const ext::shared_ptr<SecondaryCosts>& secondaryCosts)
33 payCurrency_(
std::move(payCurrency)), receiveCurrency_(
std::move(receiveCurrency)),
34 pricingPeriods_(
std::move(pricingPeriods)) {}
42 Real totalQuantityAmount = 0;
44 totalQuantityAmount += pricingPeriod->quantity().
amount();
PricingPeriods pricingPeriods_
EnergySwap(Calendar calendar, Currency payCurrency, Currency receiveCurrency, PricingPeriods pricingPeriods, const CommodityType &commodityType, const ext::shared_ptr< SecondaryCosts > &secondaryCosts)
bool isExpired() const override
returns whether the instrument might have value greater than zero.
Quantity quantity() const override
const CommodityType & commodityType() const
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
#define QL_REQUIRE(condition, message)
throw an error if the given pre-condition is not verified
std::vector< ext::shared_ptr< PricingPeriod > > PricingPeriods
global repository for run-time library settings