Commodity Swaption Engine base class. More...
#include <qle/pricingengines/commodityswaptionengine.hpp>
Public Member Functions | |
CommoditySwaptionBaseEngine (const Handle< YieldTermStructure > &discountCurve, const Handle< QuantLib::BlackVolTermStructure > &vol, Real beta=0.0) | |
Protected Member Functions | |
QuantLib::Size | fixedLegIndex () const |
QuantLib::Real | fixedLegValue (QuantLib::Size fixedLegIndex) const |
Give back the fixed leg price at the swaption expiry time. | |
QuantLib::Real | strike (QuantLib::Size fixedLegIndex) const |
QuantLib::Real | rho (const QuantLib::Date &ed_1, const QuantLib::Date &ed_2) const |
bool | averaging (QuantLib::Size floatLegIndex) const |
Protected Attributes | |
Handle< YieldTermStructure > | discountCurve_ |
Handle< QuantLib::BlackVolTermStructure > | volStructure_ |
Real | beta_ |
Commodity Swaption Engine base class.
Correlation is parametrized as rho(s, t) = exp(-beta * abs(s - t)) where s and t are times to futures expiry. This is described in detail in the ORE+ Product Catalogue.
|
protected |
Performs checks on the underlying swap to ensure that:
|
protected |
Need a strike price when querying the volatility surface in certain calculations. We take this as the first fixed leg period amount divided by the first floating leg quantity.
|
protected |
Return the correlation between two future expiry dates ed_1
and ed_2
|
protected |
Return true
if floating leg is averaging, otherwise false.