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

#include <qle/termstructures/averagespotpricehelper.hpp>

+ Inheritance diagram for AverageSpotPriceHelper:

Public Member Functions

Constructors
 AverageSpotPriceHelper (const QuantLib::Handle< QuantLib::Quote > &price, const boost::shared_ptr< CommoditySpotIndex > &index, const QuantLib::Date &start, const QuantLib::Date &end, const QuantLib::Calendar &calendar=QuantLib::Calendar(), bool useBusinessDays=true)
 
 AverageSpotPriceHelper (QuantLib::Real price, const boost::shared_ptr< CommoditySpotIndex > &index, const QuantLib::Date &start, const QuantLib::Date &end, const QuantLib::Calendar &calendar=QuantLib::Calendar(), bool useBusinessDays=true)
 
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
 

Detailed Description

Helper for bootstrapping using prices that are the average of a spot price over a period.

Constructor & Destructor Documentation

◆ AverageSpotPriceHelper() [1/2]

AverageSpotPriceHelper ( const QuantLib::Handle< QuantLib::Quote > &  price,
const boost::shared_ptr< CommoditySpotIndex > &  index,
const QuantLib::Date &  start,
const QuantLib::Date &  end,
const QuantLib::Calendar &  calendar = QuantLib::Calendar(),
bool  useBusinessDays = true 
)
Parameters
priceThe average price quote.
indexThe commodity spot index.
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.
calendarThe calendar used to determine pricing dates in the averaging period. If not provided, the index calendar is used.
useBusinessDaysIf set to false, the averaging happens on the complement of the pricing calendar dates in the period.

◆ AverageSpotPriceHelper() [2/2]

AverageSpotPriceHelper ( QuantLib::Real  price,
const boost::shared_ptr< CommoditySpotIndex > &  index,
const QuantLib::Date &  start,
const QuantLib::Date &  end,
const QuantLib::Calendar &  calendar = QuantLib::Calendar(),
bool  useBusinessDays = true 
)
Parameters
priceThe average price.
indexThe commodity spot index.
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.
calendarThe calendar used to determine pricing dates in the averaging period. If not provided, the index calendar is used.
useBusinessDaysIf set to false, the averaging happens on the complement of the pricing calendar dates in the period.