Commodity Swaption Engine base class. More...
#include <qle/pricingengines/commodityswaptionengine.hpp>
Inheritance diagram for CommoditySwaptionBaseEngine:
Collaboration diagram for CommoditySwaptionBaseEngine: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. More... | |
| 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.
Definition at line 39 of file commodityswaptionengine.hpp.
| CommoditySwaptionBaseEngine | ( | const Handle< YieldTermStructure > & | discountCurve, |
| const Handle< QuantLib::BlackVolTermStructure > & | vol, | ||
| Real | beta = 0.0 |
||
| ) |
Definition at line 77 of file commodityswaptionengine.cpp.
|
protected |
Performs checks on the underlying swap to ensure that:
Definition at line 85 of file commodityswaptionengine.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
protected |
Give back the fixed leg price at the swaption expiry time.
Definition at line 114 of file commodityswaptionengine.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
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.
Definition at line 131 of file commodityswaptionengine.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
protected |
Return the correlation between two future expiry dates ed_1 and ed_2
Definition at line 149 of file commodityswaptionengine.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
protected |
Return true if floating leg is averaging, otherwise false.
Definition at line 160 of file commodityswaptionengine.cpp.
Here is the caller graph for this function:
|
protected |
Definition at line 69 of file commodityswaptionengine.hpp.
|
protected |
Definition at line 70 of file commodityswaptionengine.hpp.
|
protected |
Definition at line 71 of file commodityswaptionengine.hpp.