Commodity Swaption Analytical Engine. More...
#include <qle/pricingengines/commodityswaptionengine.hpp>
Public Member Functions | |
CommoditySwaptionEngine (const Handle< YieldTermStructure > &discountCurve, const Handle< QuantLib::BlackVolTermStructure > &vol, Real beta=0.0) | |
void | calculate () const override |
Public Member Functions inherited from CommoditySwaptionBaseEngine | |
CommoditySwaptionBaseEngine (const Handle< YieldTermStructure > &discountCurve, const Handle< QuantLib::BlackVolTermStructure > &vol, Real beta=0.0) | |
Private Member Functions | |
QuantLib::Real | expA (QuantLib::Size floatLegIndex, QuantLib::Real normFactor) const |
QuantLib::Real | expASquared (QuantLib::Size floatLegIndex, QuantLib::Real strike, QuantLib::Real normFactor) const |
QuantLib::Real | crossTerms (const QuantLib::ext::shared_ptr< QuantLib::CashFlow > &cf_1, const QuantLib::ext::shared_ptr< QuantLib::CashFlow > &cf_2, bool isAveraging, QuantLib::Real strike, QuantLib::Real normFactor) const |
QuantLib::Real | maxQuantity (QuantLib::Size floatLegIndex) const |
Additional Inherited Members | |
Protected Member Functions inherited from CommoditySwaptionBaseEngine | |
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 inherited from CommoditySwaptionBaseEngine | |
Handle< YieldTermStructure > | discountCurve_ |
Handle< QuantLib::BlackVolTermStructure > | volStructure_ |
Real | beta_ |
Commodity Swaption Analytical Engine.
Analytical pricing based on the two-moment Turnbull-Wakeman approximation similar to APO pricing. Reference: Iain Clark, Commodity Option Pricing, Wiley, section 2.8 See also the documentation in the ORE+ product catalogue.
Definition at line 79 of file commodityswaptionengine.hpp.
CommoditySwaptionEngine | ( | const Handle< YieldTermStructure > & | discountCurve, |
const Handle< QuantLib::BlackVolTermStructure > & | vol, | ||
Real | beta = 0.0 |
||
) |
Definition at line 81 of file commodityswaptionengine.hpp.
|
override |
Definition at line 167 of file commodityswaptionengine.cpp.
|
private |
Calculate the expected value of the floating leg at the swaption expiry date i.e. the expected value of the quantity A(t_e) from the ORE+ Product Catalogue. Quantities in the calculation are divided by the normFactor
to guard against numerical blow up.
Definition at line 219 of file commodityswaptionengine.cpp.
|
private |
Calculate the expected value of the floating leg squared at the swaption expiry date i.e. the expected value of the quantity A^2(t_e) from the ORE+ Product Catalogue. Quantities in the calculation are divided by the normFactor
to guard against numerical blow up.
Definition at line 235 of file commodityswaptionengine.cpp.
|
private |
Calculate the cross terms involved in expASquared. Quantities in the calculation are divided by the normFactor
to guard against numerical blow up.
Definition at line 261 of file commodityswaptionengine.cpp.
|
private |
Return the maximum quantity over all cashflows on the commodity floating leg. This is used as a normalisation factor in the calculation of E[A(t_e)] and E[A^2(t_e)] to guard against blow up.
Definition at line 401 of file commodityswaptionengine.cpp.