26#include <ql/cashflow.hpp>
40 const QuantLib::ext::shared_ptr<FutureExpiryCalculator>& basisFec,
41 const QuantLib::ext::shared_ptr<QuantExt::CommodityIndex>&
baseIndex,
42 const QuantLib::ext::shared_ptr<FutureExpiryCalculator>& baseFec,
43 const QuantLib::Handle<QuantExt::PriceTermStructure>&
priceCurve =
44 QuantLib::Handle<QuantExt::PriceTermStructure>(),
45 const bool addBasis =
true,
const QuantLib::Size monthOffset = 0,
46 const bool baseIsAveraging =
false,
const bool priceAsHistoricalFixing =
true);
50 const QuantLib::ext::shared_ptr<CommodityBasisPriceTermStructure>&
priceCurve);
53 QuantLib::ext::shared_ptr<CommodityIndex>
55 const boost::optional<QuantLib::Handle<PriceTermStructure>>& ts = boost::none)
const override;
57 QuantLib::Real
pastFixing(
const QuantLib::Date& fixingDate)
const override;
60 QuantLib::ext::shared_ptr<QuantLib::CashFlow>
baseCashflow(
const QuantLib::Date& paymentDate = QuantLib::Date())
const;
63 QuantLib::ext::shared_ptr<FutureExpiryCalculator>
basisFec_;
64 QuantLib::ext::shared_ptr<QuantExt::CommodityIndex>
baseIndex_;
65 QuantLib::ext::shared_ptr<FutureExpiryCalculator>
baseFec_;
70 QuantLib::ext::shared_ptr<QuantLib::CashFlow>
cashflow_;
Commodity Basis Future Index.
QuantLib::ext::shared_ptr< FutureExpiryCalculator > baseFec_
const QuantLib::ext::shared_ptr< QuantExt::CommodityIndex > & baseIndex()
QuantLib::ext::shared_ptr< QuantExt::CommodityIndex > baseIndex_
QuantLib::Size monthOffset_
QuantLib::ext::shared_ptr< FutureExpiryCalculator > basisFec_
QuantLib::ext::shared_ptr< CommodityIndex > clone(const QuantLib::Date &expiryDate=QuantLib::Date(), const boost::optional< QuantLib::Handle< PriceTermStructure > > &ts=boost::none) const override
Implement the base clone. Ajust the base future to match the same contract month.
QuantLib::ext::shared_ptr< QuantLib::CashFlow > cashflow_
bool priceAsHistoricalFixing_
QuantLib::Real pastFixing(const QuantLib::Date &fixingDate) const override
QuantLib::ext::shared_ptr< QuantLib::CashFlow > baseCashflow(const QuantLib::Date &paymentDate=QuantLib::Date()) const
const QuantLib::Date & expiryDate() const
Calendar fixingCalendar() const override
const Handle< QuantExt::PriceTermStructure > & priceCurve() const
std::string underlyingName() const
A commodity price curve created from a base price curve and a collection of basis quotes.
commodity index class for holding commodity spot and futures price histories and forwarding.