Logo
Reference manual - version qle_version
List of all members
CommodityAverageBasisPriceCurve< Interpolator > Class Template Reference

Commodity average basis price curve. More...

#include <qle/termstructures/commodityaveragebasispricecurve.hpp>

+ Inheritance diagram for CommodityAverageBasisPriceCurve< Interpolator >:

Public Member Functions

Constructors
 CommodityAverageBasisPriceCurve (const QuantLib::Date &referenceDate, const std::map< QuantLib::Date, QuantLib::Handle< QuantLib::Quote >> &basisData, const boost::shared_ptr< FutureExpiryCalculator > &basisFec, const boost::shared_ptr< CommodityIndex > &index, const boost::shared_ptr< FutureExpiryCalculator > &baseFec, bool addBasis=true, bool priceAsHistFixing=true, const Interpolator &interpolator=Interpolator())
 Curve constructed from dates and quotes.
 
Observer interface
void update () override
 
LazyObject interface
void performCalculations () const override
 
TermStructure interface
QuantLib::Date maxDate () const override
 
QuantLib::Time maxTime () const override
 
PriceTermStructure interface
QuantLib::Time minTime () const override
 The minimum time for which the curve can return values.
 
std::vector< QuantLib::Date > pillarDates () const override
 The pillar dates for the PriceTermStructure.
 
const QuantLib::Currency & currency () const override
 The currency in which prices are expressed.
 
Inspectors
const std::vector< QuantLib::Time > & times () const
 
const std::vector< QuantLib::Real > & prices () const
 
- Public Member Functions inherited from CommodityBasisPriceTermStructure
 CommodityBasisPriceTermStructure (const QuantLib::Date &referenceDate, const QuantLib::Calendar &cal, const QuantLib::DayCounter &dc, const boost::shared_ptr< FutureExpiryCalculator > &basisFec, const boost::shared_ptr< CommodityIndex > &baseIndex, const boost::shared_ptr< FutureExpiryCalculator > &baseFec, bool addBasis=true, QuantLib::Size monthOffset=0, bool averagingBaseCashflow=false, bool priceAsHistoricalFixing=true)
 
 CommodityBasisPriceTermStructure (const QuantLib::Date &referenceDate, const boost::shared_ptr< FutureExpiryCalculator > &basisFec, const boost::shared_ptr< CommodityIndex > &baseIndex, const boost::shared_ptr< FutureExpiryCalculator > &baseFec, bool addBasis=true, QuantLib::Size monthOffset=0, bool averagingBaseCashflow=false, bool priceAsHistoricalFixing=true)
 
const boost::shared_ptr< FutureExpiryCalculator > & basisFutureExpiryCalculator () const
 Inspectors.
 
const boost::shared_ptr< CommodityIndex > & baseIndex () const
 
const boost::shared_ptr< FutureExpiryCalculator > & baseFutureExpiryCalculator () const
 
bool addBasis () const
 
bool averagingBaseCashflow () const
 
bool priceAsHistoricalFixing () const
 
QuantLib::Size monthOffset () const
 
- Public Member Functions inherited from PriceTermStructure
 PriceTermStructure (const QuantLib::DayCounter &dc=QuantLib::DayCounter())
 
 PriceTermStructure (const QuantLib::Date &referenceDate, const QuantLib::Calendar &cal=QuantLib::Calendar(), const QuantLib::DayCounter &dc=QuantLib::DayCounter())
 
 PriceTermStructure (QuantLib::Natural settlementDays, const QuantLib::Calendar &cal, const QuantLib::DayCounter &dc=QuantLib::DayCounter())
 
QuantLib::Real price (QuantLib::Time t, bool extrapolate=false) const
 
QuantLib::Real price (const QuantLib::Date &d, bool extrapolate=false) const
 
void update () override
 

PriceTermStructure implementation

QuantLib::Real priceImpl (QuantLib::Time t) const override
 Price calculation.
 

Additional Inherited Members

- Protected Member Functions inherited from PriceTermStructure
void checkRange (QuantLib::Time t, bool extrapolate) const
 Extra time range check for minimum time, then calls TermStructure::checkRange.
 
- Protected Attributes inherited from CommodityBasisPriceTermStructure
boost::shared_ptr< FutureExpiryCalculatorbasisFec_
 
boost::shared_ptr< CommodityIndexbaseIndex_
 
boost::shared_ptr< FutureExpiryCalculatorbaseFec_
 
bool addBasis_
 
QuantLib::Size monthOffset_
 
bool averagingBaseCashflow_
 
bool priceAsHistoricalFixing_
 

Detailed Description

template<class Interpolator>
class QuantExt::CommodityAverageBasisPriceCurve< Interpolator >

Commodity average basis price curve.

Class representing an outright commodity price curve created from a base price curve and a collection of basis quotes that are added to or subtracted from the base curve. This class is intended to be used only for commodity future basis price curves. The base curve is averaged over the period defined the basis quote.