QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Private Attributes | List of all members
BlackStyleSwaptionEngine< Spec > Class Template Reference

#include <blackswaptionengine.hpp>

+ Inheritance diagram for BlackStyleSwaptionEngine< Spec >:
+ Collaboration diagram for BlackStyleSwaptionEngine< Spec >:

Public Types

enum  CashAnnuityModel { SwapRate , DiscountCurve }
 
- Public Types inherited from Observer
typedef set_type::iterator iterator
 

Public Member Functions

 BlackStyleSwaptionEngine (Handle< YieldTermStructure > discountCurve, Volatility vol, const DayCounter &dc=Actual365Fixed(), Real displacement=0.0, CashAnnuityModel model=DiscountCurve)
 
 BlackStyleSwaptionEngine (Handle< YieldTermStructure > discountCurve, const Handle< Quote > &vol, const DayCounter &dc=Actual365Fixed(), Real displacement=0.0, CashAnnuityModel model=DiscountCurve)
 
 BlackStyleSwaptionEngine (Handle< YieldTermStructure > discountCurve, Handle< SwaptionVolatilityStructure > vol, CashAnnuityModel model=DiscountCurve)
 
void calculate () const override
 
Handle< YieldTermStructuretermStructure ()
 
Handle< SwaptionVolatilityStructurevolatility ()
 
- Public Member Functions inherited from GenericEngine< Swaption::arguments, Swaption::results >
PricingEngine::argumentsgetArguments () const override
 
const PricingEngine::resultsgetResults () const override
 
void reset () override
 
void update () override
 
- Public Member Functions inherited from PricingEngine
 ~PricingEngine () override=default
 
virtual argumentsgetArguments () const =0
 
virtual const resultsgetResults () const =0
 
virtual void reset ()=0
 
virtual void calculate () const =0
 
- Public Member Functions inherited from Observable
 Observable ()
 
 Observable (const Observable &)
 
Observableoperator= (const Observable &)
 
 Observable (Observable &&)=delete
 
Observableoperator= (Observable &&)=delete
 
virtual ~Observable ()=default
 
void notifyObservers ()
 
- Public Member Functions inherited from Observer
 Observer ()=default
 
 Observer (const Observer &)
 
Observeroperator= (const Observer &)
 
virtual ~Observer ()
 
std::pair< iterator, boolregisterWith (const ext::shared_ptr< Observable > &)
 
void registerWithObservables (const ext::shared_ptr< Observer > &)
 
Size unregisterWith (const ext::shared_ptr< Observable > &)
 
void unregisterWithAll ()
 
virtual void update ()=0
 
virtual void deepUpdate ()
 

Private Attributes

Handle< YieldTermStructurediscountCurve_
 
Handle< SwaptionVolatilityStructurevol_
 
CashAnnuityModel model_
 

Additional Inherited Members

- Protected Attributes inherited from GenericEngine< Swaption::arguments, Swaption::results >
Swaption::arguments arguments_
 
Swaption::results results_
 

Detailed Description

template<class Spec>
class QuantLib::detail::BlackStyleSwaptionEngine< Spec >

Generic Black-style-formula swaption engine This is the base class for the Black and Bachelier swaption engines

Definition at line 54 of file blackswaptionengine.hpp.

Member Enumeration Documentation

◆ CashAnnuityModel

Enumerator
SwapRate 
DiscountCurve 

Definition at line 56 of file blackswaptionengine.hpp.

Constructor & Destructor Documentation

◆ BlackStyleSwaptionEngine() [1/3]

BlackStyleSwaptionEngine ( Handle< YieldTermStructure discountCurve,
Volatility  vol,
const DayCounter dc = Actual365Fixed(),
Real  displacement = 0.0,
CashAnnuityModel  model = DiscountCurve 
)

Definition at line 182 of file blackswaptionengine.hpp.

+ Here is the call graph for this function:

◆ BlackStyleSwaptionEngine() [2/3]

BlackStyleSwaptionEngine ( Handle< YieldTermStructure discountCurve,
const Handle< Quote > &  vol,
const DayCounter dc = Actual365Fixed(),
Real  displacement = 0.0,
CashAnnuityModel  model = DiscountCurve 
)

Definition at line 196 of file blackswaptionengine.hpp.

+ Here is the call graph for this function:

◆ BlackStyleSwaptionEngine() [3/3]

Definition at line 211 of file blackswaptionengine.hpp.

+ Here is the call graph for this function:

Member Function Documentation

◆ calculate()

void calculate
overridevirtual

Implements PricingEngine.

Definition at line 221 of file blackswaptionengine.hpp.

+ Here is the call graph for this function:

◆ termStructure()

Handle< YieldTermStructure > termStructure ( )

Definition at line 71 of file blackswaptionengine.hpp.

◆ volatility()

Definition at line 72 of file blackswaptionengine.hpp.

Member Data Documentation

◆ discountCurve_

Handle<YieldTermStructure> discountCurve_
private

Definition at line 75 of file blackswaptionengine.hpp.

◆ vol_

Definition at line 76 of file blackswaptionengine.hpp.

◆ model_

CashAnnuityModel model_
private

Definition at line 77 of file blackswaptionengine.hpp.