#include <qle/instruments/commodityforward.hpp>
Inheritance diagram for CommodityForward:
Collaboration 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 | |
| QuantLib::ext::shared_ptr< CommodityIndex > | index_ |
| QuantLib::Currency | currency_ |
| QuantLib::Position::Type | position_ |
| QuantLib::Real | quantity_ |
| QuantLib::Date | maturityDate_ |
| QuantLib::Real | strike_ |
| bool | physicallySettled_ |
| QuantLib::Date | paymentDate_ |
| Currency | payCcy_ |
| QuantLib::ext::shared_ptr< FxIndex > | fxIndex_ |
| Date | fixingDate_ |
| 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.
Definition at line 40 of file commodityforward.hpp.
| 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 |
Definition at line 28 of file commodityforward.cpp.
Here is the call graph for this function:
|
override |
Definition at line 61 of file commodityforward.cpp.
Here is the caller graph for this function:
|
override |
Definition at line 69 of file commodityforward.cpp.
| 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 |
Definition at line 85 of file commodityforward.hpp.
| const QuantLib::Date & paymentDate | ( | ) | const |
Definition at line 86 of file commodityforward.hpp.
| Currency payCcy | ( | ) | const |
Definition at line 87 of file commodityforward.hpp.
| Date fixingDate | ( | ) | const |
Definition at line 88 of file commodityforward.hpp.
| QuantLib::ext::shared_ptr< QuantExt::FxIndex > fxIndex | ( | ) | const |
Definition at line 89 of file commodityforward.hpp.
|
private |
Definition at line 93 of file commodityforward.hpp.
|
private |
Definition at line 94 of file commodityforward.hpp.
|
private |
Definition at line 95 of file commodityforward.hpp.
|
private |
Definition at line 96 of file commodityforward.hpp.
|
private |
Definition at line 97 of file commodityforward.hpp.
|
private |
Definition at line 98 of file commodityforward.hpp.
|
private |
Definition at line 99 of file commodityforward.hpp.
|
private |
Definition at line 100 of file commodityforward.hpp.
|
private |
Definition at line 101 of file commodityforward.hpp.
|
private |
Definition at line 102 of file commodityforward.hpp.
|
private |
Definition at line 103 of file commodityforward.hpp.