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

#include <qle/pricingengines/blackmultilegoptionengine.hpp>

+ Inheritance diagram for BlackSwaptionFromMultilegOptionEngine:
+ Collaboration diagram for BlackSwaptionFromMultilegOptionEngine:

Public Member Functions

 BlackSwaptionFromMultilegOptionEngine (const Handle< YieldTermStructure > &discountCurve, const Handle< SwaptionVolatilityStructure > &volatility)
 
void calculate () const override
 
- Public Member Functions inherited from BlackMultiLegOptionEngineBase
 BlackMultiLegOptionEngineBase (const Handle< YieldTermStructure > &discountCurve, const Handle< SwaptionVolatilityStructure > &volatility)
 

Additional Inherited Members

- Static Public Member Functions inherited from BlackMultiLegOptionEngineBase
static bool instrumentIsHandled (const MultiLegOption &m, std::vector< std::string > &messages)
 
- Protected Member Functions inherited from BlackMultiLegOptionEngineBase
void calculate () const
 
- Static Protected Member Functions inherited from BlackMultiLegOptionEngineBase
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 BlackMultiLegOptionEngineBase
Handle< YieldTermStructure > discountCurve_
 
Handle< SwaptionVolatilityStructurevolatility_
 
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 75 of file blackmultilegoptionengine.hpp.

Constructor & Destructor Documentation

◆ BlackSwaptionFromMultilegOptionEngine()

BlackSwaptionFromMultilegOptionEngine ( const Handle< YieldTermStructure > &  discountCurve,
const Handle< SwaptionVolatilityStructure > &  volatility 
)

Definition at line 376 of file blackmultilegoptionengine.cpp.

378 : BlackMultiLegOptionEngineBase(discountCurve, volatility) {
379 registerWith(discountCurve_);
380 registerWith(volatility_);
381}
BlackMultiLegOptionEngineBase(const Handle< YieldTermStructure > &discountCurve, const Handle< SwaptionVolatilityStructure > &volatility)
Handle< SwaptionVolatilityStructure > volatility_

Member Function Documentation

◆ calculate()

void calculate ( ) const
override

Definition at line 383 of file blackmultilegoptionengine.cpp.

383 {
384 legs_ = arguments_.legs;
385 payer_.resize(arguments_.payer.size());
386 for (Size i = 0; i < arguments_.payer.size(); ++i) {
387 payer_[i] = QuantLib::close_enough(arguments_.payer[i], -1.0);
388 }
389 currency_ = std::vector<Currency>(legs_.size(), arguments_.swap->iborIndex()->currency());
390 exercise_ = arguments_.exercise;
391 settlementType_ = arguments_.settlementType;
392 settlementMethod_ = arguments_.settlementMethod;
393
395
396 results_.value = npv_;
397 results_.additionalResults = additionalResults_;
398 results_.additionalResults["underlyingNpv"] = underlyingNpv_;
399}
const Instrument::results * results_
Definition: cdsoption.cpp:81
QuantLib::ext::shared_ptr< Exercise > exercise_
std::map< std::string, boost::any > additionalResults_
Swap::arguments * arguments_
+ Here is the call graph for this function: