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

#include <ql/termstructures/volatility/gaussian1dsmilesection.hpp>

+ Inheritance diagram for Gaussian1dSmileSection:
+ Collaboration diagram for Gaussian1dSmileSection:

Public Member Functions

 Gaussian1dSmileSection (const Date &fixingDate, ext::shared_ptr< SwapIndex > swapIndex, const ext::shared_ptr< Gaussian1dModel > &model, const DayCounter &dc, const ext::shared_ptr< Gaussian1dSwaptionEngine > &swaptionEngine=ext::shared_ptr< Gaussian1dSwaptionEngine >())
 
 Gaussian1dSmileSection (const Date &fixingDate, ext::shared_ptr< IborIndex > swapIndex, const ext::shared_ptr< Gaussian1dModel > &model, const DayCounter &dc, const ext::shared_ptr< Gaussian1dCapFloorEngine > &capEngine=ext::shared_ptr< Gaussian1dCapFloorEngine >())
 
Real minStrike () const override
 
Real maxStrike () const override
 
Real atmLevel () const override
 
Real optionPrice (Rate strike, Option::Type=Option::Call, Real discount=1.0) const override
 
- Public Member Functions inherited from SmileSection
 SmileSection (const Date &d, DayCounter dc=DayCounter(), const Date &referenceDate=Date(), VolatilityType type=ShiftedLognormal, Rate shift=0.0)
 
 SmileSection (Time exerciseTime, DayCounter dc=DayCounter(), VolatilityType type=ShiftedLognormal, Rate shift=0.0)
 
 SmileSection ()=default
 
 ~SmileSection () override=default
 
void update () override
 
virtual Real minStrike () const =0
 
virtual Real maxStrike () const =0
 
Real variance (Rate strike) const
 
Volatility volatility (Rate strike) const
 
virtual Real atmLevel () const =0
 
virtual const DateexerciseDate () const
 
virtual VolatilityType volatilityType () const
 
virtual Rate shift () const
 
virtual const DatereferenceDate () const
 
virtual Time exerciseTime () const
 
virtual const DayCounterdayCounter () const
 
virtual Real optionPrice (Rate strike, Option::Type type=Option::Call, Real discount=1.0) const
 
virtual Real digitalOptionPrice (Rate strike, Option::Type type=Option::Call, Real discount=1.0, Real gap=1.0e-5) const
 
virtual Real vega (Rate strike, Real discount=1.0) const
 
virtual Real density (Rate strike, Real discount=1.0, Real gap=1.0E-4) const
 
Volatility volatility (Rate strike, VolatilityType type, Real shift=0.0) const
 
- 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 volatilityImpl (Rate strike) const override
 
- Protected Member Functions inherited from SmileSection
virtual void initializeExerciseTime () const
 
virtual Real varianceImpl (Rate strike) const
 
virtual Volatility volatilityImpl (Rate strike) const =0
 

Private Attributes

Real atm_
 
Real annuity_
 
Date fixingDate_
 
ext::shared_ptr< SwapIndexswapIndex_
 
ext::shared_ptr< IborIndexiborIndex_
 
ext::shared_ptr< Gaussian1dModelmodel_
 
ext::shared_ptr< PricingEngineengine_
 

Additional Inherited Members

- Public Types inherited from Observer
typedef set_type::iterator iterator
 

Detailed Description

smile section based on a gaussian 1d model instance if curves are attached to the swap or ibor index, these are used to adjust the model's yield term structure, if not the model's yield term structure is used directly

Definition at line 41 of file gaussian1dsmilesection.hpp.

Constructor & Destructor Documentation

◆ Gaussian1dSmileSection() [1/2]

Gaussian1dSmileSection ( const Date fixingDate,
ext::shared_ptr< SwapIndex swapIndex,
const ext::shared_ptr< Gaussian1dModel > &  model,
const DayCounter dc,
const ext::shared_ptr< Gaussian1dSwaptionEngine > &  swaptionEngine = ext::shared_ptr<Gaussian1dSwaptionEngine>() 
)

Definition at line 30 of file gaussian1dsmilesection.cpp.

◆ Gaussian1dSmileSection() [2/2]

Gaussian1dSmileSection ( const Date fixingDate,
ext::shared_ptr< IborIndex swapIndex,
const ext::shared_ptr< Gaussian1dModel > &  model,
const DayCounter dc,
const ext::shared_ptr< Gaussian1dCapFloorEngine > &  capEngine = ext::shared_ptr<Gaussian1dCapFloorEngine>() 
)

Definition at line 50 of file gaussian1dsmilesection.cpp.

+ Here is the call graph for this function:

Member Function Documentation

◆ minStrike()

Real minStrike ( ) const
overridevirtual

Implements SmileSection.

Definition at line 58 of file gaussian1dsmilesection.hpp.

◆ maxStrike()

Real maxStrike ( ) const
overridevirtual

Implements SmileSection.

Definition at line 59 of file gaussian1dsmilesection.hpp.

◆ atmLevel()

Real atmLevel ( ) const
overridevirtual

Implements SmileSection.

Definition at line 73 of file gaussian1dsmilesection.cpp.

◆ optionPrice()

Real optionPrice ( Rate  strike,
Option::Type  type = Option::Call,
Real  discount = 1.0 
) const
overridevirtual

Reimplemented from SmileSection.

Definition at line 75 of file gaussian1dsmilesection.cpp.

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

◆ volatilityImpl()

Real volatilityImpl ( Rate  strike) const
overrideprotectedvirtual

Implements SmileSection.

Definition at line 97 of file gaussian1dsmilesection.cpp.

+ Here is the call graph for this function:

Member Data Documentation

◆ atm_

Real atm_
private

Definition at line 68 of file gaussian1dsmilesection.hpp.

◆ annuity_

Real annuity_
private

Definition at line 68 of file gaussian1dsmilesection.hpp.

◆ fixingDate_

Date fixingDate_
private

Definition at line 69 of file gaussian1dsmilesection.hpp.

◆ swapIndex_

ext::shared_ptr<SwapIndex> swapIndex_
private

Definition at line 70 of file gaussian1dsmilesection.hpp.

◆ iborIndex_

ext::shared_ptr<IborIndex> iborIndex_
private

Definition at line 71 of file gaussian1dsmilesection.hpp.

◆ model_

ext::shared_ptr<Gaussian1dModel> model_
private

Definition at line 72 of file gaussian1dsmilesection.hpp.

◆ engine_

ext::shared_ptr<PricingEngine> engine_
private

Definition at line 73 of file gaussian1dsmilesection.hpp.