Numerical engine for balance guaranteed swaps using a flexi swap proxy in the LGM model. More...
#include <qle/pricingengines/numericlgmbgsflexiswapengine.hpp>
Public Member Functions | |
NumericLgmBgsFlexiSwapEngine (const QuantLib::ext::shared_ptr< LinearGaussMarkovModel > &model, const Real sy, const Size ny, const Real sx, const Size nx, const Handle< Quote > &minCpr, const Handle< Quote > &maxCpr, const Handle< YieldTermStructure > &discountCurve=Handle< YieldTermStructure >(), const Method method=Method::Automatic, const Real singleSwaptionThreshold=20.0) | |
Public Member Functions inherited from NumericLgmFlexiSwapEngineBase | |
NumericLgmFlexiSwapEngineBase (const QuantLib::ext::shared_ptr< LinearGaussMarkovModel > &model, const Real sy, const Size ny, const Real sx, const Size nx, const Handle< YieldTermStructure > &discountCurve=Handle< YieldTermStructure >(), const Method method=Method::Automatic, const Real singleSwaptionThreshold=20.0) | |
Public Member Functions inherited from LgmConvolutionSolver | |
LgmConvolutionSolver (const QuantLib::ext::shared_ptr< LinearGaussMarkovModel > &model, const Real sy, const Size ny, const Real sx, const Size nx) | |
Numerical convolution solver for the LGM model. More... | |
Size | gridSize () const |
std::vector< Real > | stateGrid (const Real t) const |
template<typename ValueType = Real> | |
std::vector< ValueType > | rollback (const std::vector< ValueType > &v, const Real t1, const Real t0, const ValueType zero=ValueType(0.0)) const |
const QuantLib::ext::shared_ptr< LinearGaussMarkovModel > & | model () const |
Private Member Functions | |
void | calculate () const override |
Private Attributes | |
const Handle< Quote > | minCpr_ |
const Handle< Quote > | maxCpr_ |
Additional Inherited Members | |
Public Types inherited from NumericLgmFlexiSwapEngineBase | |
enum class | Method { SwaptionArray , SingleSwaptions , Automatic } |
Protected Member Functions inherited from NumericLgmFlexiSwapEngineBase | |
std::pair< Real, Real > | calculate () const |
Real | underlyingValue (const Real, const Real, const Date &, const Size, const Size, const Real, const Real) const |
Protected Attributes inherited from NumericLgmFlexiSwapEngineBase | |
const Handle< YieldTermStructure > | discountCurve_ |
const Method | method_ |
const Real | singleSwaptionThreshold_ |
QuantLib::ext::shared_ptr< IborIndex > | iborModelIndex_ |
QuantLib::ext::shared_ptr< LgmImpliedYieldTermStructure > | iborModelCurve_ |
VanillaSwap::Type | type |
std::vector< Real > | fixedNominal |
std::vector< Real > | floatingNominal |
std::vector< Date > | fixedResetDates |
std::vector< Date > | fixedPayDates |
std::vector< Time > | floatingAccrualTimes |
std::vector< Date > | floatingResetDates |
std::vector< Date > | floatingFixingDates |
std::vector< Date > | floatingPayDates |
std::vector< Real > | fixedCoupons |
std::vector< Real > | fixedRate |
std::vector< Real > | floatingGearings |
std::vector< Real > | floatingSpreads |
std::vector< Real > | cappedRate |
std::vector< Real > | flooredRate |
std::vector< Real > | floatingCoupons |
QuantLib::ext::shared_ptr< IborIndex > | iborIndex |
std::vector< Real > | lowerNotionalBound |
QuantLib::Position::Type | optionPosition |
std::vector< bool > | notionalCanBeDecreased |
Numerical engine for balance guaranteed swaps using a flexi swap proxy in the LGM model.
Two notional schedules are constructed using a simple prepayment model with rates minCpr and maxCpr. These two schedules define a lower / upper notional bounds of a flexi swap. The NPV of this flexi swap is by definition the NPV of the BGS itself.
The prepayment model assumes that prepayments amortise the tranches in the order of their seniority.
Notice that prepayments start in the first period of the tranche nominal schedule that has a start date that lies in the future. Therefore the tranche notionals in the BGS should contain past (known) prepayments already, only for future periods the notionals should be given under a zero CPR assumption.
Definition at line 42 of file numericlgmbgsflexiswapengine.hpp.
NumericLgmBgsFlexiSwapEngine | ( | const QuantLib::ext::shared_ptr< LinearGaussMarkovModel > & | model, |
const Real | sy, | ||
const Size | ny, | ||
const Real | sx, | ||
const Size | nx, | ||
const Handle< Quote > & | minCpr, | ||
const Handle< Quote > & | maxCpr, | ||
const Handle< YieldTermStructure > & | discountCurve = Handle<YieldTermStructure>() , |
||
const Method | method = Method::Automatic , |
||
const Real | singleSwaptionThreshold = 20.0 |
||
) |
Definition at line 25 of file numericlgmbgsflexiswapengine.cpp.
|
overrideprivate |
Definition at line 50 of file numericlgmbgsflexiswapengine.cpp.
|
private |
Definition at line 53 of file numericlgmbgsflexiswapengine.hpp.
|
private |
Definition at line 53 of file numericlgmbgsflexiswapengine.hpp.