24#ifndef quantext_averagespotpricehelper_hpp
25#define quantext_averagespotpricehelper_hpp
29#include <ql/termstructures/bootstraphelper.hpp>
33typedef QuantLib::BootstrapHelper<PriceTermStructure>
PriceHelper;
53 const QuantLib::ext::shared_ptr<CommoditySpotIndex>& index,
54 const QuantLib::Date& start,
55 const QuantLib::Date& end,
56 const QuantLib::Calendar& calendar = QuantLib::Calendar(),
57 bool useBusinessDays =
true);
71 const QuantLib::ext::shared_ptr<CommoditySpotIndex>& index,
72 const QuantLib::Date& start,
73 const QuantLib::Date& end,
74 const QuantLib::Calendar& calendar = QuantLib::Calendar(),
75 bool useBusinessDays =
true);
86 void accept(QuantLib::AcyclicVisitor& v)
override;
91 QuantLib::ext::shared_ptr<CommodityIndexedAverageCashFlow>
averageCashflow()
const;
96 void init(
const QuantLib::ext::shared_ptr<CommoditySpotIndex>& index,
97 const QuantLib::Date& start,
98 const QuantLib::Date& end,
99 const QuantLib::Calendar& calendar,
100 bool useBusinessDays);
AverageSpotPriceHelper(const QuantLib::Handle< QuantLib::Quote > &price, const QuantLib::ext::shared_ptr< CommoditySpotIndex > &index, const QuantLib::Date &start, const QuantLib::Date &end, const QuantLib::Calendar &calendar=QuantLib::Calendar(), bool useBusinessDays=true)
void accept(QuantLib::AcyclicVisitor &v) override
QuantLib::ext::shared_ptr< CommodityIndexedAverageCashFlow > averageCashflow_
AverageSpotPriceHelper(QuantLib::Real price, const QuantLib::ext::shared_ptr< CommoditySpotIndex > &index, const QuantLib::Date &start, const QuantLib::Date &end, const QuantLib::Calendar &calendar=QuantLib::Calendar(), bool useBusinessDays=true)
QuantLib::ext::shared_ptr< CommodityIndexedAverageCashFlow > averageCashflow() const
void init(const QuantLib::ext::shared_ptr< CommoditySpotIndex > &index, const QuantLib::Date &start, const QuantLib::Date &end, const QuantLib::Calendar &calendar, bool useBusinessDays)
Shared initialisation method.
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....
QuantLib::BootstrapHelper< PriceTermStructure > PriceHelper
Term structure of prices.