6QuantLib::ext::shared_ptr<CashFlow>
8 const QuantLib::ext::shared_ptr<CommodityIndex>& baseIndex,
9 const QuantLib::ext::shared_ptr<FutureExpiryCalculator>& baseFec,
bool baseIsAveraging,
10 const QuantLib::Date& paymentDate) {
11 if (baseIsAveraging ==
true) {
12 return QuantLib::ext::make_shared<CommodityIndexedAverageCashFlow>(
13 1.0, start, end, paymentDate, baseIndex, QuantLib::Calendar(), 0.0, 1.0,
true, 0, 0, baseFec);
15 return QuantLib::ext::make_shared<CommodityIndexedCashFlow>(
16 1.0, start, end, baseIndex, 0, QuantLib::NullCalendar(), QuantLib::Unadjusted, 0,
18 baseFec, paymentDate);
some commodity related utilities.
QuantLib::ext::shared_ptr< CashFlow > makeCommodityCashflowForBasisFuture(const QuantLib::Date &start, const QuantLib::Date &end, const QuantLib::ext::shared_ptr< CommodityIndex > &baseIndex, const QuantLib::ext::shared_ptr< FutureExpiryCalculator > &baseFec, bool baseIsAveraging, const QuantLib::Date &paymentDate)
Make a commodity indexed cashflow.