QuantLib
A free/open-source library for quantitative finance
Reference manual - version 1.20
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
EnergyVanillaSwap Class Reference

Vanilla energy swap. More...

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

Inherits EnergySwap.

Public Member Functions

 EnergyVanillaSwap (bool payer, const Calendar &calendar, const Money &fixedPrice, const UnitOfMeasure &fixedPriceUnitOfMeasure, const ext::shared_ptr< CommodityIndex > &index, const Currency &payCurrency, const Currency &receiveCurrency, const PricingPeriods &pricingPeriods, const CommodityType &commodityType, const ext::shared_ptr< SecondaryCosts > &secondaryCosts, const Handle< YieldTermStructure > &payLegTermStructure, const Handle< YieldTermStructure > &receiveLegTermStructure, const Handle< YieldTermStructure > &discountTermStructure)
 
bool isExpired () const
 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
 

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

◆ performCalculations()

void performCalculations ( ) const
protectedvirtual

In case a pricing engine is not used, this method must be overridden to perform the actual calculations and set any needed results. In case a pricing engine is used, the default implementation can be used.

Reimplemented from Instrument.