Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
CommodityBasisPriceTermStructure Class Reference

#include <qle/termstructures/commoditybasispricetermstructure.hpp>

+ Inheritance diagram for CommodityBasisPriceTermStructure:
+ Collaboration diagram for CommodityBasisPriceTermStructure:

Public Member Functions

 CommodityBasisPriceTermStructure (const QuantLib::Date &referenceDate, const QuantLib::Calendar &cal, const QuantLib::DayCounter &dc, const QuantLib::ext::shared_ptr< FutureExpiryCalculator > &basisFec, const QuantLib::ext::shared_ptr< CommodityIndex > &baseIndex, const QuantLib::ext::shared_ptr< FutureExpiryCalculator > &baseFec, bool addBasis=true, QuantLib::Size monthOffset=0, bool averagingBaseCashflow=false, bool priceAsHistoricalFixing=true)
 
 CommodityBasisPriceTermStructure (const QuantLib::Date &referenceDate, const QuantLib::ext::shared_ptr< FutureExpiryCalculator > &basisFec, const QuantLib::ext::shared_ptr< CommodityIndex > &baseIndex, const QuantLib::ext::shared_ptr< FutureExpiryCalculator > &baseFec, bool addBasis=true, QuantLib::Size monthOffset=0, bool averagingBaseCashflow=false, bool priceAsHistoricalFixing=true)
 
const QuantLib::ext::shared_ptr< FutureExpiryCalculator > & basisFutureExpiryCalculator () const
 Inspectors. More...
 
const QuantLib::ext::shared_ptr< CommodityIndex > & baseIndex () const
 
const QuantLib::ext::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
 
virtual QuantLib::Time minTime () const
 The minimum time for which the curve can return values. More...
 
virtual const QuantLib::Currency & currency () const =0
 The currency in which prices are expressed. More...
 
virtual std::vector< QuantLib::Date > pillarDates () const =0
 The pillar dates for the PriceTermStructure. More...
 

Protected Attributes

QuantLib::ext::shared_ptr< FutureExpiryCalculatorbasisFec_
 
QuantLib::ext::shared_ptr< CommodityIndexbaseIndex_
 
QuantLib::ext::shared_ptr< FutureExpiryCalculatorbaseFec_
 
bool addBasis_
 
QuantLib::Size monthOffset_
 
bool averagingBaseCashflow_
 
bool priceAsHistoricalFixing_
 

Additional Inherited Members

- Protected Member Functions inherited from PriceTermStructure
virtual QuantLib::Real priceImpl (QuantLib::Time) const =0
 Price calculation. More...
 
void checkRange (QuantLib::Time t, bool extrapolate) const
 Extra time range check for minimum time, then calls TermStructure::checkRange. More...
 

Detailed Description

Definition at line 34 of file commoditybasispricetermstructure.hpp.

Constructor & Destructor Documentation

◆ CommodityBasisPriceTermStructure() [1/2]

CommodityBasisPriceTermStructure ( const QuantLib::Date &  referenceDate,
const QuantLib::Calendar &  cal,
const QuantLib::DayCounter &  dc,
const QuantLib::ext::shared_ptr< FutureExpiryCalculator > &  basisFec,
const QuantLib::ext::shared_ptr< CommodityIndex > &  baseIndex,
const QuantLib::ext::shared_ptr< FutureExpiryCalculator > &  baseFec,
bool  addBasis = true,
QuantLib::Size  monthOffset = 0,
bool  averagingBaseCashflow = false,
bool  priceAsHistoricalFixing = true 
)

Definition at line 36 of file commoditybasispricetermstructure.hpp.

43 : PriceTermStructure(referenceDate, cal, dc), basisFec_(basisFec),
46 registerWith(baseIndex_);
47 }
QuantLib::ext::shared_ptr< FutureExpiryCalculator > baseFec_
const QuantLib::ext::shared_ptr< CommodityIndex > & baseIndex() const
QuantLib::ext::shared_ptr< FutureExpiryCalculator > basisFec_
QuantLib::ext::shared_ptr< CommodityIndex > baseIndex_
PriceTermStructure(const QuantLib::DayCounter &dc=QuantLib::DayCounter())

◆ CommodityBasisPriceTermStructure() [2/2]

CommodityBasisPriceTermStructure ( const QuantLib::Date &  referenceDate,
const QuantLib::ext::shared_ptr< FutureExpiryCalculator > &  basisFec,
const QuantLib::ext::shared_ptr< CommodityIndex > &  baseIndex,
const QuantLib::ext::shared_ptr< FutureExpiryCalculator > &  baseFec,
bool  addBasis = true,
QuantLib::Size  monthOffset = 0,
bool  averagingBaseCashflow = false,
bool  priceAsHistoricalFixing = true 
)

Definition at line 49 of file commoditybasispricetermstructure.hpp.

55 : PriceTermStructure(referenceDate, QuantLib::NullCalendar(), baseIndex->priceCurve()->dayCounter()), basisFec_(basisFec),
58 registerWith(baseIndex_);
59 }

Member Function Documentation

◆ basisFutureExpiryCalculator()

const QuantLib::ext::shared_ptr< FutureExpiryCalculator > & basisFutureExpiryCalculator ( ) const

Inspectors.

Definition at line 63 of file commoditybasispricetermstructure.hpp.

63{ return basisFec_; }

◆ baseIndex()

const QuantLib::ext::shared_ptr< CommodityIndex > & baseIndex ( ) const

Definition at line 64 of file commoditybasispricetermstructure.hpp.

64{ return baseIndex_; }
+ Here is the caller graph for this function:

◆ baseFutureExpiryCalculator()

const QuantLib::ext::shared_ptr< FutureExpiryCalculator > & baseFutureExpiryCalculator ( ) const

Definition at line 65 of file commoditybasispricetermstructure.hpp.

65{ return baseFec_; }

◆ addBasis()

bool addBasis ( ) const

Definition at line 66 of file commoditybasispricetermstructure.hpp.

66{ return addBasis_; }

◆ averagingBaseCashflow()

bool averagingBaseCashflow ( ) const

Definition at line 67 of file commoditybasispricetermstructure.hpp.

67{ return averagingBaseCashflow_; }

◆ priceAsHistoricalFixing()

bool priceAsHistoricalFixing ( ) const

Definition at line 68 of file commoditybasispricetermstructure.hpp.

◆ monthOffset()

QuantLib::Size monthOffset ( ) const

Definition at line 69 of file commoditybasispricetermstructure.hpp.

69{ return monthOffset_; }

Member Data Documentation

◆ basisFec_

QuantLib::ext::shared_ptr<FutureExpiryCalculator> basisFec_
protected

Definition at line 72 of file commoditybasispricetermstructure.hpp.

◆ baseIndex_

QuantLib::ext::shared_ptr<CommodityIndex> baseIndex_
protected

Definition at line 73 of file commoditybasispricetermstructure.hpp.

◆ baseFec_

QuantLib::ext::shared_ptr<FutureExpiryCalculator> baseFec_
protected

Definition at line 74 of file commoditybasispricetermstructure.hpp.

◆ addBasis_

bool addBasis_
protected

Definition at line 75 of file commoditybasispricetermstructure.hpp.

◆ monthOffset_

QuantLib::Size monthOffset_
protected

Definition at line 76 of file commoditybasispricetermstructure.hpp.

◆ averagingBaseCashflow_

bool averagingBaseCashflow_
protected

Definition at line 77 of file commoditybasispricetermstructure.hpp.

◆ priceAsHistoricalFixing_

bool priceAsHistoricalFixing_
protected

Definition at line 78 of file commoditybasispricetermstructure.hpp.