24#ifndef quantext_averagefuturepricehelper_hpp
25#define quantext_averagefuturepricehelper_hpp
30#include <ql/termstructures/bootstraphelper.hpp>
34typedef QuantLib::BootstrapHelper<PriceTermStructure>
PriceHelper;
62 const QuantLib::ext::shared_ptr<CommodityIndex>& index,
63 const QuantLib::Date& start,
64 const QuantLib::Date& end,
65 const ext::shared_ptr<FutureExpiryCalculator>& calc,
66 const QuantLib::Calendar& calendar = QuantLib::Calendar(),
67 QuantLib::Natural deliveryDateRoll = 0,
68 QuantLib::Natural futureMonthOffset = 0,
69 bool useBusinessDays =
true,
70 QuantLib::Natural dailyExpiryOffset = QuantLib::Null<QuantLib::Natural>());
92 const QuantLib::ext::shared_ptr<CommodityIndex>& index,
93 const QuantLib::Date& start,
94 const QuantLib::Date& end,
95 const ext::shared_ptr<FutureExpiryCalculator>& calc,
96 const QuantLib::Calendar& calendar = QuantLib::Calendar(),
97 QuantLib::Natural deliveryDateRoll = 0,
98 QuantLib::Natural futureMonthOffset = 0,
99 bool useBusinessDays =
true,
100 QuantLib::Natural dailyExpiryOffset = QuantLib::Null<QuantLib::Natural>());
111 void accept(QuantLib::AcyclicVisitor& v)
override;
116 QuantLib::ext::shared_ptr<CommodityIndexedAverageCashFlow>
averageCashflow()
const;
123 void init(
const QuantLib::ext::shared_ptr<CommodityIndex>& index,
124 const QuantLib::Date& start,
125 const QuantLib::Date& end,
126 const ext::shared_ptr<FutureExpiryCalculator>& calc,
127 const QuantLib::Calendar& calendar,
128 QuantLib::Natural deliveryDateRoll,
129 QuantLib::Natural futureMonthOffset,
130 bool useBusinessDays,
131 QuantLib::Natural dailyExpiryOffset);
AverageFuturePriceHelper(QuantLib::Real price, const QuantLib::ext::shared_ptr< CommodityIndex > &index, const QuantLib::Date &start, const QuantLib::Date &end, const ext::shared_ptr< FutureExpiryCalculator > &calc, const QuantLib::Calendar &calendar=QuantLib::Calendar(), QuantLib::Natural deliveryDateRoll=0, QuantLib::Natural futureMonthOffset=0, bool useBusinessDays=true, QuantLib::Natural dailyExpiryOffset=QuantLib::Null< QuantLib::Natural >())
void init(const QuantLib::ext::shared_ptr< CommodityIndex > &index, const QuantLib::Date &start, const QuantLib::Date &end, const ext::shared_ptr< FutureExpiryCalculator > &calc, const QuantLib::Calendar &calendar, QuantLib::Natural deliveryDateRoll, QuantLib::Natural futureMonthOffset, bool useBusinessDays, QuantLib::Natural dailyExpiryOffset)
Shared initialisation method.
AverageFuturePriceHelper(const QuantLib::Handle< QuantLib::Quote > &price, const QuantLib::ext::shared_ptr< CommodityIndex > &index, const QuantLib::Date &start, const QuantLib::Date &end, const ext::shared_ptr< FutureExpiryCalculator > &calc, const QuantLib::Calendar &calendar=QuantLib::Calendar(), QuantLib::Natural deliveryDateRoll=0, QuantLib::Natural futureMonthOffset=0, bool useBusinessDays=true, QuantLib::Natural dailyExpiryOffset=QuantLib::Null< QuantLib::Natural >())
void accept(QuantLib::AcyclicVisitor &v) override
QuantLib::ext::shared_ptr< CommodityIndexedAverageCashFlow > averageCashflow_
void deepUpdate() override
QuantLib::ext::shared_ptr< CommodityIndexedAverageCashFlow > averageCashflow() const
QuantLib::Real impliedQuote() const override
QuantLib::RelinkableHandle< PriceTermStructure > termStructureHandle_
void setTermStructure(PriceTermStructure *ts) override
Cash flow dependent on the average commodity spot price or future's settlement price over a period....
Base class for classes that perform date calculations for future contracts.
QuantLib::BootstrapHelper< PriceTermStructure > PriceHelper
Term structure of prices.