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

#include <qle/pricingengines/numericlgmmultilegoptionengine.hpp>

+ Inheritance diagram for NumericLgmMultiLegOptionEngine:
+ Collaboration diagram for NumericLgmMultiLegOptionEngine:

Public Member Functions

 NumericLgmMultiLegOptionEngine (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)
 
 NumericLgmMultiLegOptionEngine (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 86 of file numericlgmmultilegoptionengine.hpp.

Constructor & Destructor Documentation

◆ NumericLgmMultiLegOptionEngine() [1/2]

NumericLgmMultiLegOptionEngine ( 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 523 of file numericlgmmultilegoptionengine.cpp.

528 : NumericLgmMultiLegOptionEngineBase(QuantLib::ext::make_shared<LgmConvolutionSolver2>(model, sy, ny, sx, nx),
529 discountCurve, americanExerciseTimeStepsPerYear) {
530 registerWith(solver_->model());
531 registerWith(discountCurve_);
532}
QuantLib::ext::shared_ptr< LgmBackwardSolver > solver_
NumericLgmMultiLegOptionEngineBase(const QuantLib::ext::shared_ptr< LgmBackwardSolver > &solver, const Handle< YieldTermStructure > &discountCurve=Handle< YieldTermStructure >(), const Size americanExerciseTimeStepsPerYear=24)

◆ NumericLgmMultiLegOptionEngine() [2/2]

NumericLgmMultiLegOptionEngine ( 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 534 of file numericlgmmultilegoptionengine.cpp.

541 QuantLib::ext::make_shared<LgmFdSolver>(model, maxTime, scheme, stateGridPoints, timeStepsPerYear, mesherEpsilon),
542 discountCurve, americanExerciseTimeStepsPerYear) {
543 registerWith(solver_->model());
544 registerWith(discountCurve_);
545}

Member Function Documentation

◆ calculate()

void calculate ( ) const
override

Definition at line 547 of file numericlgmmultilegoptionengine.cpp.

547 {
548 legs_ = arguments_.legs;
549 payer_ = arguments_.payer;
550 currency_ = arguments_.currency;
551 exercise_ = arguments_.exercise;
552 settlementType_ = arguments_.settlementType;
553 settlementMethod_ = arguments_.settlementMethod;
554
556
557 results_.value = npv_;
558 results_.underlyingNpv = underlyingNpv_;
559 results_.additionalResults = additionalResults_;
560 results_.additionalResults["underlyingNpv"] = underlyingNpv_;
561} // NumericLgmSwaptionEngine::calculate
const Instrument::results * results_
Definition: cdsoption.cpp:81
Swap::arguments * arguments_
+ Here is the call graph for this function: