QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
|
#include <interpolatedsmilesection.hpp>
Public Member Functions | |
InterpolatedSmileSection (Time expiryTime, std::vector< Rate > strikes, const std::vector< Handle< Quote > > &stdDevHandles, Handle< Quote > atmLevel, const Interpolator &interpolator=Interpolator(), const DayCounter &dc=Actual365Fixed(), VolatilityType type=ShiftedLognormal, Real shift=0.0) | |
InterpolatedSmileSection (Time expiryTime, std::vector< Rate > strikes, const std::vector< Real > &stdDevs, Real atmLevel, const Interpolator &interpolator=Interpolator(), const DayCounter &dc=Actual365Fixed(), VolatilityType type=ShiftedLognormal, Real shift=0.0) | |
InterpolatedSmileSection (const Date &d, std::vector< Rate > strikes, const std::vector< Handle< Quote > > &stdDevHandles, Handle< Quote > atmLevel, const DayCounter &dc=Actual365Fixed(), const Interpolator &interpolator=Interpolator(), const Date &referenceDate=Date(), VolatilityType type=ShiftedLognormal, Real shift=0.0) | |
InterpolatedSmileSection (const Date &d, std::vector< Rate > strikes, const std::vector< Real > &stdDevs, Real atmLevel, const DayCounter &dc=Actual365Fixed(), const Interpolator &interpolator=Interpolator(), const Date &referenceDate=Date(), VolatilityType type=ShiftedLognormal, Real shift=0.0) | |
void | performCalculations () const override |
Real | varianceImpl (Rate strike) const override |
Volatility | volatilityImpl (Rate strike) const override |
Real | minStrike () const override |
Real | maxStrike () const override |
Real | atmLevel () const override |
void | update () 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 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 () |
Public Member Functions inherited from LazyObject | |
LazyObject () | |
~LazyObject () override=default | |
bool | isCalculated () const |
void | forwardFirstNotificationOnly () |
void | alwaysForwardNotifications () |
void | recalculate () |
void | freeze () |
void | unfreeze () |
Private Attributes | |
Real | exerciseTimeSquareRoot_ |
std::vector< Rate > | strikes_ |
std::vector< Handle< Quote > > | stdDevHandles_ |
Handle< Quote > | atmLevel_ |
std::vector< Volatility > | vols_ |
Interpolation | interpolation_ |
Additional Inherited Members | |
Public Types inherited from Observer | |
typedef set_type::iterator | iterator |
Protected Member Functions inherited from SmileSection | |
virtual void | initializeExerciseTime () const |
virtual Real | varianceImpl (Rate strike) const |
virtual Volatility | volatilityImpl (Rate strike) const =0 |
Protected Member Functions inherited from LazyObject | |
virtual void | calculate () const |
Protected Attributes inherited from LazyObject | |
bool | calculated_ = false |
bool | frozen_ = false |
bool | alwaysForward_ |
Definition at line 40 of file interpolatedsmilesection.hpp.
InterpolatedSmileSection | ( | Time | expiryTime, |
std::vector< Rate > | strikes, | ||
const std::vector< Handle< Quote > > & | stdDevHandles, | ||
Handle< Quote > | atmLevel, | ||
const Interpolator & | interpolator = Interpolator() , |
||
const DayCounter & | dc = Actual365Fixed() , |
||
VolatilityType | type = ShiftedLognormal , |
||
Real | shift = 0.0 |
||
) |
Definition at line 97 of file interpolatedsmilesection.hpp.
InterpolatedSmileSection | ( | Time | expiryTime, |
std::vector< Rate > | strikes, | ||
const std::vector< Real > & | stdDevs, | ||
Real | atmLevel, | ||
const Interpolator & | interpolator = Interpolator() , |
||
const DayCounter & | dc = Actual365Fixed() , |
||
VolatilityType | type = ShiftedLognormal , |
||
Real | shift = 0.0 |
||
) |
Definition at line 119 of file interpolatedsmilesection.hpp.
InterpolatedSmileSection | ( | const Date & | d, |
std::vector< Rate > | strikes, | ||
const std::vector< Handle< Quote > > & | stdDevHandles, | ||
Handle< Quote > | atmLevel, | ||
const DayCounter & | dc = Actual365Fixed() , |
||
const Interpolator & | interpolator = Interpolator() , |
||
const Date & | referenceDate = Date() , |
||
VolatilityType | type = ShiftedLognormal , |
||
Real | shift = 0.0 |
||
) |
Definition at line 145 of file interpolatedsmilesection.hpp.
InterpolatedSmileSection | ( | const Date & | d, |
std::vector< Rate > | strikes, | ||
const std::vector< Real > & | stdDevs, | ||
Real | atmLevel, | ||
const DayCounter & | dc = Actual365Fixed() , |
||
const Interpolator & | interpolator = Interpolator() , |
||
const Date & | referenceDate = Date() , |
||
VolatilityType | type = ShiftedLognormal , |
||
Real | shift = 0.0 |
||
) |
Definition at line 168 of file interpolatedsmilesection.hpp.
|
overridevirtual |
This method must implement any calculations which must be (re)done in order to calculate the desired results.
Implements LazyObject.
Definition at line 196 of file interpolatedsmilesection.hpp.
Reimplemented from SmileSection.
|
overridevirtual |
Implements SmileSection.
|
overridevirtual |
Implements SmileSection.
Definition at line 81 of file interpolatedsmilesection.hpp.
|
overridevirtual |
Implements SmileSection.
Definition at line 82 of file interpolatedsmilesection.hpp.
|
overridevirtual |
Implements SmileSection.
Definition at line 83 of file interpolatedsmilesection.hpp.
|
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.
Reimplemented from LazyObject.
|
private |
Definition at line 87 of file interpolatedsmilesection.hpp.
|
private |
Definition at line 88 of file interpolatedsmilesection.hpp.
Definition at line 89 of file interpolatedsmilesection.hpp.
Definition at line 90 of file interpolatedsmilesection.hpp.
|
mutableprivate |
Definition at line 91 of file interpolatedsmilesection.hpp.
|
mutableprivate |
Definition at line 92 of file interpolatedsmilesection.hpp.