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

#include <qle/pricingengines/numericlgmmultilegoptionengine.hpp>

+ Inheritance diagram for NumericLgmNonstandardSwaptionEngine:
+ Collaboration diagram for NumericLgmNonstandardSwaptionEngine:

Public Member Functions

 NumericLgmNonstandardSwaptionEngine (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 Size americanExerciseTimeStepsPerYear=24)
 
 NumericLgmNonstandardSwaptionEngine (const QuantLib::ext::shared_ptr< LinearGaussMarkovModel > &model, const Real maxTime=50.0, const QuantLib::FdmSchemeDesc scheme=QuantLib::FdmSchemeDesc::Douglas(), const Size stateGridPoints=64, const Size timeStepsPerYear=24, const Real mesherEpsilon=1E-4, const Handle< YieldTermStructure > &discountCurve=Handle< YieldTermStructure >(), const Size americanExerciseTimeStepsPerYear=24)
 
void calculate () const override
 
- Public Member Functions inherited from NumericLgmMultiLegOptionEngineBase
 NumericLgmMultiLegOptionEngineBase (const QuantLib::ext::shared_ptr< LgmBackwardSolver > &solver, const Handle< YieldTermStructure > &discountCurve=Handle< YieldTermStructure >(), const Size americanExerciseTimeStepsPerYear=24)
 

Additional Inherited Members

- Static Public Member Functions inherited from NumericLgmMultiLegOptionEngineBase
static bool instrumentIsHandled (const MultiLegOption &m, std::vector< std::string > &messages)
 
- Protected Member Functions inherited from NumericLgmMultiLegOptionEngineBase
CashflowInfo buildCashflowInfo (const Size i, const Size j) const
 
void calculate () const
 
- Static Protected Member Functions inherited from NumericLgmMultiLegOptionEngineBase
static bool instrumentIsHandled (const std::vector< Leg > &legs, const std::vector< bool > &payer, const std::vector< Currency > &currency, const QuantLib::ext::shared_ptr< Exercise > &exercise, const Settlement::Type &settlementType, const Settlement::Method &settlementMethod, std::vector< std::string > &messages)
 
- Protected Attributes inherited from NumericLgmMultiLegOptionEngineBase
QuantLib::ext::shared_ptr< LgmBackwardSolversolver_
 
Handle< YieldTermStructure > discountCurve_
 
Size americanExerciseTimeStepsPerYear_
 
std::vector< Leg > legs_
 
std::vector< boolpayer_
 
std::vector< Currency > currency_
 
QuantLib::ext::shared_ptr< Exercise > exercise_
 
Settlement::Type settlementType_
 
Settlement::Method settlementMethod_
 
Real npv_
 
Real underlyingNpv_
 
std::map< std::string, boost::any > additionalResults_
 

Detailed Description

Definition at line 123 of file numericlgmmultilegoptionengine.hpp.

Constructor & Destructor Documentation

◆ NumericLgmNonstandardSwaptionEngine() [1/2]

NumericLgmNonstandardSwaptionEngine ( 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 Size  americanExerciseTimeStepsPerYear = 24 
)

Definition at line 604 of file numericlgmmultilegoptionengine.cpp.

607 : NumericLgmMultiLegOptionEngineBase(QuantLib::ext::make_shared<LgmConvolutionSolver2>(model, sy, ny, sx, nx),
608 discountCurve, americanExerciseTimeStepsPerYear) {
609 registerWith(solver_->model());
610 registerWith(discountCurve_);
611}
QuantLib::ext::shared_ptr< LgmBackwardSolver > solver_
NumericLgmMultiLegOptionEngineBase(const QuantLib::ext::shared_ptr< LgmBackwardSolver > &solver, const Handle< YieldTermStructure > &discountCurve=Handle< YieldTermStructure >(), const Size americanExerciseTimeStepsPerYear=24)

◆ NumericLgmNonstandardSwaptionEngine() [2/2]

NumericLgmNonstandardSwaptionEngine ( const QuantLib::ext::shared_ptr< LinearGaussMarkovModel > &  model,
const Real  maxTime = 50.0,
const QuantLib::FdmSchemeDesc  scheme = QuantLib::FdmSchemeDesc::Douglas(),
const Size  stateGridPoints = 64,
const Size  timeStepsPerYear = 24,
const Real  mesherEpsilon = 1E-4,
const Handle< YieldTermStructure > &  discountCurve = Handle<YieldTermStructure>(),
const Size  americanExerciseTimeStepsPerYear = 24 
)

Definition at line 613 of file numericlgmmultilegoptionengine.cpp.

618 QuantLib::ext::make_shared<LgmFdSolver>(model, maxTime, scheme, stateGridPoints, timeStepsPerYear, mesherEpsilon),
619 discountCurve, americanExerciseTimeStepsPerYear) {
620 registerWith(solver_->model());
621 registerWith(discountCurve_);
622}

Member Function Documentation

◆ calculate()

void calculate ( ) const
override

Definition at line 624 of file numericlgmmultilegoptionengine.cpp.

624 {
625 legs_ = arguments_.legs;
626 payer_.resize(arguments_.payer.size());
627 for (Size i = 0; i < arguments_.payer.size(); ++i) {
628 payer_[i] = QuantLib::close_enough(arguments_.payer[i], -1.0);
629 }
630 currency_ = std::vector<Currency>(legs_.size(), arguments_.swap->iborIndex()->currency());
631 exercise_ = arguments_.exercise;
632 settlementType_ = arguments_.settlementType;
633 settlementMethod_ = arguments_.settlementMethod;
634
636
637 results_.value = npv_;
638 results_.additionalResults = additionalResults_;
639 results_.additionalResults["underlyingNpv"] = underlyingNpv_;
640} // NumericLgmSwaptionEngine::calculate
const Instrument::results * results_
Definition: cdsoption.cpp:81
Swap::arguments * arguments_
+ Here is the call graph for this function: