QuantLib: a free/open-source library for quantitative finance
Fully annotated sources - version 1.32
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Protected Member Functions | Private Attributes | List of all members
Gaussian1dNonstandardSwaptionEngine Class Reference

One factor model non standard swaption engine. More...

#include <ql/pricingengines/swaption/gaussian1dnonstandardswaptionengine.hpp>

+ Inheritance diagram for Gaussian1dNonstandardSwaptionEngine:
+ Collaboration diagram for Gaussian1dNonstandardSwaptionEngine:

Public Types

enum  Probabilities { None , Naive , Digital }
 
- Public Types inherited from BasketGeneratingEngine
enum  CalibrationBasketType { Naive , MaturityStrikeByDeltaGamma }
 
typedef enum QuantLib::BasketGeneratingEngine::CalibrationBasketType CalibrationBasketType
 
- Public Types inherited from Observer
typedef set_type::iterator iterator
 

Public Member Functions

 Gaussian1dNonstandardSwaptionEngine (const ext::shared_ptr< Gaussian1dModel > &model, const int integrationPoints=64, const Real stddevs=7.0, const bool extrapolatePayoff=true, const bool flatPayoffExtrapolation=false, const Handle< Quote > &oas=Handle< Quote >(), const Handle< YieldTermStructure > &discountCurve=Handle< YieldTermStructure >(), const Probabilities probabilities=None)
 
 Gaussian1dNonstandardSwaptionEngine (const Handle< Gaussian1dModel > &model, const int integrationPoints=64, const Real stddevs=7.0, const bool extrapolatePayoff=true, const bool flatPayoffExtrapolation=false, const Handle< Quote > &oas=Handle< Quote >(), const Handle< YieldTermStructure > &discountCurve=Handle< YieldTermStructure >(), const Probabilities probabilities=None)
 
void calculate () const override
 
- Public Member Functions inherited from BasketGeneratingEngine
virtual ~BasketGeneratingEngine ()=default
 
std::vector< ext::shared_ptr< BlackCalibrationHelper > > calibrationBasket (const ext::shared_ptr< Exercise > &exercise, const ext::shared_ptr< SwapIndex > &standardSwapBase, const ext::shared_ptr< SwaptionVolatilityStructure > &swaptionVolatility, CalibrationBasketType basketType=MaturityStrikeByDeltaGamma) const
 
- Public Member Functions inherited from GenericModelEngine< Gaussian1dModel, NonstandardSwaption::arguments, NonstandardSwaption::results >
 GenericModelEngine (Handle< Gaussian1dModel > model=Handle< Gaussian1dModel >())
 
 GenericModelEngine (const ext::shared_ptr< Gaussian1dModel > &model)
 
- Public Member Functions inherited from GenericEngine< ArgumentsType, ResultsType >
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 ()
 

Protected Member Functions

Real underlyingNpv (const Date &expiry, Real y) const override
 
Swap::Type underlyingType () const override
 
const Date underlyingLastDate () const override
 
const Array initialGuess (const Date &expiry) const override
 
- Protected Member Functions inherited from BasketGeneratingEngine
 BasketGeneratingEngine (const ext::shared_ptr< Gaussian1dModel > &model, Handle< Quote > oas, Handle< YieldTermStructure > discountCurve)
 
 BasketGeneratingEngine (Handle< Gaussian1dModel > model, Handle< Quote > oas, Handle< YieldTermStructure > discountCurve)
 
virtual Real underlyingNpv (const Date &expiry, Real y) const =0
 
virtual Swap::Type underlyingType () const =0
 
virtual const Date underlyingLastDate () const =0
 
virtual const Array initialGuess (const Date &expiry) const =0
 

Private Attributes

const int integrationPoints_
 
const Real stddevs_
 
const bool extrapolatePayoff_
 
const bool flatPayoffExtrapolation_
 
const Handle< YieldTermStructurediscountCurve_
 
const Handle< Quoteoas_
 
const Probabilities probabilities_
 

Additional Inherited Members

- Protected Attributes inherited from GenericModelEngine< Gaussian1dModel, NonstandardSwaption::arguments, NonstandardSwaption::results >
Handle< Gaussian1dModelmodel_
 
- Protected Attributes inherited from GenericEngine< ArgumentsType, ResultsType >
ArgumentsType arguments_
 
ResultsType results_
 

Detailed Description

One factor model non standard swaption engine.

All fixed coupons with start date greater or equal to the respective option expiry are considered to be part of the exercise into right.

All float coupons with start date greater or equal to the respective option expiry are consideres to be part of the exercise into right.

For redemption flows an associated start date is considered in the criterion, which is the start date of the regular xcoupon period with same payment date as the redemption flow.

Warning:
Cash settled swaptions are not supported

Definition at line 53 of file gaussian1dnonstandardswaptionengine.hpp.

Member Enumeration Documentation

◆ Probabilities

Enumerator
None 
Naive 
Digital 

Definition at line 59 of file gaussian1dnonstandardswaptionengine.hpp.

Constructor & Destructor Documentation

◆ Gaussian1dNonstandardSwaptionEngine() [1/2]

Gaussian1dNonstandardSwaptionEngine ( const ext::shared_ptr< Gaussian1dModel > &  model,
const int  integrationPoints = 64,
const Real  stddevs = 7.0,
const bool  extrapolatePayoff = true,
const bool  flatPayoffExtrapolation = false,
const Handle< Quote > &  oas = Handle<Quote>(),
const Handle< YieldTermStructure > &  discountCurve = Handle<YieldTermStructure>(),
const Probabilities  probabilities = None 
)

Definition at line 65 of file gaussian1dnonstandardswaptionengine.hpp.

+ Here is the call graph for this function:

◆ Gaussian1dNonstandardSwaptionEngine() [2/2]

Gaussian1dNonstandardSwaptionEngine ( const Handle< Gaussian1dModel > &  model,
const int  integrationPoints = 64,
const Real  stddevs = 7.0,
const bool  extrapolatePayoff = true,
const bool  flatPayoffExtrapolation = false,
const Handle< Quote > &  oas = Handle<Quote>(),
const Handle< YieldTermStructure > &  discountCurve = Handle<YieldTermStructure>(),
const Probabilities  probabilities = None 
)

Definition at line 93 of file gaussian1dnonstandardswaptionengine.hpp.

+ Here is the call graph for this function:

Member Function Documentation

◆ calculate()

void calculate ( ) const
overridevirtual

Implements PricingEngine.

Definition at line 134 of file gaussian1dnonstandardswaptionengine.cpp.

+ Here is the call graph for this function:

◆ underlyingNpv()

Real underlyingNpv ( const Date expiry,
Real  y 
) const
overrideprotectedvirtual

Implements BasketGeneratingEngine.

Definition at line 32 of file gaussian1dnonstandardswaptionengine.cpp.

◆ underlyingType()

Swap::Type underlyingType ( ) const
overrideprotectedvirtual

Implements BasketGeneratingEngine.

Definition at line 90 of file gaussian1dnonstandardswaptionengine.cpp.

◆ underlyingLastDate()

const Date underlyingLastDate ( ) const
overrideprotectedvirtual

Implements BasketGeneratingEngine.

Definition at line 95 of file gaussian1dnonstandardswaptionengine.cpp.

+ Here is the caller graph for this function:

◆ initialGuess()

const Array initialGuess ( const Date expiry) const
overrideprotectedvirtual

Implements BasketGeneratingEngine.

Definition at line 100 of file gaussian1dnonstandardswaptionengine.cpp.

+ Here is the call graph for this function:

Member Data Documentation

◆ integrationPoints_

const int integrationPoints_
private

Definition at line 130 of file gaussian1dnonstandardswaptionengine.hpp.

◆ stddevs_

const Real stddevs_
private

Definition at line 131 of file gaussian1dnonstandardswaptionengine.hpp.

◆ extrapolatePayoff_

const bool extrapolatePayoff_
private

Definition at line 132 of file gaussian1dnonstandardswaptionengine.hpp.

◆ flatPayoffExtrapolation_

const bool flatPayoffExtrapolation_
private

Definition at line 132 of file gaussian1dnonstandardswaptionengine.hpp.

◆ discountCurve_

const Handle<YieldTermStructure> discountCurve_
private

Definition at line 133 of file gaussian1dnonstandardswaptionengine.hpp.

◆ oas_

const Handle<Quote> oas_
private

Definition at line 134 of file gaussian1dnonstandardswaptionengine.hpp.

◆ probabilities_

const Probabilities probabilities_
private

Definition at line 135 of file gaussian1dnonstandardswaptionengine.hpp.