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

#include <atmadjustedsmilesection.hpp>

+ Inheritance diagram for AtmAdjustedSmileSection:
+ Collaboration diagram for AtmAdjustedSmileSection:

Public Member Functions

 AtmAdjustedSmileSection (const ext::shared_ptr< SmileSection > &source, Real atm=Null< Real >(), bool recenterSmile=false)
 
Real minStrike () const override
 
Real maxStrike () const override
 
Real atmLevel () const override
 
const DateexerciseDate () const override
 
Time exerciseTime () const override
 
const DayCounterdayCounter () const override
 
const DatereferenceDate () const override
 
VolatilityType volatilityType () const override
 
Rate shift () const override
 
Real optionPrice (Rate strike, Option::Type type=Option::Call, Real discount=1.0) const override
 
Real digitalOptionPrice (Rate strike, Option::Type type=Option::Call, Real discount=1.0, Real gap=1.0e-5) const override
 
Real vega (Rate strike, Real discount=1.0) const override
 
Real density (Rate strike, Real discount=1.0, Real gap=1.0E-4) 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 varianceImpl (Rate strike) const override
 
Volatility 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 Member Functions

Real adjustedStrike (Real strike) const
 

Private Attributes

ext::shared_ptr< SmileSectionsource_
 
Real adjustment_
 
Real f_
 

Additional Inherited Members

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

Detailed Description

Definition at line 32 of file atmadjustedsmilesection.hpp.

Constructor & Destructor Documentation

◆ AtmAdjustedSmileSection()

AtmAdjustedSmileSection ( const ext::shared_ptr< SmileSection > &  source,
Real  atm = Null<Real>(),
bool  recenterSmile = false 
)
explicit

Definition at line 24 of file atmadjustedsmilesection.cpp.

Member Function Documentation

◆ minStrike()

Real minStrike ( ) const
overridevirtual

Implements SmileSection.

Definition at line 39 of file atmadjustedsmilesection.hpp.

◆ maxStrike()

Real maxStrike ( ) const
overridevirtual

Implements SmileSection.

Definition at line 40 of file atmadjustedsmilesection.hpp.

◆ atmLevel()

Real atmLevel ( ) const
overridevirtual

Implements SmileSection.

Definition at line 41 of file atmadjustedsmilesection.hpp.

◆ exerciseDate()

const Date & exerciseDate ( ) const
overridevirtual

Reimplemented from SmileSection.

Definition at line 42 of file atmadjustedsmilesection.hpp.

◆ exerciseTime()

Time exerciseTime ( ) const
overridevirtual

Reimplemented from SmileSection.

Definition at line 43 of file atmadjustedsmilesection.hpp.

◆ dayCounter()

const DayCounter & dayCounter ( ) const
overridevirtual

Reimplemented from SmileSection.

Definition at line 44 of file atmadjustedsmilesection.hpp.

◆ referenceDate()

const Date & referenceDate ( ) const
overridevirtual

Reimplemented from SmileSection.

Definition at line 45 of file atmadjustedsmilesection.hpp.

◆ volatilityType()

VolatilityType volatilityType ( ) const
overridevirtual

Reimplemented from SmileSection.

Definition at line 46 of file atmadjustedsmilesection.hpp.

◆ shift()

Rate shift ( ) const
overridevirtual

Reimplemented from SmileSection.

Definition at line 47 of file atmadjustedsmilesection.hpp.

◆ optionPrice()

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

Reimplemented from SmileSection.

Definition at line 49 of file atmadjustedsmilesection.hpp.

+ Here is the call graph for this function:

◆ digitalOptionPrice()

Real digitalOptionPrice ( Rate  strike,
Option::Type  type = Option::Call,
Real  discount = 1.0,
Real  gap = 1.0e-5 
) const
overridevirtual

Reimplemented from SmileSection.

Definition at line 55 of file atmadjustedsmilesection.hpp.

+ Here is the call graph for this function:

◆ vega()

Real vega ( Rate  strike,
Real  discount = 1.0 
) const
overridevirtual

Reimplemented from SmileSection.

Definition at line 63 of file atmadjustedsmilesection.hpp.

+ Here is the call graph for this function:

◆ density()

Real density ( Rate  strike,
Real  discount = 1.0,
Real  gap = 1.0E-4 
) const
overridevirtual

Reimplemented from SmileSection.

Definition at line 67 of file atmadjustedsmilesection.hpp.

+ Here is the call graph for this function:

◆ varianceImpl()

Real varianceImpl ( Rate  strike) const
overrideprotectedvirtual

Reimplemented from SmileSection.

Definition at line 44 of file atmadjustedsmilesection.cpp.

+ Here is the call graph for this function:

◆ volatilityImpl()

Real volatilityImpl ( Rate  strike) const
overrideprotectedvirtual

Implements SmileSection.

Definition at line 48 of file atmadjustedsmilesection.cpp.

+ Here is the call graph for this function:

◆ adjustedStrike()

Real adjustedStrike ( Real  strike) const
private

Definition at line 40 of file atmadjustedsmilesection.cpp.

+ Here is the caller graph for this function:

Member Data Documentation

◆ source_

ext::shared_ptr<SmileSection> source_
private

Definition at line 78 of file atmadjustedsmilesection.hpp.

◆ adjustment_

Real adjustment_
private

Definition at line 79 of file atmadjustedsmilesection.hpp.

◆ f_

Real f_
private

Definition at line 80 of file atmadjustedsmilesection.hpp.