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

#include <qle/pricingengines/mclgmswaptionengine.hpp>

+ Inheritance diagram for McLgmNonstandardSwaptionEngine:
+ Collaboration diagram for McLgmNonstandardSwaptionEngine:

Public Member Functions

 McLgmNonstandardSwaptionEngine (const QuantLib::ext::shared_ptr< LinearGaussMarkovModel > &model, const SequenceType calibrationPathGenerator, const SequenceType pricingPathGenerator, const Size calibrationSamples, const Size pricingSamples, const Size calibrationSeed, const Size pricingSeed, const Size polynomOrder, const LsmBasisSystem::PolynomialType polynomType, const SobolBrownianGenerator::Ordering ordering=SobolBrownianGenerator::Steps, const SobolRsg::DirectionIntegers directionIntegers=SobolRsg::JoeKuoD7, const Handle< YieldTermStructure > &discountCurve=Handle< YieldTermStructure >(), const std::vector< Date > simulationDates=std::vector< Date >(), const std::vector< Size > externalModelIndices=std::vector< Size >(), const bool minimalObsDate=true, const RegressorModel regressorModel=RegressorModel::Simple)
 
void calculate () const override
 

Additional Inherited Members

- Public Types inherited from McMultiLegBaseEngine
enum  RegressorModel { Simple , LaggedFX }
 
- Protected Member Functions inherited from McMultiLegBaseEngine
 McMultiLegBaseEngine (const Handle< CrossAssetModel > &model, const SequenceType calibrationPathGenerator, const SequenceType pricingPathGenerator, const Size calibrationSamples, const Size pricingSamples, const Size calibrationSeed, const Size pricingSeed, const Size polynomOrder, const LsmBasisSystem::PolynomialType polynomType, const SobolBrownianGenerator::Ordering ordering, const SobolRsg::DirectionIntegers directionIntegers, const std::vector< Handle< YieldTermStructure > > &discountCurves=std::vector< Handle< YieldTermStructure > >(), const std::vector< Date > &simulationDates=std::vector< Date >(), const std::vector< Size > &externalModelIndices=std::vector< Size >(), const bool minimalObsDate=true, const RegressorModel regressorModel=RegressorModel::Simple, const Real regressionVarianceCutoff=Null< Real >())
 
void calculate () const
 
QuantLib::ext::shared_ptr< AmcCalculatoramcCalculator () const
 
- Protected Attributes inherited from McMultiLegBaseEngine
std::vector< Leg > leg_
 
std::vector< Currency > currency_
 
std::vector< boolpayer_
 
QuantLib::ext::shared_ptr< Exercise > exercise_
 
Settlement::Type optionSettlement_ = Settlement::Physical
 
bool includeSettlementDateFlows_ = false
 
Handle< CrossAssetModelmodel_
 
SequenceType calibrationPathGenerator_
 
SequenceType pricingPathGenerator_
 
Size calibrationSamples_
 
Size pricingSamples_
 
Size calibrationSeed_
 
Size pricingSeed_
 
Size polynomOrder_
 
LsmBasisSystem::PolynomialType polynomType_
 
SobolBrownianGenerator::Ordering ordering_
 
SobolRsg::DirectionIntegers directionIntegers_
 
std::vector< Handle< YieldTermStructure > > discountCurves_
 
std::vector< Date > simulationDates_
 
std::vector< Size > externalModelIndices_
 
bool minimalObsDate_
 
RegressorModel regressorModel_
 
Real regressionVarianceCutoff_
 
QuantLib::ext::shared_ptr< AmcCalculatoramcCalculator_
 
Real resultUnderlyingNpv_
 
Real resultValue_
 

Detailed Description

Definition at line 61 of file mclgmswaptionengine.hpp.

Constructor & Destructor Documentation

◆ McLgmNonstandardSwaptionEngine()

McLgmNonstandardSwaptionEngine ( const QuantLib::ext::shared_ptr< LinearGaussMarkovModel > &  model,
const SequenceType  calibrationPathGenerator,
const SequenceType  pricingPathGenerator,
const Size  calibrationSamples,
const Size  pricingSamples,
const Size  calibrationSeed,
const Size  pricingSeed,
const Size  polynomOrder,
const LsmBasisSystem::PolynomialType  polynomType,
const SobolBrownianGenerator::Ordering  ordering = SobolBrownianGenerator::Steps,
const SobolRsg::DirectionIntegers  directionIntegers = SobolRsg::JoeKuoD7,
const Handle< YieldTermStructure > &  discountCurve = Handle<YieldTermStructure>(),
const std::vector< Date >  simulationDates = std::vector<Date>(),
const std::vector< Size >  externalModelIndices = std::vector<Size>(),
const bool  minimalObsDate = true,
const RegressorModel  regressorModel = RegressorModel::Simple 
)

Definition at line 65 of file mclgmswaptionengine.hpp.

77 : GenericEngine<QuantLib::NonstandardSwaption::arguments, QuantLib::NonstandardSwaption::results>(),
78 McMultiLegBaseEngine(Handle<CrossAssetModel>(QuantLib::ext::make_shared<CrossAssetModel>(
79 std::vector<QuantLib::ext::shared_ptr<IrModel>>(1, model),
80 std::vector<QuantLib::ext::shared_ptr<FxBsParametrization>>())),
81 calibrationPathGenerator, pricingPathGenerator, calibrationSamples, pricingSamples,
82 calibrationSeed, pricingSeed, polynomOrder, polynomType, ordering, directionIntegers,
83 {discountCurve}, simulationDates, externalModelIndices, minimalObsDate, regressorModel) {
84 registerWith(model);
85 }
McMultiLegBaseEngine(const Handle< CrossAssetModel > &model, const SequenceType calibrationPathGenerator, const SequenceType pricingPathGenerator, const Size calibrationSamples, const Size pricingSamples, const Size calibrationSeed, const Size pricingSeed, const Size polynomOrder, const LsmBasisSystem::PolynomialType polynomType, const SobolBrownianGenerator::Ordering ordering, const SobolRsg::DirectionIntegers directionIntegers, const std::vector< Handle< YieldTermStructure > > &discountCurves=std::vector< Handle< YieldTermStructure > >(), const std::vector< Date > &simulationDates=std::vector< Date >(), const std::vector< Size > &externalModelIndices=std::vector< Size >(), const bool minimalObsDate=true, const RegressorModel regressorModel=RegressorModel::Simple, const Real regressionVarianceCutoff=Null< Real >())

Member Function Documentation

◆ calculate()

void calculate ( ) const
override

Definition at line 40 of file mclgmswaptionengine.cpp.

40 {
41 leg_ = arguments_.legs;
42 currency_ = std::vector<Currency>(leg_.size(), model_->irlgm1f(0)->currency());
43 payer_.resize(arguments_.payer.size());
44 for (Size i = 0; i < arguments_.payer.size(); ++i) {
45 payer_[i] = QuantLib::close_enough(arguments_.payer[i], -1.0);
46 }
47 exercise_ = arguments_.exercise;
48 optionSettlement_ = arguments_.settlementType;
50 results_.value = resultValue_;
51 results_.additionalResults["underlyingNpv"] = resultUnderlyingNpv_;
52 results_.additionalResults["amcCalculator"] = amcCalculator();
53} // McLgmSwaptionEngine::calculate
const Instrument::results * results_
Definition: cdsoption.cpp:81
QuantLib::ext::shared_ptr< Exercise > exercise_
Handle< CrossAssetModel > model_
QuantLib::ext::shared_ptr< AmcCalculator > amcCalculator() const
Swap::arguments * arguments_
+ Here is the call graph for this function: