|
QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.38
|
#include <sviinterpolatedsmilesection.hpp>
Inheritance diagram for SviInterpolatedSmileSection:
Collaboration diagram for SviInterpolatedSmileSection:Public Member Functions | |
Constructors | |
| SviInterpolatedSmileSection (const Date &optionDate, Handle< Quote > forward, const std::vector< Rate > &strikes, bool hasFloatingStrikes, Handle< Quote > atmVolatility, const std::vector< Handle< Quote > > &volHandles, Real a, Real b, Real sigma, Real rho, Real m, bool aIsFixed, bool bIsFixed, bool sigmaIsFixed, bool rhoIsFixed, bool mIsFixed, bool vegaWeighted=true, ext::shared_ptr< EndCriteria > endCriteria=ext::shared_ptr< EndCriteria >(), ext::shared_ptr< OptimizationMethod > method=ext::shared_ptr< OptimizationMethod >(), const DayCounter &dc=Actual365Fixed()) | |
| all market data are quotes More... | |
| SviInterpolatedSmileSection (const Date &optionDate, const Rate &forward, const std::vector< Rate > &strikes, bool hasFloatingStrikes, const Volatility &atmVolatility, const std::vector< Volatility > &vols, Real a, Real b, Real sigma, Real rho, Real m, bool isAFixed, bool isBFixed, bool isSigmaFixed, bool isRhoFixed, bool isMFixed, bool vegaWeighted=true, ext::shared_ptr< EndCriteria > endCriteria=ext::shared_ptr< EndCriteria >(), ext::shared_ptr< OptimizationMethod > method=ext::shared_ptr< OptimizationMethod >(), const DayCounter &dc=Actual365Fixed()) | |
| no quotes More... | |
LazyObject interface | |
| void | performCalculations () const override |
| void | update () override |
SmileSection interface | |
| Real | minStrike () const override |
| Real | maxStrike () const override |
| Real | atmLevel () const override |
| Real | varianceImpl (Rate strike) const override |
| Volatility | volatilityImpl (Rate strike) 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 ()=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 () |
Public Member Functions inherited from LazyObject | |
| LazyObject () | |
| ~LazyObject () override=default | |
| void | update () override |
| bool | isCalculated () const |
| void | forwardFirstNotificationOnly () |
| void | alwaysForwardNotifications () |
| void | recalculate () |
| void | freeze () |
| void | unfreeze () |
Inspectors | |
| ext::shared_ptr< SviInterpolation > | sviInterpolation_ |
| const Handle< Quote > | forward_ |
| Market data. More... | |
| const Handle< Quote > | atmVolatility_ |
| std::vector< Handle< Quote > > | volHandles_ |
| std::vector< Rate > | strikes_ |
| std::vector< Rate > | actualStrikes_ |
| Only strikes corresponding to valid market data. More... | |
| bool | hasFloatingStrikes_ |
| Real | forwardValue_ |
| std::vector< Volatility > | vols_ |
| Real | a_ |
| Svi parameters. More... | |
| Real | b_ |
| Real | sigma_ |
| Real | rho_ |
| Real | m_ |
| bool | isAFixed_ |
| Svi interpolation settings. More... | |
| bool | isBFixed_ |
| bool | isSigmaFixed_ |
| bool | isRhoFixed_ |
| bool | isMFixed_ |
| bool | vegaWeighted_ |
| const ext::shared_ptr< EndCriteria > | endCriteria_ |
| const ext::shared_ptr< OptimizationMethod > | method_ |
| Real | a () const |
| Real | b () const |
| Real | sigma () const |
| Real | rho () const |
| Real | m () const |
| Real | rmsError () const |
| Real | maxError () const |
| EndCriteria::Type | endCriteria () const |
| void | createInterpolation () const |
| Creates the mutable SviInterpolation. More... | |
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 36 of file sviinterpolatedsmilesection.hpp.
| SviInterpolatedSmileSection | ( | const Date & | optionDate, |
| Handle< Quote > | forward, | ||
| const std::vector< Rate > & | strikes, | ||
| bool | hasFloatingStrikes, | ||
| Handle< Quote > | atmVolatility, | ||
| const std::vector< Handle< Quote > > & | volHandles, | ||
| Real | a, | ||
| Real | b, | ||
| Real | sigma, | ||
| Real | rho, | ||
| Real | m, | ||
| bool | aIsFixed, | ||
| bool | bIsFixed, | ||
| bool | sigmaIsFixed, | ||
| bool | rhoIsFixed, | ||
| bool | mIsFixed, | ||
| bool | vegaWeighted = true, |
||
| ext::shared_ptr< EndCriteria > | endCriteria = ext::shared_ptr<EndCriteria>(), |
||
| ext::shared_ptr< OptimizationMethod > | method = ext::shared_ptr<OptimizationMethod>(), |
||
| const DayCounter & | dc = Actual365Fixed() |
||
| ) |
all market data are quotes
Definition at line 27 of file sviinterpolatedsmilesection.cpp.
Here is the call graph for this function:| SviInterpolatedSmileSection | ( | const Date & | optionDate, |
| const Rate & | forward, | ||
| const std::vector< Rate > & | strikes, | ||
| bool | hasFloatingStrikes, | ||
| const Volatility & | atmVolatility, | ||
| const std::vector< Volatility > & | vols, | ||
| Real | a, | ||
| Real | b, | ||
| Real | sigma, | ||
| Real | rho, | ||
| Real | m, | ||
| bool | isAFixed, | ||
| bool | isBFixed, | ||
| bool | isSigmaFixed, | ||
| bool | isRhoFixed, | ||
| bool | isMFixed, | ||
| bool | vegaWeighted = true, |
||
| ext::shared_ptr< EndCriteria > | endCriteria = ext::shared_ptr<EndCriteria>(), |
||
| ext::shared_ptr< OptimizationMethod > | method = ext::shared_ptr<OptimizationMethod>(), |
||
| const DayCounter & | dc = Actual365Fixed() |
||
| ) |
no quotes
Definition at line 62 of file sviinterpolatedsmilesection.cpp.
|
overridevirtual |
This method must implement any calculations which must be (re)done in order to calculate the desired results.
Implements LazyObject.
Definition at line 106 of file sviinterpolatedsmilesection.cpp.
Here is the call graph for this function:
|
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.
Definition at line 135 of file sviinterpolatedsmilesection.hpp.
Here is the call graph for this function:
|
overridevirtual |
Implements SmileSection.
Definition at line 185 of file sviinterpolatedsmilesection.hpp.
Here is the call graph for this function:
|
overridevirtual |
Implements SmileSection.
Definition at line 190 of file sviinterpolatedsmilesection.hpp.
Here is the call graph for this function:
|
overridevirtual |
Implements SmileSection.
Definition at line 195 of file sviinterpolatedsmilesection.hpp.
Here is the call graph for this function:Reimplemented from SmileSection.
Definition at line 129 of file sviinterpolatedsmilesection.cpp.
Here is the call graph for this function:Implements SmileSection.
Definition at line 140 of file sviinterpolatedsmilesection.hpp.
Here is the call graph for this function:| Real a | ( | ) | const |
Definition at line 145 of file sviinterpolatedsmilesection.hpp.
Here is the call graph for this function:| Real b | ( | ) | const |
Definition at line 150 of file sviinterpolatedsmilesection.hpp.
Here is the call graph for this function:| Real sigma | ( | ) | const |
Definition at line 155 of file sviinterpolatedsmilesection.hpp.
Here is the call graph for this function:| Real rho | ( | ) | const |
Definition at line 160 of file sviinterpolatedsmilesection.hpp.
Here is the call graph for this function:| Real m | ( | ) | const |
Definition at line 165 of file sviinterpolatedsmilesection.hpp.
Here is the call graph for this function:| Real rmsError | ( | ) | const |
Definition at line 170 of file sviinterpolatedsmilesection.hpp.
Here is the call graph for this function:| Real maxError | ( | ) | const |
Definition at line 175 of file sviinterpolatedsmilesection.hpp.
Here is the call graph for this function:| EndCriteria::Type endCriteria | ( | ) | const |
Definition at line 180 of file sviinterpolatedsmilesection.hpp.
Here is the call graph for this function:
|
protected |
Creates the mutable SviInterpolation.
Definition at line 97 of file sviinterpolatedsmilesection.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
mutableprotected |
Definition at line 113 of file sviinterpolatedsmilesection.hpp.
Market data.
Definition at line 116 of file sviinterpolatedsmilesection.hpp.
Definition at line 117 of file sviinterpolatedsmilesection.hpp.
Definition at line 118 of file sviinterpolatedsmilesection.hpp.
|
mutableprotected |
Definition at line 119 of file sviinterpolatedsmilesection.hpp.
|
mutableprotected |
Only strikes corresponding to valid market data.
Definition at line 121 of file sviinterpolatedsmilesection.hpp.
|
protected |
Definition at line 122 of file sviinterpolatedsmilesection.hpp.
|
mutableprotected |
Definition at line 124 of file sviinterpolatedsmilesection.hpp.
|
mutableprotected |
Definition at line 125 of file sviinterpolatedsmilesection.hpp.
|
protected |
Svi parameters.
Definition at line 127 of file sviinterpolatedsmilesection.hpp.
|
protected |
Definition at line 127 of file sviinterpolatedsmilesection.hpp.
|
protected |
Definition at line 127 of file sviinterpolatedsmilesection.hpp.
|
protected |
Definition at line 127 of file sviinterpolatedsmilesection.hpp.
|
protected |
Definition at line 127 of file sviinterpolatedsmilesection.hpp.
|
protected |
Svi interpolation settings.
Definition at line 129 of file sviinterpolatedsmilesection.hpp.
|
protected |
Definition at line 129 of file sviinterpolatedsmilesection.hpp.
|
protected |
Definition at line 129 of file sviinterpolatedsmilesection.hpp.
|
protected |
Definition at line 129 of file sviinterpolatedsmilesection.hpp.
|
protected |
Definition at line 129 of file sviinterpolatedsmilesection.hpp.
|
protected |
Definition at line 130 of file sviinterpolatedsmilesection.hpp.
|
protected |
Definition at line 131 of file sviinterpolatedsmilesection.hpp.
|
protected |
Definition at line 132 of file sviinterpolatedsmilesection.hpp.