Logo
Reference manual - version qle_version
CommodityForward Class Reference

#include <qle/instruments/commodityforward.hpp>

Inheritance diagram for CommodityForward:

Classes

class  arguments
class  engine

Public Member Functions

Constructors
 CommodityForward (const QuantLib::ext::shared_ptr< CommodityIndex > &index, const QuantLib::Currency &currency, QuantLib::Position::Type position, QuantLib::Real quantity, const QuantLib::Date &maturityDate, QuantLib::Real strike, bool physicallySettled=true, const Date &paymentDate=Date(), const QuantLib::Currency &payCcy=Currency(), const Date &fixingDate=Date(), const QuantLib::ext::shared_ptr< QuantExt::FxIndex > &fxIndex=nullptr)
Instrument interface
bool isExpired () const override
void setupArguments (QuantLib::PricingEngine::arguments *) const override

Inspectors

const QuantLib::ext::shared_ptr< CommodityIndex > & index () const
const QuantLib::Currency & currency () const
QuantLib::Position::Type position () const
QuantLib::Real quantity () const
const QuantLib::Date & maturityDate () const
QuantLib::Real strike () const
bool physicallySettled () const
const QuantLib::Date & paymentDate () const
Currency payCcy () const
Date fixingDate () const
QuantLib::ext::shared_ptr< QuantExt::FxIndexfxIndex () const

Detailed Description

Instrument representing a commodity forward contract.

Constructor & Destructor Documentation

◆ CommodityForward()

CommodityForward ( const QuantLib::ext::shared_ptr< CommodityIndex > & index,
const QuantLib::Currency & currency,
QuantLib::Position::Type position,
QuantLib::Real quantity,
const QuantLib::Date & maturityDate,
QuantLib::Real strike,
bool physicallySettled = true,
const Date & paymentDate = Date(),
const QuantLib::Currency & payCcy = Currency(),
const Date & fixingDate = Date(),
const QuantLib::ext::shared_ptr< QuantExt::FxIndex > & fxIndex = nullptr )

Constructs a cash settled or physically settled commodity forward instrument.

Parameters
indexThe underlying commodity index.
currencyThe currency of the commodity trade.
positionLong (Short) for buying (selling) commodity forward
quantityNumber of underlying commodity units referenced
maturityDateMaturity date of forward. For a cash settled forward, this is the date on which the underlying price is observed.
strikeThe agreed forward price
physicallySettledSet to true if the forward is physically settled and false if the forward is cash settled. If omitted, physical settlement is assumed.
paymentDateIf the forward is cash settled, provide a date on or after the maturityDate for the cash settlement payment. If omitted, it is assumed equal to maturityDate.
payCcyIf cash settled, the settlement currency
fixingDateIf cash settled, the fixing date
fxIndexIf cash settled, the FX index from which to take the fixing on the fixing date