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

#include <noarbsabrsmilesection.hpp>

+ Inheritance diagram for NoArbSabrSmileSection:
+ Collaboration diagram for NoArbSabrSmileSection:

Public Member Functions

 NoArbSabrSmileSection (Time timeToExpiry, Rate forward, std::vector< Real > sabrParameters, Real shift=0.0, VolatilityType volatilityType=VolatilityType::ShiftedLognormal)
 
 NoArbSabrSmileSection (const Date &d, Rate forward, std::vector< Real > sabrParameters, const DayCounter &dc=Actual365Fixed(), Real shift=0.0, VolatilityType volatilityType=VolatilityType::ShiftedLognormal)
 
Real minStrike () const override
 
Real maxStrike () const override
 
Real atmLevel () 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 density (Rate strike, Real discount=1.0, Real gap=1.0E-4) const override
 
ext::shared_ptr< NoArbSabrModel > model ()
 
- 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 Date & exerciseDate () const
 
virtual VolatilityType volatilityType () const
 
virtual Rate shift () const
 
virtual const Date & referenceDate () const
 
virtual Time exerciseTime () const
 
virtual const DayCounter & dayCounter () 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 ()=default
 
 Observable (const Observable &)
 
Observable & operator= (const Observable &)
 
 Observable (Observable &&)=delete
 
Observable & operator= (Observable &&)=delete
 
virtual ~Observable ()=default
 
void notifyObservers ()
 
- Public Member Functions inherited from Observer
 Observer ()=default
 
 Observer (const Observer &)
 
Observer & operator= (const Observer &)
 
virtual ~Observer ()
 
std::pair< iterator, bool > registerWith (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

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

void init ()
 

Private Attributes

ext::shared_ptr< NoArbSabrModel > model_
 
Rate forward_
 
std::vector< Real > params_
 
Real shift_
 

Additional Inherited Members

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

Detailed Description

Definition at line 34 of file noarbsabrsmilesection.hpp.

Constructor & Destructor Documentation

◆ NoArbSabrSmileSection() [1/2]

NoArbSabrSmileSection ( Time  timeToExpiry,
Rate  forward,
std::vector< Real >  sabrParameters,
Real  shift = 0.0,
VolatilityType  volatilityType = VolatilityType::ShiftedLognormal 
)

Definition at line 28 of file noarbsabrsmilesection.cpp.

+ Here is the call graph for this function:

◆ NoArbSabrSmileSection() [2/2]

NoArbSabrSmileSection ( const Date &  d,
Rate  forward,
std::vector< Real >  sabrParameters,
const DayCounter &  dc = Actual365Fixed(),
Real  shift = 0.0,
VolatilityType  volatilityType = VolatilityType::ShiftedLognormal 
)

Definition at line 38 of file noarbsabrsmilesection.cpp.

+ Here is the call graph for this function:

Member Function Documentation

◆ minStrike()

Real minStrike ( ) const
overridevirtual

Implements SmileSection.

Definition at line 48 of file noarbsabrsmilesection.hpp.

◆ maxStrike()

Real maxStrike ( ) const
overridevirtual

Implements SmileSection.

Definition at line 49 of file noarbsabrsmilesection.hpp.

◆ atmLevel()

Real atmLevel ( ) const
overridevirtual

Implements SmileSection.

Definition at line 50 of file noarbsabrsmilesection.hpp.

◆ optionPrice()

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

Reimplemented from SmileSection.

Definition at line 59 of file noarbsabrsmilesection.cpp.

+ Here is the caller 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 66 of file noarbsabrsmilesection.cpp.

◆ density()

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

Reimplemented from SmileSection.

Definition at line 72 of file noarbsabrsmilesection.cpp.

◆ model()

ext::shared_ptr< NoArbSabrModel > model ( )

Definition at line 59 of file noarbsabrsmilesection.hpp.

◆ volatilityImpl()

Real volatilityImpl ( Rate  strike) const
overrideprotectedvirtual

Implements SmileSection.

Definition at line 76 of file noarbsabrsmilesection.cpp.

+ Here is the call graph for this function:

◆ init()

void init ( )
private

Definition at line 45 of file noarbsabrsmilesection.cpp.

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

Member Data Documentation

◆ model_

ext::shared_ptr<NoArbSabrModel> model_
private

Definition at line 66 of file noarbsabrsmilesection.hpp.

◆ forward_

Rate forward_
private

Definition at line 67 of file noarbsabrsmilesection.hpp.

◆ params_

std::vector<Real> params_
private

Definition at line 68 of file noarbsabrsmilesection.hpp.

◆ shift_

Real shift_
private

Definition at line 69 of file noarbsabrsmilesection.hpp.