Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | List of all members
NumericLgmFlexiSwapEngine Class Reference

#include <qle/pricingengines/numericlgmflexiswapengine.hpp>

+ Inheritance diagram for NumericLgmFlexiSwapEngine:
+ Collaboration diagram for NumericLgmFlexiSwapEngine:

Public Member Functions

 NumericLgmFlexiSwapEngine (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 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
 

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< LgmImpliedYieldTermStructureiborModelCurve_
 
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< boolnotionalCanBeDecreased
 

Detailed Description

Definition at line 98 of file numericlgmflexiswapengine.hpp.

Constructor & Destructor Documentation

◆ NumericLgmFlexiSwapEngine()

NumericLgmFlexiSwapEngine ( 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 
)

Definition at line 362 of file numericlgmflexiswapengine.cpp.

366 : NumericLgmFlexiSwapEngineBase(model, sy, ny, sx, nx, discountCurve, method, singleSwaptionThreshold) {
367 registerWith(this->model());
368 registerWith(discountCurve_);
369} // NumericLgmFlexiSwapEngine::NumericLgmFlexiSwapEngine
const QuantLib::ext::shared_ptr< LinearGaussMarkovModel > & model() const
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)
const Handle< YieldTermStructure > discountCurve_
+ Here is the call graph for this function:

Member Function Documentation

◆ calculate()

void calculate ( ) const
overrideprivate

Definition at line 371 of file numericlgmflexiswapengine.cpp.

371 {
372 // set arguments in base engine
373 type = arguments_.type;
374 fixedNominal = arguments_.fixedNominal;
375 floatingNominal = arguments_.floatingNominal;
376 fixedResetDates = arguments_.fixedResetDates;
377 fixedPayDates = arguments_.fixedPayDates;
378 floatingAccrualTimes = arguments_.floatingAccrualTimes;
379 floatingResetDates = arguments_.floatingResetDates;
380 floatingFixingDates = arguments_.floatingFixingDates;
381 floatingPayDates = arguments_.floatingPayDates;
382 fixedCoupons = arguments_.fixedCoupons;
383 fixedRate = arguments_.fixedRate;
384 floatingGearings = arguments_.floatingGearings;
385 floatingSpreads = arguments_.floatingSpreads;
386 cappedRate = arguments_.cappedRate;
387 flooredRate = arguments_.flooredRate;
388 floatingCoupons = arguments_.floatingCoupons;
389 iborIndex = arguments_.iborIndex;
390 lowerNotionalBound = arguments_.lowerNotionalBound;
391 optionPosition = arguments_.optionPosition;
392 notionalCanBeDecreased = arguments_.notionalCanBeDecreased;
393
394 // calculate and set results
396 results_.value = result.first;
397 results_.underlyingValue = result.second;
398 results_.additionalResults = getAdditionalResultsMap(model()->getCalibrationInfo());
399} // NumericLgmFlexiSwapEngine::calculate
const Instrument::results * results_
Definition: cdsoption.cpp:81
QuantLib::ext::shared_ptr< IborIndex > iborIndex
std::map< std::string, boost::any > getAdditionalResultsMap(const LgmCalibrationInfo &info)
Swap::arguments * arguments_
+ Here is the call graph for this function: