QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
|
interest rate volatility smile section More...
#include <smilesection.hpp>
Public Member Functions | |
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 () | |
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 | |
virtual void | initializeExerciseTime () const |
virtual Real | varianceImpl (Rate strike) const |
virtual Volatility | volatilityImpl (Rate strike) const =0 |
Private Attributes | |
bool | isFloating_ |
Date | referenceDate_ |
Date | exerciseDate_ |
DayCounter | dc_ |
Time | exerciseTime_ |
VolatilityType | volatilityType_ |
Rate | shift_ |
Additional Inherited Members | |
Public Types inherited from Observer | |
typedef set_type::iterator | iterator |
interest rate volatility smile section
This abstract class provides volatility smile section interface
Definition at line 38 of file smilesection.hpp.
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 |
||
) |
Definition at line 61 of file smilesection.cpp.
|
default |
|
overridedefault |
|
overridevirtual |
This method must be implemented in derived classes. An instance of Observer does not call this method directly: instead, it will be called by the observables the instance registered with when they need to notify any changes.
Implements Observer.
Reimplemented in SpreadedSmileSection.
Definition at line 31 of file smilesection.cpp.
|
pure virtual |
Implemented in TenorOptionletVTS::TenorOptionletSmileSection, TenorSwaptionVTS::TenorSwaptionSmileSection, NoArbSabrInterpolatedSmileSection, NoArbSabrSmileSection, SviInterpolatedSmileSection, SviSmileSection, ZabrInterpolatedSmileSection< Evaluation >, ZabrSmileSection< Evaluation >, AtmAdjustedSmileSection, AtmSmileSection, FlatSmileSection, Gaussian1dSmileSection, InterpolatedSmileSection< Interpolator >, KahaleSmileSection, SabrInterpolatedSmileSection, SabrSmileSection, and SpreadedSmileSection.
|
pure virtual |
Implemented in TenorOptionletVTS::TenorOptionletSmileSection, TenorSwaptionVTS::TenorSwaptionSmileSection, NoArbSabrInterpolatedSmileSection, NoArbSabrSmileSection, SviInterpolatedSmileSection, SviSmileSection, ZabrInterpolatedSmileSection< Evaluation >, ZabrSmileSection< Evaluation >, AtmAdjustedSmileSection, AtmSmileSection, FlatSmileSection, Gaussian1dSmileSection, InterpolatedSmileSection< Interpolator >, KahaleSmileSection, SabrInterpolatedSmileSection, SabrSmileSection, and SpreadedSmileSection.
Volatility volatility | ( | Rate | strike | ) | const |
Definition at line 102 of file smilesection.hpp.
|
pure virtual |
Implemented in TenorOptionletVTS::TenorOptionletSmileSection, TenorSwaptionVTS::TenorSwaptionSmileSection, NoArbSabrInterpolatedSmileSection, NoArbSabrSmileSection, SviInterpolatedSmileSection, SviSmileSection, ZabrInterpolatedSmileSection< Evaluation >, ZabrSmileSection< Evaluation >, AtmAdjustedSmileSection, AtmSmileSection, FlatSmileSection, Gaussian1dSmileSection, InterpolatedSmileSection< Interpolator >, KahaleSmileSection, SabrInterpolatedSmileSection, SabrSmileSection, and SpreadedSmileSection.
|
virtual |
Reimplemented in AtmAdjustedSmileSection, AtmSmileSection, KahaleSmileSection, and SpreadedSmileSection.
Definition at line 60 of file smilesection.hpp.
|
virtual |
Reimplemented in AtmAdjustedSmileSection, AtmSmileSection, KahaleSmileSection, and SpreadedSmileSection.
Definition at line 61 of file smilesection.hpp.
|
virtual |
Reimplemented in AtmAdjustedSmileSection, AtmSmileSection, KahaleSmileSection, and SpreadedSmileSection.
Definition at line 64 of file smilesection.hpp.
|
virtual |
Reimplemented in AtmAdjustedSmileSection, AtmSmileSection, KahaleSmileSection, and SpreadedSmileSection.
Definition at line 106 of file smilesection.hpp.
|
virtual |
Reimplemented in AtmAdjustedSmileSection, AtmSmileSection, KahaleSmileSection, and SpreadedSmileSection.
Definition at line 66 of file smilesection.hpp.
|
virtual |
Reimplemented in AtmAdjustedSmileSection, AtmSmileSection, KahaleSmileSection, and SpreadedSmileSection.
Definition at line 67 of file smilesection.hpp.
|
virtual |
Reimplemented in NoArbSabrSmileSection, ZabrSmileSection< Evaluation >, AtmAdjustedSmileSection, KahaleSmileSection, and Gaussian1dSmileSection.
Definition at line 72 of file smilesection.cpp.
|
virtual |
Reimplemented in NoArbSabrSmileSection, and AtmAdjustedSmileSection.
Definition at line 88 of file smilesection.cpp.
Reimplemented in AtmAdjustedSmileSection.
Definition at line 107 of file smilesection.cpp.
Reimplemented in NoArbSabrSmileSection, and AtmAdjustedSmileSection.
Definition at line 99 of file smilesection.cpp.
Real volatility | ( | Rate | strike, |
VolatilityType | type, | ||
Real | shift = 0.0 |
||
) | const |
|
protectedvirtual |
Definition at line 38 of file smilesection.cpp.
Reimplemented in NoArbSabrInterpolatedSmileSection, SviInterpolatedSmileSection, ZabrInterpolatedSmileSection< Evaluation >, AtmAdjustedSmileSection, AtmSmileSection, InterpolatedSmileSection< Interpolator >, SabrInterpolatedSmileSection, and SabrSmileSection.
Definition at line 112 of file smilesection.hpp.
|
protectedpure virtual |
Implemented in TenorOptionletVTS::TenorOptionletSmileSection, TenorSwaptionVTS::TenorSwaptionSmileSection, NoArbSabrInterpolatedSmileSection, NoArbSabrSmileSection, SviInterpolatedSmileSection, SviSmileSection, ZabrInterpolatedSmileSection< Evaluation >, ZabrSmileSection< Evaluation >, AtmAdjustedSmileSection, AtmSmileSection, Gaussian1dSmileSection, InterpolatedSmileSection< Interpolator >, KahaleSmileSection, SabrInterpolatedSmileSection, SabrSmileSection, SpreadedSmileSection, and FlatSmileSection.
|
private |
Definition at line 86 of file smilesection.hpp.
|
mutableprivate |
Definition at line 87 of file smilesection.hpp.
|
private |
Definition at line 88 of file smilesection.hpp.
|
private |
Definition at line 89 of file smilesection.hpp.
|
mutableprivate |
Definition at line 90 of file smilesection.hpp.
|
private |
Definition at line 91 of file smilesection.hpp.
|
private |
Definition at line 92 of file smilesection.hpp.