QuantLib: a free/open-source library for quantitative finance
Reference manual - version 1.40
Loading...
Searching...
No Matches
EnergyVanillaSwap Class Reference

Vanilla energy swap. More...

#include <ql/experimental/commodities/energyvanillaswap.hpp>

Public Member Functions

 EnergyVanillaSwap (bool payer, const Calendar &calendar, Money fixedPrice, UnitOfMeasure fixedPriceUnitOfMeasure, ext::shared_ptr< CommodityIndex > index, const Currency &payCurrency, const Currency &receiveCurrency, const PricingPeriods &pricingPeriods, const CommodityType &commodityType, const ext::shared_ptr< SecondaryCosts > &secondaryCosts, Handle< YieldTermStructure > payLegTermStructure, Handle< YieldTermStructure > receiveLegTermStructure, Handle< YieldTermStructure > discountTermStructure)
bool isExpired () const override
 returns whether the instrument might have value greater than zero.
Integer payReceive () const
const MoneyfixedPrice () const
const UnitOfMeasurefixedPriceUnitOfMeasure () const
const ext::shared_ptr< CommodityIndex > & index () const

Protected Member Functions

void performCalculations () const override

Protected Attributes

Integer payReceive_
Money fixedPrice_
UnitOfMeasure fixedPriceUnitOfMeasure_
ext::shared_ptr< CommodityIndexindex_
Handle< YieldTermStructurepayLegTermStructure_
Handle< YieldTermStructurereceiveLegTermStructure_
Handle< YieldTermStructurediscountTermStructure_

Detailed Description

Vanilla energy swap.

Member Function Documentation

◆ isExpired()

bool isExpired ( ) const
overridevirtual

returns whether the instrument might have value greater than zero.

Implements Instrument.

◆ performCalculations()

void performCalculations ( ) const
overrideprotectedvirtual

This method must implement any calculations which must be (re)done in order to calculate the desired results.

Implements LazyObject.