EnergyCommodity (3) - Linux Manuals

EnergyCommodity: Energy commodity class.

NAME

QuantLib::EnergyCommodity - Energy commodity class.

SYNOPSIS


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

Inherits QuantLib::Commodity.

Inherited by EnergyFuture, and EnergySwap.

Public Types


enum DeliverySchedule { Constant, Window, Hourly, Daily, Weekly, Monthly, Quarterly, Yearly }

enum QuantityPeriodicity { Absolute, PerHour, PerDay, PerWeek, PerMonth, PerQuarter, PerYear }

enum PaymentSchedule { WindowSettlement, MonthlySettlement, QuarterlySettlement, YearlySettlement }

Public Member Functions


EnergyCommodity (const CommodityType &commodityType, const boost::shared_ptr< SecondaryCosts > &secondaryCosts)

virtual Quantity quantity () const =0

const CommodityType & commodityType () const

void setupArguments (PricingEngine::arguments *) const

void fetchResults (const PricingEngine::results *) const

Protected Member Functions


Real calculateUnitCost (const CommodityType &commodityType, const CommodityUnitCost &unitCost, const Date &evaluationDate) const

void calculateSecondaryCostAmounts (const CommodityType &commodityType, Real totalQuantityValue, const Date &evaluationDate) const

Static Protected Member Functions


static Real calculateFxConversionFactor (const Currency &fromCurrency, const Currency &toCurrency, const Date &evaluationDate)

static Real calculateUomConversionFactor (const CommodityType &commodityType, const UnitOfMeasure &fromUnitOfMeasure, const UnitOfMeasure &toUnitOfMeasure)

Protected Attributes


CommodityType commodityType_

Detailed Description

Energy commodity class.

Member Function Documentation

void setupArguments (PricingEngine::arguments *) const [virtual]

When a derived argument structure is defined for an instrument, this method should be overridden to fill it. This is mandatory in case a pricing engine is used.

Reimplemented from Instrument.

void fetchResults (const PricingEngine::results * r) const [virtual]

When a derived result structure is defined for an instrument, this method should be overridden to read from it. This is mandatory in case a pricing engine is used.

Reimplemented from Instrument.

Author

Generated automatically by Doxygen for QuantLib from the source code.