26#include <ql/patterns/lazyobject.hpp>
34 const QuantLib::ext::shared_ptr<PriceTermStructure>& priceCurve,
35 const QuantLib::ext::shared_ptr<FutureExpiryCalculator>& basisFec,
36 const QuantLib::ext::shared_ptr<CommodityIndex>&
baseIndex,
37 const QuantLib::ext::shared_ptr<FutureExpiryCalculator>& baseFec,
bool addBasis =
true,
39 bool priceAsHistFixing =
true)
47 const QuantLib::ext::shared_ptr<CommodityIndex>&
baseIndex,
48 const QuantLib::ext::shared_ptr<PriceTermStructure>& priceCurve)
50 referenceCurve->referenceDate(), referenceCurve->calendar(), referenceCurve->dayCounter(),
62 TermStructure::update();
73 QuantLib::Real
priceImpl(QuantLib::Time t)
const override {
return priceCurve_->price(t, allowsExtrapolation()); }
75 QuantLib::ext::shared_ptr<QuantExt::PriceTermStructure>
priceCurve_;
QuantLib::Time minTime() const override
The minimum time for which the curve can return values.
void performCalculations() const override
CommodityBasisPriceCurveWrapper(const QuantLib::Date &referenceDate, const QuantLib::ext::shared_ptr< PriceTermStructure > &priceCurve, 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 priceAsHistFixing=true)
const QuantLib::Currency & currency() const override
The currency in which prices are expressed.
CommodityBasisPriceCurveWrapper(const QuantLib::ext::shared_ptr< CommodityBasisPriceTermStructure > &referenceCurve, const QuantLib::ext::shared_ptr< CommodityIndex > &baseIndex, const QuantLib::ext::shared_ptr< PriceTermStructure > &priceCurve)
QuantLib::Date maxDate() const override
QuantLib::ext::shared_ptr< QuantExt::PriceTermStructure > priceCurve_
std::vector< QuantLib::Date > pillarDates() const override
The pillar dates for the PriceTermStructure.
QuantLib::Natural settlementDays() const override
QuantLib::Real priceImpl(QuantLib::Time t) const override
Price calculation.
QuantLib::Size monthOffset() const
bool priceAsHistoricalFixing() const
const QuantLib::ext::shared_ptr< CommodityIndex > & baseIndex() const
const QuantLib::ext::shared_ptr< FutureExpiryCalculator > & baseFutureExpiryCalculator() const
const QuantLib::ext::shared_ptr< FutureExpiryCalculator > & basisFutureExpiryCalculator() const
Inspectors.
bool averagingBaseCashflow() const
An interface for a commodity price curve created from a base price curve and a collection of basis qu...