#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 ¤cy, 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::FxIndex > | fxIndex () const |
Instrument representing a commodity forward contract.
| 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.
| index | The underlying commodity index. |
| currency | The currency of the commodity trade. |
| position | Long (Short) for buying (selling) commodity forward |
| quantity | Number of underlying commodity units referenced |
| maturityDate | Maturity date of forward. For a cash settled forward, this is the date on which the underlying price is observed. |
| strike | The agreed forward price |
| physicallySettled | Set to true if the forward is physically settled and false if the forward is cash settled. If omitted, physical settlement is assumed. |
| paymentDate | If 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. |
| payCcy | If cash settled, the settlement currency |
| fixingDate | If cash settled, the fixing date |
| fxIndex | If cash settled, the FX index from which to take the fixing on the fixing date |