Analytic LGM swaption engine for european exercise. More...
#include <qle/pricingengines/analyticlgmswaptionengine.hpp>
Public Types | |
enum | FloatSpreadMapping { nextCoupon , proRata , simple } |
Public Member Functions | |
AnalyticLgmSwaptionEngine (const QuantLib::ext::shared_ptr< LinearGaussMarkovModel > &model, const Handle< YieldTermStructure > &discountCurve=Handle< YieldTermStructure >(), const FloatSpreadMapping floatSpreadMapping=proRata) | |
AnalyticLgmSwaptionEngine (const QuantLib::ext::shared_ptr< CrossAssetModel > &model, const Size ccy, const Handle< YieldTermStructure > &discountCurve=Handle< YieldTermStructure >(), const FloatSpreadMapping floatSpreadMapping=proRata) | |
AnalyticLgmSwaptionEngine (const QuantLib::ext::shared_ptr< IrLgm1fParametrization > irlgm1f, const Handle< YieldTermStructure > &discountCurve=Handle< YieldTermStructure >(), const FloatSpreadMapping floatSpreadMapping=proRata) | |
void | calculate () const override |
void | enableCache (const bool lgm_H_constant=true, const bool lgm_alpha_constant=false) |
void | clearCache () |
Private Member Functions | |
Real | flatAmount (const Size k) const |
Real | yStarHelper (const Real y) const |
Private Attributes | |
QuantLib::ext::shared_ptr< IrLgm1fParametrization > | p_ |
Handle< YieldTermStructure > | c_ |
FloatSpreadMapping | floatSpreadMapping_ |
bool | caching_ |
bool | lgm_H_constant_ |
bool | lgm_alpha_constant_ |
Real | H0_ |
Real | D0_ |
Real | zetaex_ |
Real | S_m1 |
Real | u_ |
Real | w_ |
std::vector< Real > | S_ |
std::vector< Real > | Hj_ |
std::vector< Real > | Dj_ |
Size | j1_ |
Size | k1_ |
std::vector< QuantLib::ext::shared_ptr< FixedRateCoupon > > | fixedLeg_ |
std::vector< QuantLib::ext::shared_ptr< FloatingRateCoupon > > | floatingLeg_ |
Real | nominal_ |
Analytic LGM swaption engine for european exercise.
All fixed coupons with start date greater or equal to the respective option expiry are considered to be part of the exercise into right.
References:
Hagan, Evaluating and hedging exotic swap instruments via LGM
Lichters, Stamm, Gallagher: Modern Derivatives Pricing and Credit Exposure Analysis, Palgrave Macmillan, 2015, 11.2.2
The basis between the given discounting curve (or - if not given - the model curve) and the forwarding curve attached to the underlying swap's ibor index is taken into account by a static correction spread for the underlying's fixed leg. Likewise a spread on the floating leg is taken into account.
Note that we assume H' does not change its sign, but this is a general requirement of the LGM parametrization anyway (see the base parametrization class).
Definition at line 64 of file analyticlgmswaptionengine.hpp.
enum FloatSpreadMapping |
nextCoupon is Mapping A, proRata is Mapping B in Lichters, Stamm, Gallagher (2015), 11.2.2
Enumerator | |
---|---|
nextCoupon | |
proRata | |
simple |
Definition at line 69 of file analyticlgmswaptionengine.hpp.
AnalyticLgmSwaptionEngine | ( | const QuantLib::ext::shared_ptr< LinearGaussMarkovModel > & | model, |
const Handle< YieldTermStructure > & | discountCurve = Handle<YieldTermStructure>() , |
||
const FloatSpreadMapping | floatSpreadMapping = proRata |
||
) |
Lgm model based constructor
Definition at line 31 of file analyticlgmswaptionengine.cpp.
AnalyticLgmSwaptionEngine | ( | const QuantLib::ext::shared_ptr< CrossAssetModel > & | model, |
const Size | ccy, | ||
const Handle< YieldTermStructure > & | discountCurve = Handle<YieldTermStructure>() , |
||
const FloatSpreadMapping | floatSpreadMapping = proRata |
||
) |
CrossAsset model based constructor
Definition at line 41 of file analyticlgmswaptionengine.cpp.
AnalyticLgmSwaptionEngine | ( | const QuantLib::ext::shared_ptr< IrLgm1fParametrization > | irlgm1f, |
const Handle< YieldTermStructure > & | discountCurve = Handle<YieldTermStructure>() , |
||
const FloatSpreadMapping | floatSpreadMapping = proRata |
||
) |
parametrization based constructor, note that updates in the parametrization are not observed by the engine, you would have to call update() on the engine explicitly
Definition at line 51 of file analyticlgmswaptionengine.cpp.
|
override |
Definition at line 123 of file analyticlgmswaptionengine.cpp.
Definition at line 60 of file analyticlgmswaptionengine.cpp.
void clearCache | ( | ) |
Definition at line 67 of file analyticlgmswaptionengine.cpp.
|
private |
Definition at line 73 of file analyticlgmswaptionengine.cpp.
|
private |
|
private |
Definition at line 100 of file analyticlgmswaptionengine.hpp.
|
private |
Definition at line 101 of file analyticlgmswaptionengine.hpp.
|
mutableprivate |
Definition at line 102 of file analyticlgmswaptionengine.hpp.
|
private |
Definition at line 103 of file analyticlgmswaptionengine.hpp.
|
private |
Definition at line 103 of file analyticlgmswaptionengine.hpp.
|
private |
Definition at line 103 of file analyticlgmswaptionengine.hpp.
|
mutableprivate |
Definition at line 104 of file analyticlgmswaptionengine.hpp.
|
private |
Definition at line 104 of file analyticlgmswaptionengine.hpp.
|
private |
Definition at line 104 of file analyticlgmswaptionengine.hpp.
|
private |
Definition at line 104 of file analyticlgmswaptionengine.hpp.
|
private |
Definition at line 104 of file analyticlgmswaptionengine.hpp.
|
private |
Definition at line 104 of file analyticlgmswaptionengine.hpp.
|
mutableprivate |
Definition at line 105 of file analyticlgmswaptionengine.hpp.
|
private |
Definition at line 105 of file analyticlgmswaptionengine.hpp.
|
private |
Definition at line 105 of file analyticlgmswaptionengine.hpp.
|
mutableprivate |
Definition at line 106 of file analyticlgmswaptionengine.hpp.
|
private |
Definition at line 106 of file analyticlgmswaptionengine.hpp.
|
mutableprivate |
Definition at line 107 of file analyticlgmswaptionengine.hpp.
|
mutableprivate |
Definition at line 108 of file analyticlgmswaptionengine.hpp.
|
mutableprivate |
Definition at line 109 of file analyticlgmswaptionengine.hpp.