QuantLib: a free/open-source library for quantitative finance
Fully annotated sources - version 1.32
Loading...
Searching...
No Matches
List of all members
NoArbSabrInterpolatedSmileSection Class Reference

#include <ql/experimental/volatility/noarbsabrinterpolatedsmilesection.hpp>

+ Inheritance diagram for NoArbSabrInterpolatedSmileSection:
+ Collaboration diagram for NoArbSabrInterpolatedSmileSection:

Public Member Functions

Constructors
 NoArbSabrInterpolatedSmileSection (const Date &optionDate, Handle< Quote > forward, const std::vector< Rate > &strikes, bool hasFloatingStrikes, Handle< Quote > atmVolatility, const std::vector< Handle< Quote > > &volHandles, Real alpha, Real beta, Real nu, Real rho, bool isAlphaFixed=false, bool isBetaFixed=false, bool isNuFixed=false, bool isRhoFixed=false, 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...
 
 NoArbSabrInterpolatedSmileSection (const Date &optionDate, const Rate &forward, const std::vector< Rate > &strikes, bool hasFloatingStrikes, const Volatility &atmVolatility, const std::vector< Volatility > &vols, Real alpha, Real beta, Real nu, Real rho, bool isAlphaFixed=false, bool isBetaFixed=false, bool isNuFixed=false, bool isRhoFixed=false, 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 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 ()
 
- 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< NoArbSabrInterpolationnoArbSabrInterpolation_
 
const Handle< Quoteforward_
 Market data. More...
 
const Handle< QuoteatmVolatility_
 
std::vector< Handle< Quote > > volHandles_
 
std::vector< Ratestrikes_
 
std::vector< RateactualStrikes_
 Only strikes corresponding to valid market data. More...
 
bool hasFloatingStrikes_
 
Real forwardValue_
 
std::vector< Volatilityvols_
 
Real alpha_
 Sabr parameters. More...
 
Real beta_
 
Real nu_
 
Real rho_
 
bool isAlphaFixed_
 Sabr interpolation settings. More...
 
bool isBetaFixed_
 
bool isNuFixed_
 
bool isRhoFixed_
 
bool vegaWeighted_
 
const ext::shared_ptr< EndCriteriaendCriteria_
 
const ext::shared_ptr< OptimizationMethodmethod_
 
Real alpha () const
 
Real beta () const
 
Real nu () const
 
Real rho () const
 
Real rmsError () const
 
Real maxError () const
 
EndCriteria::Type endCriteria () const
 
void createInterpolation () const
 Creates the mutable SABRInterpolation. 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_
 

Detailed Description

Definition at line 36 of file noarbsabrinterpolatedsmilesection.hpp.

Constructor & Destructor Documentation

◆ NoArbSabrInterpolatedSmileSection() [1/2]

NoArbSabrInterpolatedSmileSection ( const Date optionDate,
Handle< Quote forward,
const std::vector< Rate > &  strikes,
bool  hasFloatingStrikes,
Handle< Quote atmVolatility,
const std::vector< Handle< Quote > > &  volHandles,
Real  alpha,
Real  beta,
Real  nu,
Real  rho,
bool  isAlphaFixed = false,
bool  isBetaFixed = false,
bool  isNuFixed = false,
bool  isRhoFixed = false,
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 noarbsabrinterpolatedsmilesection.cpp.

+ Here is the call graph for this function:

◆ NoArbSabrInterpolatedSmileSection() [2/2]

NoArbSabrInterpolatedSmileSection ( const Date optionDate,
const Rate forward,
const std::vector< Rate > &  strikes,
bool  hasFloatingStrikes,
const Volatility atmVolatility,
const std::vector< Volatility > &  vols,
Real  alpha,
Real  beta,
Real  nu,
Real  rho,
bool  isAlphaFixed = false,
bool  isBetaFixed = false,
bool  isNuFixed = false,
bool  isRhoFixed = false,
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 60 of file noarbsabrinterpolatedsmilesection.cpp.

Member Function Documentation

◆ performCalculations()

void performCalculations ( ) const
overridevirtual

This method must implement any calculations which must be (re)done in order to calculate the desired results.

Implements LazyObject.

Definition at line 102 of file noarbsabrinterpolatedsmilesection.cpp.

+ Here is the call graph for this function:

◆ update()

void update ( )
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 132 of file noarbsabrinterpolatedsmilesection.hpp.

+ Here is the call graph for this function:

◆ minStrike()

Real minStrike ( ) const
overridevirtual

Implements SmileSection.

Definition at line 177 of file noarbsabrinterpolatedsmilesection.hpp.

+ Here is the call graph for this function:

◆ maxStrike()

Real maxStrike ( ) const
overridevirtual

Implements SmileSection.

Definition at line 183 of file noarbsabrinterpolatedsmilesection.hpp.

+ Here is the call graph for this function:

◆ atmLevel()

Real atmLevel ( ) const
overridevirtual

Implements SmileSection.

Definition at line 188 of file noarbsabrinterpolatedsmilesection.hpp.

+ Here is the call graph for this function:

◆ varianceImpl()

Real varianceImpl ( Rate  strike) const
overridevirtual

Reimplemented from SmileSection.

Definition at line 124 of file noarbsabrinterpolatedsmilesection.cpp.

+ Here is the call graph for this function:

◆ volatilityImpl()

Real volatilityImpl ( Rate  strike) const
overridevirtual

Implements SmileSection.

Definition at line 137 of file noarbsabrinterpolatedsmilesection.hpp.

+ Here is the call graph for this function:

◆ alpha()

Real alpha ( ) const

Definition at line 142 of file noarbsabrinterpolatedsmilesection.hpp.

+ Here is the call graph for this function:

◆ beta()

Real beta ( ) const

Definition at line 147 of file noarbsabrinterpolatedsmilesection.hpp.

+ Here is the call graph for this function:

◆ nu()

Real nu ( ) const

Definition at line 152 of file noarbsabrinterpolatedsmilesection.hpp.

+ Here is the call graph for this function:

◆ rho()

Real rho ( ) const

Definition at line 157 of file noarbsabrinterpolatedsmilesection.hpp.

+ Here is the call graph for this function:

◆ rmsError()

Real rmsError ( ) const

Definition at line 162 of file noarbsabrinterpolatedsmilesection.hpp.

+ Here is the call graph for this function:

◆ maxError()

Real maxError ( ) const

Definition at line 167 of file noarbsabrinterpolatedsmilesection.hpp.

+ Here is the call graph for this function:

◆ endCriteria()

EndCriteria::Type endCriteria ( ) const

Definition at line 172 of file noarbsabrinterpolatedsmilesection.hpp.

+ Here is the call graph for this function:

◆ createInterpolation()

void createInterpolation ( ) const
protected

Creates the mutable SABRInterpolation.

Definition at line 92 of file noarbsabrinterpolatedsmilesection.cpp.

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

Member Data Documentation

◆ noArbSabrInterpolation_

ext::shared_ptr<NoArbSabrInterpolation> noArbSabrInterpolation_
mutableprotected

Definition at line 110 of file noarbsabrinterpolatedsmilesection.hpp.

◆ forward_

const Handle<Quote> forward_
protected

Market data.

Definition at line 113 of file noarbsabrinterpolatedsmilesection.hpp.

◆ atmVolatility_

const Handle<Quote> atmVolatility_
protected

Definition at line 114 of file noarbsabrinterpolatedsmilesection.hpp.

◆ volHandles_

std::vector<Handle<Quote> > volHandles_
protected

Definition at line 115 of file noarbsabrinterpolatedsmilesection.hpp.

◆ strikes_

std::vector<Rate> strikes_
mutableprotected

Definition at line 116 of file noarbsabrinterpolatedsmilesection.hpp.

◆ actualStrikes_

std::vector<Rate> actualStrikes_
mutableprotected

Only strikes corresponding to valid market data.

Definition at line 118 of file noarbsabrinterpolatedsmilesection.hpp.

◆ hasFloatingStrikes_

bool hasFloatingStrikes_
protected

Definition at line 119 of file noarbsabrinterpolatedsmilesection.hpp.

◆ forwardValue_

Real forwardValue_
mutableprotected

Definition at line 121 of file noarbsabrinterpolatedsmilesection.hpp.

◆ vols_

std::vector<Volatility> vols_
mutableprotected

Definition at line 122 of file noarbsabrinterpolatedsmilesection.hpp.

◆ alpha_

Real alpha_
protected

Sabr parameters.

Definition at line 124 of file noarbsabrinterpolatedsmilesection.hpp.

◆ beta_

Real beta_
protected

Definition at line 124 of file noarbsabrinterpolatedsmilesection.hpp.

◆ nu_

Real nu_
protected

Definition at line 124 of file noarbsabrinterpolatedsmilesection.hpp.

◆ rho_

Real rho_
protected

Definition at line 124 of file noarbsabrinterpolatedsmilesection.hpp.

◆ isAlphaFixed_

bool isAlphaFixed_
protected

Sabr interpolation settings.

Definition at line 126 of file noarbsabrinterpolatedsmilesection.hpp.

◆ isBetaFixed_

bool isBetaFixed_
protected

Definition at line 126 of file noarbsabrinterpolatedsmilesection.hpp.

◆ isNuFixed_

bool isNuFixed_
protected

Definition at line 126 of file noarbsabrinterpolatedsmilesection.hpp.

◆ isRhoFixed_

bool isRhoFixed_
protected

Definition at line 126 of file noarbsabrinterpolatedsmilesection.hpp.

◆ vegaWeighted_

bool vegaWeighted_
protected

Definition at line 127 of file noarbsabrinterpolatedsmilesection.hpp.

◆ endCriteria_

const ext::shared_ptr<EndCriteria> endCriteria_
protected

Definition at line 128 of file noarbsabrinterpolatedsmilesection.hpp.

◆ method_

const ext::shared_ptr<OptimizationMethod> method_
protected

Definition at line 129 of file noarbsabrinterpolatedsmilesection.hpp.