#include <qle/cashflows/nettedcommoditycashflow.hpp>
Public Member Functions | |
| NettedCommodityCashFlow (const std::vector< QuantLib::ext::shared_ptr< CommodityCashFlow > > &underlyingCashflows, const std::vector< bool > &isPayer, QuantLib::Natural nettingPrecision=QuantLib::Null< QuantLib::Natural >()) | |
Inspectors | |
| const std::vector< QuantLib::ext::shared_ptr< CommodityCashFlow > > & | underlyingCashflows () const |
| QuantLib::Natural | nettingPrecision () const |
CommodityCashFlow interface | |
| const std::vector< std::pair< QuantLib::Date, QuantLib::ext::shared_ptr< CommodityIndex > > > & | indices () const override |
| Return a map of pricing date and corresponding commodity index. | |
| QuantLib::Date | lastPricingDate () const override |
| QuantLib::Real | periodQuantity () const override |
| QuantLib::Real | fixing () const override |
CashFlow interface | |
| QuantLib::Real | amount () const override |
Event interface | |
| QuantLib::Date | date () const override |
Observer interface | |
| void | update () override |
| void | deepUpdate () override |
| Public Member Functions inherited from CommodityCashFlow | |
| CommodityCashFlow (QuantLib::Real quantity, QuantLib::Real spread, QuantLib::Real gearing, bool useFuturePrice, const ext::shared_ptr< CommodityIndex > &index, const ext::shared_ptr< FxIndex > &fxIndex) | |
| QuantLib::Real | quantity () const |
| QuantLib::Real | spread () const |
| QuantLib::Real | gearing () const |
| bool | useFuturePrice () const |
| ext::shared_ptr< CommodityIndex > | index () const |
| ext::shared_ptr< FxIndex > | fxIndex () const |
| void | accept (QuantLib::AcyclicVisitor &v) override |
Visitability | |
| void | accept (QuantLib::AcyclicVisitor &v) override |
Additional Inherited Members | |
| QuantLib::Real | quantity_ |
| QuantLib::Real | spread_ |
| QuantLib::Real | gearing_ |
| bool | useFuturePrice_ |
| ext::shared_ptr< CommodityIndex > | index_ |
| ext::shared_ptr< FxIndex > | fxIndex_ |
| QuantLib::Real | amount_ |
Cash flow that aggregates multiple commodity floating leg cashflows for netting.
This class takes a collection of commodity floating leg cashflows that have the same payment date and creates a single netted cashflow. The netting logic:
| NettedCommodityCashFlow | ( | const std::vector< QuantLib::ext::shared_ptr< CommodityCashFlow > > & | underlyingCashflows, |
| const std::vector< bool > & | isPayer, | ||
| QuantLib::Natural | nettingPrecision = QuantLib::Null< QuantLib::Natural >() ) |
Constructor
| underlyingCashflows | Vector of containing the underlying commodity cashflows |
| isPayer | their payer flags |
| nettingPrecision | Number of decimal places to round the total average fixing to (Null<Natural>() means no rounding) |
|
overridevirtual |
Return a map of pricing date and corresponding commodity index.
Implements CommodityCashFlow.
|
overridevirtual |
Implements CommodityCashFlow.
|
overridevirtual |
Implements CommodityCashFlow.
|
overridevirtual |
Implements CommodityCashFlow.