QuantLib: a free/open-source library for quantitative finance
Fully annotated sources - version 1.32
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Private Attributes | List of all members
DeltaVolQuote Class Reference

Class for the quotation of delta vs vol. More...

#include <ql/experimental/fx/deltavolquote.hpp>

+ Inheritance diagram for DeltaVolQuote:
+ Collaboration diagram for DeltaVolQuote:

Public Types

enum  DeltaType { Spot , Fwd , PaSpot , PaFwd }
 
enum  AtmType {
  AtmNull , AtmSpot , AtmFwd , AtmDeltaNeutral ,
  AtmVegaMax , AtmGammaMax , AtmPutCall50
}
 
- Public Types inherited from Observer
typedef set_type::iterator iterator
 

Public Member Functions

 DeltaVolQuote (Real delta, Handle< Quote > vol, Time maturity, DeltaType deltaType)
 
 DeltaVolQuote (Handle< Quote > vol, DeltaType deltaType, Time maturity, AtmType atmType)
 
void update () override
 
Real value () const override
 returns the current value More...
 
Real delta () const
 
Time maturity () const
 
AtmType atmType () const
 
DeltaType deltaType () const
 
bool isValid () const override
 returns true if the Quote holds a valid value More...
 
- Public Member Functions inherited from Quote
 ~Quote () override=default
 
virtual Real value () const =0
 returns the current value More...
 
virtual bool isValid () const =0
 returns true if the Quote holds a valid value More...
 
- 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 ()
 

Private Attributes

Real delta_
 
Handle< Quotevol_
 
DeltaType deltaType_
 
Time maturity_
 
AtmType atmType_
 

Detailed Description

Class for the quotation of delta vs vol.

It includes the various delta quotation types in FX markets as well as ATM types.

Definition at line 36 of file deltavolquote.hpp.

Member Enumeration Documentation

◆ DeltaType

enum DeltaType
Enumerator
Spot 
Fwd 
PaSpot 
PaFwd 

Definition at line 39 of file deltavolquote.hpp.

◆ AtmType

enum AtmType
Enumerator
AtmNull 
AtmSpot 
AtmFwd 
AtmDeltaNeutral 
AtmVegaMax 
AtmGammaMax 
AtmPutCall50 

Definition at line 46 of file deltavolquote.hpp.

Constructor & Destructor Documentation

◆ DeltaVolQuote() [1/2]

DeltaVolQuote ( Real  delta,
Handle< Quote vol,
Time  maturity,
DeltaType  deltaType 
)

Definition at line 25 of file deltavolquote.cpp.

+ Here is the call graph for this function:

◆ DeltaVolQuote() [2/2]

DeltaVolQuote ( Handle< Quote vol,
DeltaType  deltaType,
Time  maturity,
AtmType  atmType 
)

Definition at line 32 of file deltavolquote.cpp.

+ Here is the call graph for this function:

Member Function Documentation

◆ 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 57 of file deltavolquote.cpp.

+ Here is the call graph for this function:

◆ value()

Real value ( ) const
overridevirtual

returns the current value

Implements Quote.

Definition at line 41 of file deltavolquote.cpp.

◆ delta()

Real delta ( ) const

Definition at line 45 of file deltavolquote.cpp.

◆ maturity()

Time maturity ( ) const

Definition at line 49 of file deltavolquote.cpp.

◆ atmType()

DeltaVolQuote::AtmType atmType ( ) const

Definition at line 61 of file deltavolquote.cpp.

◆ deltaType()

DeltaVolQuote::DeltaType deltaType ( ) const

Definition at line 65 of file deltavolquote.cpp.

◆ isValid()

bool isValid ( ) const
overridevirtual

returns true if the Quote holds a valid value

Implements Quote.

Definition at line 53 of file deltavolquote.cpp.

Member Data Documentation

◆ delta_

Real delta_
private

Definition at line 74 of file deltavolquote.hpp.

◆ vol_

Handle<Quote> vol_
private

Definition at line 75 of file deltavolquote.hpp.

◆ deltaType_

DeltaType deltaType_
private

Definition at line 76 of file deltavolquote.hpp.

◆ maturity_

Time maturity_
private

Definition at line 77 of file deltavolquote.hpp.

◆ atmType_

AtmType atmType_
private

Definition at line 78 of file deltavolquote.hpp.