23#ifndef quantext_instruments_commodityapo_hpp
24#define quantext_instruments_commodityapo_hpp
26#include <ql/instruments/barriertype.hpp>
27#include <ql/instruments/swaption.hpp>
28#include <ql/option.hpp>
29#include <ql/exercise.hpp>
30#include <ql/termstructures/volatility/volatilitytype.hpp>
31#include <ql/termstructures/yieldtermstructure.hpp>
46 const ext::shared_ptr<Exercise>& exercise,
const Real quantity,
const Real strikePrice,
47 Option::Type type, Settlement::Type delivery = Settlement::Physical,
52 const QuantLib::ext::shared_ptr<FxIndex>&
fxIndex=
nullptr);
64 const QuantLib::ext::shared_ptr<CommodityIndexedAverageCashFlow>&
underlyingFlow()
const {
return flow_; }
71 Real
accrued(
const Date& refDate)
const;
76 QuantLib::ext::shared_ptr<CommodityIndexedAverageCashFlow>
flow_;
92 QuantLib::ext::shared_ptr<CommodityIndexedAverageCashFlow>
flow;
98 QuantLib::ext::shared_ptr<FxIndex>
fxIndex;
109 :
public GenericEngine<CommodityAveragePriceOption::arguments, CommodityAveragePriceOption::results> {};
Arguments for commodity APO calculation
QuantLib::ext::shared_ptr< FxIndex > fxIndex
Exercise::Type barrierStyle
QuantLib::ext::shared_ptr< CommodityIndexedAverageCashFlow > flow
Settlement::Method settlementMethod
Settlement::Type settlementType
void validate() const override
Barrier::Type barrierType
base class for APO engines
Commodity Average Price Option.
Barrier::Type barrierType_
Real accrued(const Date &refDate) const
QuantLib::Settlement::Type settlementType_
QuantLib::ext::shared_ptr< FxIndex > fxIndex_
void setupArguments(PricingEngine::arguments *) const override
Settlement::Type settlementType() const
bool isExpired() const override
const QuantLib::ext::shared_ptr< FxIndex > & fxIndex() const
Barrier::Type barrierType() const
QuantLib::ext::shared_ptr< CommodityIndexedAverageCashFlow > flow_
Exercise::Type barrierStyle_
QuantLib::Settlement::Method settlementMethod_
const QuantLib::ext::shared_ptr< CommodityIndexedAverageCashFlow > & underlyingFlow() const
Real barrierLevel() const
Exercise::Type barrierStyle() const
Settlement::Method settlementMethod() const
Real effectiveStrike() const
Cash flow dependent on the average commodity spot price or future's settlement price over a period....
Cash flow dependent on a single commodity spot price or future's settlement price.