Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
FxBsParametrization Class Referenceabstract

FX Black Scholes parametrizations. More...

#include <qle/models/fxbsparametrization.hpp>

+ Inheritance diagram for FxBsParametrization:
+ Collaboration diagram for FxBsParametrization:

Public Member Functions

 FxBsParametrization (const Currency &foreignCurrency, const Handle< Quote > &fxSpotToday)
 
virtual Real variance (const Time t) const =0
 
virtual Real sigma (const Time t) const
 
virtual Real stdDeviation (const Time t) const
 
const Handle< Quote > fxSpotToday () const
 
Size numberOfParameters () const override
 
- Public Member Functions inherited from Parametrization
 Parametrization (const Currency &currency, const std::string &name="")
 
virtual ~Parametrization ()
 
virtual const Currency & currency () const
 
virtual const Array & parameterTimes (const Size) const
 
virtual Size numberOfParameters () const
 
virtual Array parameterValues (const Size) const
 
virtual const QuantLib::ext::shared_ptr< Parameter > parameter (const Size) const
 
virtual void update () const
 
const std::string & name () const
 
virtual Real direct (const Size, const Real x) const
 
virtual Real inverse (const Size, const Real y) const
 

Private Attributes

const Handle< Quote > fxSpotToday_
 

Additional Inherited Members

- Protected Member Functions inherited from Parametrization
Time tr (const Time t) const
 
Time tl (const Time t) const
 
Time tr2 (const Time t) const
 
Time tm2 (const Time t) const
 
Time tl2 (const Time t) const
 
- Protected Attributes inherited from Parametrization
const Real h_
 
const Real h2_
 

Detailed Description

FX Black Scholes parametrizations.

Base class for FX Black Scholes parametrizations

Definition at line 38 of file fxbsparametrization.hpp.

Constructor & Destructor Documentation

◆ FxBsParametrization()

FxBsParametrization ( const Currency &  foreignCurrency,
const Handle< Quote > &  fxSpotToday 
)

The currency refers to the foreign currency, the spot is as of today (i.e. the discounted spot)

Definition at line 23 of file fxbsparametrization.cpp.

24 : Parametrization(foreignCurrency), fxSpotToday_(fxSpotToday) {}
const Handle< Quote > fxSpotToday_
const Handle< Quote > fxSpotToday() const
Parametrization(const Currency &currency, const std::string &name="")

Member Function Documentation

◆ variance()

virtual Real variance ( const Time  t) const
pure virtual

must satisfy variance(0) = 0.0, variance'(t) >= 0

Implemented in FxBsConstantParametrization, and FxBsPiecewiseConstantParametrization.

+ Here is the caller graph for this function:

◆ sigma()

Real sigma ( const Time  t) const
virtual

is supposed to be positive

Reimplemented in FxBsConstantParametrization, and FxBsPiecewiseConstantParametrization.

Definition at line 58 of file fxbsparametrization.hpp.

58 {
59 return std::sqrt((variance(tr(t)) - variance(tl(t))) / h_);
60}
virtual Real variance(const Time t) const =0
Time tl(const Time t) const
Time tr(const Time t) const
+ Here is the call graph for this function:

◆ stdDeviation()

Real stdDeviation ( const Time  t) const
virtual

Definition at line 62 of file fxbsparametrization.hpp.

62{ return std::sqrt(variance(t)); }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fxSpotToday()

const Handle< Quote > fxSpotToday ( ) const

Definition at line 64 of file fxbsparametrization.hpp.

64{ return fxSpotToday_; }

◆ numberOfParameters()

Size numberOfParameters ( ) const
overridevirtual

the number of parameters in this parametrization

Reimplemented from Parametrization.

Definition at line 50 of file fxbsparametrization.hpp.

50{ return 1; }

Member Data Documentation

◆ fxSpotToday_

const Handle<Quote> fxSpotToday_
private

Definition at line 53 of file fxbsparametrization.hpp.