Analytic LGM swaption engine for european exercise. More...
#include <qle/pricingengines/analyticlgmswaptionengine.hpp>
Public Types | |
| enum class | FloatSpreadMapping { nextCoupon , proRata , simple } |
Public Member Functions | |
| AnalyticLgmSwaptionEngine (const QuantLib::ext::shared_ptr< LinearGaussMarkovModel > &model, const Handle< YieldTermStructure > &discountCurve=Handle< YieldTermStructure >(), const FloatSpreadMapping floatSpreadMapping=FloatSpreadMapping::proRata, const Real x0=0.0) | |
| AnalyticLgmSwaptionEngine (const QuantLib::ext::shared_ptr< CrossAssetModel > &model, const Size ccy, const Handle< YieldTermStructure > &discountCurve=Handle< YieldTermStructure >(), const FloatSpreadMapping floatSpreadMapping=FloatSpreadMapping::proRata, const Real x0=0.0) | |
| AnalyticLgmSwaptionEngine (const QuantLib::ext::shared_ptr< IrLgm1fParametrization > irlgm1f, const Handle< YieldTermStructure > &discountCurve=Handle< YieldTermStructure >(), const FloatSpreadMapping floatSpreadMapping=FloatSpreadMapping::proRata, const Real x0=0.0) | |
| void | calculate () const override |
| void | enableCache (const bool lgm_H_constant=true, const bool lgm_alpha_constant=false) |
| void | clearCache () |
| void | setZetaShift (const Time t1, const Real shift) |
| void | resetZetaShift () |
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:
[1] Hagan, Evaluating and hedging exotic swap instruments via LGM
[2] 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).
The reference date of the LGM model defines t = 0. The reference date of the discountCurve defines the valuation time t. If t > 0 the calculated npv is conditional on x(t) = x0 and inflated, i.e. we calculate
N(t, x0) E( V(T) / N(T) | x(t) = x0 )
If no discount curve is specified, the LGM model's curve is used as the discount curve. In this case, the valuation time is 0 and the parameter x0 is ignored.
|
strong |
For nextCoupon, proRata cf. Lichters, Stamm, Gallagher (2015), 11.2.2, where these methods are called Mapping A and Mapping B respectively.
The method "simple" determines the difference between the flat amount (see documentation of flatAmount() method below) and the actual floating coupon amount npv on the float leg and from that a fixed leg rate correction by dividing the difference by the fixed leg annuity.
| AnalyticLgmSwaptionEngine | ( | const QuantLib::ext::shared_ptr< LinearGaussMarkovModel > & | model, |
| const Handle< YieldTermStructure > & | discountCurve = Handle< YieldTermStructure >(), | ||
| const FloatSpreadMapping | floatSpreadMapping = FloatSpreadMapping::proRata, | ||
| const Real | x0 = 0.0 ) |
Lgm model based constructor
| AnalyticLgmSwaptionEngine | ( | const QuantLib::ext::shared_ptr< CrossAssetModel > & | model, |
| const Size | ccy, | ||
| const Handle< YieldTermStructure > & | discountCurve = Handle< YieldTermStructure >(), | ||
| const FloatSpreadMapping | floatSpreadMapping = FloatSpreadMapping::proRata, | ||
| const Real | x0 = 0.0 ) |
CrossAsset model based constructor
| AnalyticLgmSwaptionEngine | ( | const QuantLib::ext::shared_ptr< IrLgm1fParametrization > | irlgm1f, |
| const Handle< YieldTermStructure > & | discountCurve = Handle< YieldTermStructure >(), | ||
| const FloatSpreadMapping | floatSpreadMapping = FloatSpreadMapping::proRata, | ||
| const Real | x0 = 0.0 ) |
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
| void setZetaShift | ( | const Time | t1, |
| const Real | shift ) |
set a zeta shift to be added until t1, shift is given for unit time
| void resetZetaShift | ( | ) |
reset zeta shift