#include <qle/pricingengines/commodityapoengine.hpp>
Public Member Functions | |
CommodityAveragePriceOptionBaseEngine (const QuantLib::Handle< QuantLib::YieldTermStructure > &discountCurve, const QuantLib::Handle< QuantExt::BlackScholesModelWrapper > &model, QuantLib::Real beta=0.0) | |
CommodityAveragePriceOptionBaseEngine (const QuantLib::Handle< QuantLib::YieldTermStructure > &discountCurve, const QuantLib::Handle< QuantLib::BlackVolTermStructure > &vol, QuantLib::Real beta=0.0) | |
Protected Member Functions | |
QuantLib::Real | rho (const QuantLib::Date &ed_1, const QuantLib::Date &ed_2) const |
Return the correlation between two future expiry dates ed_1 and ed_2 . | |
bool | isModelDependent () const |
bool | barrierTriggered (const Real price, const bool logPrice) const |
bool | alive (const bool barrierTriggered) const |
Protected Attributes | |
QuantLib::Handle< QuantLib::YieldTermStructure > | discountCurve_ |
QuantLib::Handle< QuantLib::BlackVolTermStructure > | volStructure_ |
QuantLib::Real | beta_ |
QuantLib::Real | logBarrier_ |
Commodity APO Engine base class Correlation is parametrized as \(\rho(s, t) = \exp(-\beta * \abs(s - t))\) where \(s\) and \(t\) are times to futures expiry.
|
protected |
In certain cases, the APO value is not model dependent. This method returns true
if the APO value is model dependent. If the APO value is not model dependent, this method returns false
and populates the results with the model independent value.
|
protected |
Check barriers on given (log-)price
|
protected |
Check whether option is alive depending on whether barrier was triggered