Logo
Reference manual - version qle_version
List of all members
AverageFuturePriceHelper Class Reference

#include <qle/termstructures/averagefuturepricehelper.hpp>

+ Inheritance diagram for AverageFuturePriceHelper:

Public Member Functions

Constructors
 AverageFuturePriceHelper (const QuantLib::Handle< QuantLib::Quote > &price, const boost::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 >())
 
 AverageFuturePriceHelper (QuantLib::Real price, const boost::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 >())
 
PriceHelper interface
QuantLib::Real impliedQuote () const override
 
void setTermStructure (PriceTermStructure *ts) override
 
Visitability
void accept (QuantLib::AcyclicVisitor &v) override
 

Inspectors

boost::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 boost::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 >() 
)
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 boost::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 >() 
)
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.