Logo
Reference manual - version qle_version
AverageFuturePriceHelper Class Reference

#include <qle/termstructures/averagefuturepricehelper.hpp>

Inheritance diagram for AverageFuturePriceHelper:

Public Member Functions

Constructors
 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::Integer futureMonthOffset=0, bool useBusinessDays=true, QuantLib::Natural dailyExpiryOffset=QuantLib::Null< QuantLib::Natural >(), const QuantLib::ext::optional< std::pair< Calendar, Real > > &offPeakPowerData=QuantLib::ext::nullopt)
 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::Integer futureMonthOffset=0, bool useBusinessDays=true, QuantLib::Natural dailyExpiryOffset=QuantLib::Null< QuantLib::Natural >(), const QuantLib::ext::optional< std::pair< Calendar, Real > > &offPeakPowerData=QuantLib::ext::nullopt)
PriceHelper interface
QuantLib::Real impliedQuote () const override
void setTermStructure (PriceTermStructure *ts) override
Visitability
void accept (QuantLib::AcyclicVisitor &v) override

Inspectors

QuantLib::ext::shared_ptr< CommodityIndexedAverageCashFlowaverageCashflow () const
void deepUpdate () override

Detailed Description

Helper for bootstrapping using prices that are the average of future settlement prices over a period.

Constructor & Destructor Documentation

◆ AverageFuturePriceHelper() [1/2]

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::Integer futureMonthOffset = 0,
bool useBusinessDays = true,
QuantLib::Natural dailyExpiryOffset = QuantLib::Null< QuantLib::Natural >(),
const QuantLib::ext::optional< std::pair< Calendar, Real > > & offPeakPowerData = QuantLib::ext::nullopt )
Parameters
priceThe average price quote.
indexThe commodity index. Used to convey the commodity's name and calendar. The underlying averaging cashflow may reference more than one commodity future indices.
startThe start date of the averaging period. The averaging period includes the start date if it is a pricing date according to the calendar.
endThe end date of the averaging period. The averaging period includes the end date if it is a pricing date according to the calendar.
calcA FutureExpiryCalculator instance.
calendarThe calendar used to determine pricing dates in the averaging period. If not provided, the index calendar is used.
deliveryDateRollThe number of pricing days before the prompt future expiry date on which to roll to using the next future contract in the averaging.
futureMonthOffsetUse a positive integer to select a non-prompt future contract in the averaging.
useBusinessDaysIf set to false, the averaging happens on the complement of the pricing calendar dates in the period. This is useful for some electricity futures.
dailyExpiryOffsetIf set to Null<Natural>(), this is ignored. If set to a positive integer, it is the number of business days on the index calendar to offset each daily expiry date on each pricing date.

◆ AverageFuturePriceHelper() [2/2]

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::Integer futureMonthOffset = 0,
bool useBusinessDays = true,
QuantLib::Natural dailyExpiryOffset = QuantLib::Null< QuantLib::Natural >(),
const QuantLib::ext::optional< std::pair< Calendar, Real > > & offPeakPowerData = QuantLib::ext::nullopt )
Parameters
priceThe average price.
indexThe commodity index. Used to convey the commodity's name and calendar. The underlying averaging cashflow may reference more than one commodity future indices.
startThe start date of the averaging period. The averaging period includes the start date if it is a pricing date according to the calendar.
endThe end date of the averaging period. The averaging period includes the end date if it is a pricing date according to the calendar.
calcA FutureExpiryCalculator instance.
calendarThe calendar used to determine pricing dates in the averaging period. If not provided, the index calendar is used.
deliveryDateRollThe number of pricing days before the prompt future expiry date on which to roll to using the next future contract in the averaging.
futureMonthOffsetUse a positive integer to select a non-prompt future contract in the averaging.
useBusinessDaysIf set to false, the averaging happens on the complement of the pricing calendar dates in the period. This is useful for some electricity futures.
dailyExpiryOffsetIf set to Null<Natural>(), this is ignored. If set to a positive integer, it is the number of business days on the index calendar to offset each daily expiry date on each pricing date.
offPeakPowerDataOptional data for off-peak power averaging futures. Contains the Holiday calendar number of offpeak hours on a workday. Used for compute the average hourly price from the daily price fixings.