QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
|
Class for the quotation of delta vs vol. More...
#include <deltavolquote.hpp>
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 &) | |
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 () |
Private Attributes | |
Real | delta_ |
Handle< Quote > | vol_ |
DeltaType | deltaType_ |
Time | maturity_ |
AtmType | atmType_ |
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.
enum DeltaType |
Enumerator | |
---|---|
Spot | |
Fwd | |
PaSpot | |
PaFwd |
Definition at line 39 of file deltavolquote.hpp.
enum AtmType |
Enumerator | |
---|---|
AtmNull | |
AtmSpot | |
AtmFwd | |
AtmDeltaNeutral | |
AtmVegaMax | |
AtmGammaMax | |
AtmPutCall50 |
Definition at line 46 of file deltavolquote.hpp.
|
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.
|
overridevirtual |
Real delta | ( | ) | const |
Definition at line 45 of file deltavolquote.cpp.
Time maturity | ( | ) | const |
Definition at line 49 of file deltavolquote.cpp.
DeltaVolQuote::AtmType atmType | ( | ) | const |
Definition at line 61 of file deltavolquote.cpp.
DeltaVolQuote::DeltaType deltaType | ( | ) | const |
Definition at line 65 of file deltavolquote.cpp.
|
overridevirtual |
returns true if the Quote holds a valid value
Implements Quote.
Definition at line 53 of file deltavolquote.cpp.
|
private |
Definition at line 74 of file deltavolquote.hpp.
Definition at line 75 of file deltavolquote.hpp.
|
private |
Definition at line 76 of file deltavolquote.hpp.
|
private |
Definition at line 77 of file deltavolquote.hpp.
|
private |
Definition at line 78 of file deltavolquote.hpp.