QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
Loading...
Searching...
No Matches
List of all members
SviSmileSection Class Reference

Stochastic Volatility Inspired Smile Section. More...

#include <svismilesection.hpp>

+ Inheritance diagram for SviSmileSection:
+ Collaboration diagram for SviSmileSection:

Constructors

Rate forward_
 
std::vector< Realparams_
 
 SviSmileSection (Time timeToExpiry, Rate forward, std::vector< Real > sviParameters)
 
 SviSmileSection (const Date &d, Rate forward, std::vector< Real > sviParameters, const DayCounter &dc=Actual365Fixed())
 
Real minStrike () const override
 
Real maxStrike () const override
 
Real atmLevel () const override
 
Volatility volatilityImpl (Rate strike) const override
 
void init ()
 

Additional Inherited Members

- Public Types inherited from Observer
typedef set_type::iterator iterator
 
- 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 DateexerciseDate () const
 
virtual VolatilityType volatilityType () const
 
virtual Rate shift () const
 
virtual const DatereferenceDate () const
 
virtual Time exerciseTime () const
 
virtual const DayCounterdayCounter () 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 &)
 
Observableoperator= (const Observable &)
 
 Observable (Observable &&)=delete
 
Observableoperator= (Observable &&)=delete
 
virtual ~Observable ()=default
 
void notifyObservers ()
 
- Public Member Functions inherited from Observer
 Observer ()=default
 
 Observer (const Observer &)
 
Observeroperator= (const Observer &)
 
virtual ~Observer ()
 
std::pair< iterator, boolregisterWith (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 inherited from SmileSection
virtual void initializeExerciseTime () const
 
virtual Real varianceImpl (Rate strike) const
 
virtual Volatility volatilityImpl (Rate strike) const =0
 

Detailed Description

Stochastic Volatility Inspired Smile Section.

Tests:
the correctness of the result is tested by checking it against known good values.

Definition at line 37 of file svismilesection.hpp.

Constructor & Destructor Documentation

◆ SviSmileSection() [1/2]

SviSmileSection ( Time  timeToExpiry,
Rate  forward,
std::vector< Real sviParameters 
)
Parameters
timeToExpiryTime to expiry
forwardForward price corresponding to the expiry date
sviParametersExpects SVI parameters as a vector composed of a, b, sigma, rho, m

Definition at line 26 of file svismilesection.cpp.

+ Here is the call graph for this function:

◆ SviSmileSection() [2/2]

SviSmileSection ( const Date d,
Rate  forward,
std::vector< Real sviParameters,
const DayCounter dc = Actual365Fixed() 
)
Parameters
dDate of expiry
forwardForward price corresponding to the expiry date
sviParametersExpects SVI parameters as a vector composed of a, b, sigma, rho, m
dcDay count method used to compute the time to expiry

Definition at line 31 of file svismilesection.cpp.

+ Here is the call graph for this function:

Member Function Documentation

◆ minStrike()

Real minStrike ( ) const
overridevirtual

Implements SmileSection.

Definition at line 57 of file svismilesection.hpp.

◆ maxStrike()

Real maxStrike ( ) const
overridevirtual

Implements SmileSection.

Definition at line 58 of file svismilesection.hpp.

◆ atmLevel()

Real atmLevel ( ) const
overridevirtual

Implements SmileSection.

Definition at line 59 of file svismilesection.hpp.

◆ volatilityImpl()

Volatility volatilityImpl ( Rate  strike) const
overrideprotectedvirtual

Implements SmileSection.

Definition at line 48 of file svismilesection.cpp.

+ Here is the call graph for this function:

◆ init()

void init ( )
private

Definition at line 39 of file svismilesection.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ forward_

Rate forward_
private

Definition at line 66 of file svismilesection.hpp.

◆ params_

std::vector<Real> params_
private

Definition at line 67 of file svismilesection.hpp.