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 | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
Gaussian1dFloatFloatSwaptionEngine Class Reference

One factor model float float swaption engine. More...

#include <gaussian1dfloatfloatswaptionengine.hpp>

+ Inheritance diagram for Gaussian1dFloatFloatSwaptionEngine:
+ Collaboration diagram for Gaussian1dFloatFloatSwaptionEngine:

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

 Gaussian1dFloatFloatSwaptionEngine (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 bool includeTodaysExercise=false, const Probabilities probabilities=None)
 
 Gaussian1dFloatFloatSwaptionEngine (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 bool includeTodaysExercise=false, const Probabilities probabilities=None)
 
void calculate () const override
 
Handle< YieldTermStructurediscountingCurve () const
 
- 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, FloatFloatSwaption::arguments, FloatFloatSwaption::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 Member Functions

std::pair< Real, Realnpvs (const Date &expiry, Real y, bool includeExerciseOnxpiry, bool considerProbabilities=false) const
 

Private Attributes

const int integrationPoints_
 
const Real stddevs_
 
const bool extrapolatePayoff_
 
const bool flatPayoffExtrapolation_
 
const Handle< Quoteoas_
 
const Handle< YieldTermStructurediscountCurve_
 
const bool includeTodaysExercise_
 
const Probabilities probabilities_
 
ext::shared_ptr< RebatedExerciserebatedExercise_
 

Additional Inherited Members

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

Detailed Description

One factor model float float swaption engine.

All float coupons with fixing date greater or equal the respective option expiry are considered part of the exercise into right. Note that this is different from the usual accrual start date greater or equal exercise date if the fixing lag is strictly greater than the exercise lag (which should be a rare case). For the redepmtion flows the criterion is that the associated start date of the redemption flow (i.e. the start date of the regular coupon period with same payment date as the redemption flow) is greater or equal the exercise date.

The addtional result underlyingValue is the npv of the underlying (as seen from "today") including all fixings greater (or greater equal depending on includeTodaysExercise) today.

Definition at line 57 of file gaussian1dfloatfloatswaptionengine.hpp.

Member Enumeration Documentation

◆ Probabilities

Enumerator
None 
Naive 
Digital 

Definition at line 63 of file gaussian1dfloatfloatswaptionengine.hpp.

Constructor & Destructor Documentation

◆ Gaussian1dFloatFloatSwaptionEngine() [1/2]

Gaussian1dFloatFloatSwaptionEngine ( 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 bool  includeTodaysExercise = false,
const Probabilities  probabilities = None 
)

Definition at line 69 of file gaussian1dfloatfloatswaptionengine.hpp.

+ Here is the call graph for this function:

◆ Gaussian1dFloatFloatSwaptionEngine() [2/2]

Gaussian1dFloatFloatSwaptionEngine ( 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 bool  includeTodaysExercise = false,
const Probabilities  probabilities = None 
)

Definition at line 97 of file gaussian1dfloatfloatswaptionengine.hpp.

+ Here is the call graph for this function:

Member Function Documentation

◆ calculate()

void calculate ( ) const
overridevirtual

Implements PricingEngine.

Definition at line 27 of file gaussian1dfloatfloatswaptionengine.cpp.

+ Here is the call graph for this function:

◆ discountingCurve()

Handle< YieldTermStructure > discountingCurve ( ) const

Definition at line 127 of file gaussian1dfloatfloatswaptionengine.hpp.

◆ underlyingNpv()

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

Implements BasketGeneratingEngine.

Definition at line 55 of file gaussian1dfloatfloatswaptionengine.cpp.

+ Here is the call graph for this function:

◆ underlyingType()

Swap::Type underlyingType ( ) const
overrideprotectedvirtual

Implements BasketGeneratingEngine.

Definition at line 60 of file gaussian1dfloatfloatswaptionengine.cpp.

◆ underlyingLastDate()

const Date underlyingLastDate ( ) const
overrideprotectedvirtual

Implements BasketGeneratingEngine.

Definition at line 65 of file gaussian1dfloatfloatswaptionengine.cpp.

◆ initialGuess()

const Array initialGuess ( const Date expiry) const
overrideprotectedvirtual

Implements BasketGeneratingEngine.

Definition at line 72 of file gaussian1dfloatfloatswaptionengine.cpp.

◆ npvs()

std::pair< Real, Real > npvs ( const Date expiry,
Real  y,
bool  includeExerciseOnxpiry,
bool  considerProbabilities = false 
) const
private

Definition at line 104 of file gaussian1dfloatfloatswaptionengine.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ integrationPoints_

const int integrationPoints_
private

Definition at line 139 of file gaussian1dfloatfloatswaptionengine.hpp.

◆ stddevs_

const Real stddevs_
private

Definition at line 140 of file gaussian1dfloatfloatswaptionengine.hpp.

◆ extrapolatePayoff_

const bool extrapolatePayoff_
private

Definition at line 141 of file gaussian1dfloatfloatswaptionengine.hpp.

◆ flatPayoffExtrapolation_

const bool flatPayoffExtrapolation_
private

Definition at line 141 of file gaussian1dfloatfloatswaptionengine.hpp.

◆ oas_

const Handle<Quote> oas_
private

Definition at line 142 of file gaussian1dfloatfloatswaptionengine.hpp.

◆ discountCurve_

const Handle<YieldTermStructure> discountCurve_
private

Definition at line 143 of file gaussian1dfloatfloatswaptionengine.hpp.

◆ includeTodaysExercise_

const bool includeTodaysExercise_
private

Definition at line 144 of file gaussian1dfloatfloatswaptionengine.hpp.

◆ probabilities_

const Probabilities probabilities_
private

Definition at line 145 of file gaussian1dfloatfloatswaptionengine.hpp.

◆ rebatedExercise_

ext::shared_ptr<RebatedExercise> rebatedExercise_
mutableprivate

Definition at line 152 of file gaussian1dfloatfloatswaptionengine.hpp.