QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
|
#include <sabrsmilesection.hpp>
Public Member Functions | |
SabrSmileSection (Time timeToExpiry, Rate forward, const std::vector< Real > &sabrParameters, Real shift=0.0, VolatilityType volatilityType=VolatilityType::ShiftedLognormal) | |
SabrSmileSection (const Date &d, Rate forward, const std::vector< Real > &sabrParameters, const Date &referenceDate=Date(), 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 | alpha () const |
Real | beta () const |
Real | nu () const |
Real | rho () const |
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 () | |
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 | |
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 | |
void | initialise (const std::vector< Real > &sabrParameters) |
Private Attributes | |
Real | alpha_ |
Real | beta_ |
Real | nu_ |
Real | rho_ |
Real | forward_ |
Real | shift_ |
Additional Inherited Members | |
Public Types inherited from Observer | |
typedef set_type::iterator | iterator |
Definition at line 34 of file sabrsmilesection.hpp.
SabrSmileSection | ( | Time | timeToExpiry, |
Rate | forward, | ||
const std::vector< Real > & | sabrParameters, | ||
Real | shift = 0.0 , |
||
VolatilityType | volatilityType = VolatilityType::ShiftedLognormal |
||
) |
SabrSmileSection | ( | const Date & | d, |
Rate | forward, | ||
const std::vector< Real > & | sabrParameters, | ||
const Date & | referenceDate = Date() , |
||
const DayCounter & | dc = Actual365Fixed() , |
||
Real | shift = 0.0 , |
||
VolatilityType | volatilityType = VolatilityType::ShiftedLognormal |
||
) |
|
overridevirtual |
Implements SmileSection.
Definition at line 49 of file sabrsmilesection.hpp.
|
overridevirtual |
Implements SmileSection.
Definition at line 50 of file sabrsmilesection.hpp.
|
overridevirtual |
Implements SmileSection.
Definition at line 51 of file sabrsmilesection.hpp.
Real alpha | ( | ) | const |
Definition at line 52 of file sabrsmilesection.hpp.
Real beta | ( | ) | const |
Definition at line 53 of file sabrsmilesection.hpp.
Real nu | ( | ) | const |
Definition at line 54 of file sabrsmilesection.hpp.
Real rho | ( | ) | const |
Definition at line 55 of file sabrsmilesection.hpp.
Reimplemented from SmileSection.
Definition at line 65 of file sabrsmilesection.cpp.
Implements SmileSection.
Definition at line 72 of file sabrsmilesection.cpp.
|
private |
Definition at line 50 of file sabrsmilesection.cpp.
|
private |
Definition at line 61 of file sabrsmilesection.hpp.
|
private |
Definition at line 61 of file sabrsmilesection.hpp.
|
private |
Definition at line 61 of file sabrsmilesection.hpp.
|
private |
Definition at line 61 of file sabrsmilesection.hpp.
|
private |
Definition at line 61 of file sabrsmilesection.hpp.
|
private |
Definition at line 61 of file sabrsmilesection.hpp.