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

#include <spreadedsmilesection.hpp>

+ Inheritance diagram for SpreadedSmileSection:
+ Collaboration diagram for SpreadedSmileSection:

Public Member Functions

 SpreadedSmileSection (ext::shared_ptr< SmileSection >, Handle< Quote > spread)
 
SmileSection interface
Real minStrike () const override
 
Real maxStrike () const override
 
Real atmLevel () const override
 
const DateexerciseDate () const override
 
Time exerciseTime () const override
 
const DayCounterdayCounter () const override
 
const DatereferenceDate () const override
 
VolatilityType volatilityType () const override
 
Rate shift () 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 ()
 

LazyObject interface

const ext::shared_ptr< SmileSectionunderlyingSection_
 
const Handle< Quotespread_
 
void update () override
 
Volatility volatilityImpl (Rate strike) const override
 

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
 

Detailed Description

Definition at line 34 of file spreadedsmilesection.hpp.

Constructor & Destructor Documentation

◆ SpreadedSmileSection()

SpreadedSmileSection ( ext::shared_ptr< SmileSection underlyingSection,
Handle< Quote spread 
)

Definition at line 26 of file spreadedsmilesection.cpp.

+ Here is the call graph for this function:

Member Function Documentation

◆ minStrike()

Real minStrike ( ) const
overridevirtual

Implements SmileSection.

Definition at line 61 of file spreadedsmilesection.hpp.

◆ maxStrike()

Real maxStrike ( ) const
overridevirtual

Implements SmileSection.

Definition at line 65 of file spreadedsmilesection.hpp.

◆ atmLevel()

Real atmLevel ( ) const
overridevirtual

Implements SmileSection.

Definition at line 69 of file spreadedsmilesection.hpp.

◆ exerciseDate()

const Date & exerciseDate ( ) const
overridevirtual

Reimplemented from SmileSection.

Definition at line 73 of file spreadedsmilesection.hpp.

◆ exerciseTime()

Time exerciseTime ( ) const
overridevirtual

Reimplemented from SmileSection.

Definition at line 77 of file spreadedsmilesection.hpp.

◆ dayCounter()

const DayCounter & dayCounter ( ) const
overridevirtual

Reimplemented from SmileSection.

Definition at line 81 of file spreadedsmilesection.hpp.

◆ referenceDate()

const Date & referenceDate ( ) const
overridevirtual

Reimplemented from SmileSection.

Definition at line 85 of file spreadedsmilesection.hpp.

◆ volatilityType()

VolatilityType volatilityType ( ) const
overridevirtual

Reimplemented from SmileSection.

Definition at line 89 of file spreadedsmilesection.hpp.

◆ shift()

Rate shift ( ) const
overridevirtual

Reimplemented from SmileSection.

Definition at line 93 of file spreadedsmilesection.hpp.

◆ 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.

Reimplemented from SmileSection.

Definition at line 51 of file spreadedsmilesection.hpp.

+ Here is the call graph for this function:

◆ volatilityImpl()

Volatility volatilityImpl ( Rate  strike) const
overrideprotectedvirtual

Implements SmileSection.

Definition at line 33 of file spreadedsmilesection.cpp.

Member Data Documentation

◆ underlyingSection_

const ext::shared_ptr<SmileSection> underlyingSection_
private

Definition at line 57 of file spreadedsmilesection.hpp.

◆ spread_

const Handle<Quote> spread_
private

Definition at line 58 of file spreadedsmilesection.hpp.