QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
|
#include <kahalesmilesection.hpp>
Classes | |
struct | aHelper |
struct | cFunction |
struct | sHelper |
struct | sHelper1 |
Public Member Functions | |
KahaleSmileSection (const ext::shared_ptr< SmileSection > &source, Real atm=Null< Real >(), bool interpolate=false, bool exponentialExtrapolation=false, bool deleteArbitragePoints=false, const std::vector< Real > &moneynessGrid=std::vector< Real >(), Real gap=1.0E-5, int forcedLeftIndex=-1, int forcedRightIndex=QL_MAX_INTEGER) | |
Real | minStrike () const override |
Real | maxStrike () const override |
Real | atmLevel () const override |
const Date & | exerciseDate () const override |
Time | exerciseTime () const override |
const DayCounter & | dayCounter () const override |
const Date & | referenceDate () const override |
VolatilityType | volatilityType () const override |
Real | shift () const override |
Real | leftCoreStrike () const |
Real | rightCoreStrike () const |
std::pair< Size, Size > | coreIndices () const |
Real | optionPrice (Rate strike, Option::Type type=Option::Call, Real discount=1.0) 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 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 | |
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 | |
Size | index (Rate strike) const |
void | compute () |
Private Attributes | |
ext::shared_ptr< SmileSection > | source_ |
std::vector< Real > | moneynessGrid_ |
std::vector< Real > | k_ |
std::vector< Real > | c_ |
Real | f_ |
const Real | gap_ |
Size | leftIndex_ |
Size | rightIndex_ |
std::vector< ext::shared_ptr< cFunction > > | cFunctions_ |
const bool | interpolate_ |
const bool | exponentialExtrapolation_ |
int | forcedLeftIndex_ |
int | forcedRightIndex_ |
ext::shared_ptr< SmileSectionUtils > | ssutils_ |
Additional Inherited Members | |
Public Types inherited from Observer | |
typedef set_type::iterator | iterator |
Definition at line 53 of file kahalesmilesection.hpp.
KahaleSmileSection | ( | const ext::shared_ptr< SmileSection > & | source, |
Real | atm = Null<Real>() , |
||
bool | interpolate = false , |
||
bool | exponentialExtrapolation = false , |
||
bool | deleteArbitragePoints = false , |
||
const std::vector< Real > & | moneynessGrid = std::vector<Real>() , |
||
Real | gap = 1.0E-5 , |
||
int | forcedLeftIndex = -1 , |
||
int | forcedRightIndex = QL_MAX_INTEGER |
||
) |
|
overridevirtual |
Implements SmileSection.
Definition at line 140 of file kahalesmilesection.hpp.
|
overridevirtual |
Implements SmileSection.
Definition at line 141 of file kahalesmilesection.hpp.
|
overridevirtual |
Implements SmileSection.
Definition at line 142 of file kahalesmilesection.hpp.
|
overridevirtual |
Reimplemented from SmileSection.
Definition at line 143 of file kahalesmilesection.hpp.
|
overridevirtual |
Reimplemented from SmileSection.
Definition at line 144 of file kahalesmilesection.hpp.
|
overridevirtual |
Reimplemented from SmileSection.
Definition at line 145 of file kahalesmilesection.hpp.
|
overridevirtual |
Reimplemented from SmileSection.
Definition at line 146 of file kahalesmilesection.hpp.
|
overridevirtual |
Reimplemented from SmileSection.
Definition at line 147 of file kahalesmilesection.hpp.
|
overridevirtual |
Reimplemented from SmileSection.
Definition at line 148 of file kahalesmilesection.hpp.
Real leftCoreStrike | ( | ) | const |
Definition at line 150 of file kahalesmilesection.hpp.
Real rightCoreStrike | ( | ) | const |
Definition at line 151 of file kahalesmilesection.hpp.
Definition at line 153 of file kahalesmilesection.hpp.
|
overridevirtual |
Reimplemented from SmileSection.
Definition at line 226 of file kahalesmilesection.cpp.
Implements SmileSection.
Definition at line 243 of file kahalesmilesection.cpp.
|
private |
Definition at line 64 of file kahalesmilesection.cpp.
|
private |
Definition at line 167 of file kahalesmilesection.hpp.
|
private |
Definition at line 168 of file kahalesmilesection.hpp.
|
private |
Definition at line 168 of file kahalesmilesection.hpp.
|
private |
Definition at line 168 of file kahalesmilesection.hpp.
|
private |
Definition at line 169 of file kahalesmilesection.hpp.
|
private |
Definition at line 170 of file kahalesmilesection.hpp.
|
private |
Definition at line 171 of file kahalesmilesection.hpp.
|
private |
Definition at line 171 of file kahalesmilesection.hpp.
|
private |
Definition at line 172 of file kahalesmilesection.hpp.
|
private |
Definition at line 173 of file kahalesmilesection.hpp.
|
private |
Definition at line 173 of file kahalesmilesection.hpp.
|
private |
Definition at line 174 of file kahalesmilesection.hpp.
|
private |
Definition at line 174 of file kahalesmilesection.hpp.
|
private |
Definition at line 175 of file kahalesmilesection.hpp.