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

#include <qle/pricingengines/blackmultilegoptionengine.hpp>

+ Inheritance diagram for BlackNonstandardSwaptionFromMultilegOptionEngine:
+ Collaboration diagram for BlackNonstandardSwaptionFromMultilegOptionEngine:

Public Member Functions

 BlackNonstandardSwaptionFromMultilegOptionEngine (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 84 of file blackmultilegoptionengine.hpp.

Constructor & Destructor Documentation

◆ BlackNonstandardSwaptionFromMultilegOptionEngine()

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

Definition at line 401 of file blackmultilegoptionengine.cpp.

403 : BlackMultiLegOptionEngineBase(discountCurve, volatility) {
404 registerWith(discountCurve_);
405 registerWith(volatility_);
406}
BlackMultiLegOptionEngineBase(const Handle< YieldTermStructure > &discountCurve, const Handle< SwaptionVolatilityStructure > &volatility)
Handle< SwaptionVolatilityStructure > volatility_

Member Function Documentation

◆ calculate()

void calculate ( ) const
override

Definition at line 408 of file blackmultilegoptionengine.cpp.

408 {
409 legs_ = arguments_.legs;
410 payer_.resize(arguments_.payer.size());
411 for (Size i = 0; i < arguments_.payer.size(); ++i) {
412 payer_[i] = QuantLib::close_enough(arguments_.payer[i], -1.0);
413 }
414 currency_ = std::vector<Currency>(legs_.size(), arguments_.swap->iborIndex()->currency());
415 exercise_ = arguments_.exercise;
416 settlementType_ = arguments_.settlementType;
417 settlementMethod_ = arguments_.settlementMethod;
418
420
421 results_.value = npv_;
422 results_.additionalResults = additionalResults_;
423 results_.additionalResults["underlyingNpv"] = underlyingNpv_;
424}
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: