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

EQ Black Scholes parametrization. More...

#include <qle/models/eqbsconstantparametrization.hpp>

+ Inheritance diagram for EqBsConstantParametrization:
+ Collaboration diagram for EqBsConstantParametrization:

Public Member Functions

 EqBsConstantParametrization (const Currency &currency, const std::string &eqName, const Handle< Quote > &eqSpotToday, const Handle< Quote > &fxSpotToday, const Real sigma, const Handle< YieldTermStructure > &eqIrCurveToday, const Handle< YieldTermStructure > &eqDivYieldCurveToday)
 
Real variance (const Time t) const override
 
Real sigma (const Time t) const override
 
const QuantLib::ext::shared_ptr< Parameter > parameter (const Size) const override
 
- Public Member Functions inherited from EqBsParametrization
 EqBsParametrization (const Currency &eqCcy, const std::string &eqName, const Handle< Quote > &equitySpotToday, const Handle< Quote > &fxSpotToday, const Handle< YieldTermStructure > &equityIrCurveToday, const Handle< YieldTermStructure > &equityDivYieldCurveToday)
 
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 > eqSpotToday () const
 
const Handle< Quote > fxSpotToday () const
 
const Handle< YieldTermStructure > equityIrCurveToday () const
 
const Handle< YieldTermStructure > equityDivYieldCurveToday () 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
 

Protected Member Functions

Real direct (const Size i, const Real x) const override
 
Real inverse (const Size i, const Real y) const override
 
- 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
 

Private Attributes

const QuantLib::ext::shared_ptr< PseudoParametersigma_
 

Additional Inherited Members

- Protected Attributes inherited from Parametrization
const Real h_
 
const Real h2_
 

Detailed Description

EQ Black Scholes parametrization.

EQ Black Scholes parametrization, with constant volatility

Definition at line 34 of file eqbsconstantparametrization.hpp.

Constructor & Destructor Documentation

◆ EqBsConstantParametrization()

EqBsConstantParametrization ( const Currency &  currency,
const std::string &  eqName,
const Handle< Quote > &  eqSpotToday,
const Handle< Quote > &  fxSpotToday,
const Real  sigma,
const Handle< YieldTermStructure > &  eqIrCurveToday,
const Handle< YieldTermStructure > &  eqDivYieldCurveToday 
)

The currency refers to the equity currency, the spots are as of today (i.e. the discounted spot)

Definition at line 24 of file eqbsconstantparametrization.cpp.

29 : EqBsParametrization(currency, eqName, eqSpotToday, fxSpotToday, eqIrCurveToday, eqDivYieldCurveToday),
30 sigma_(QuantLib::ext::make_shared<PseudoParameter>(1)) {
31 sigma_->setParam(0, inverse(0, sigma));
32}
Real inverse(const Size i, const Real y) const override
const QuantLib::ext::shared_ptr< PseudoParameter > sigma_
const Handle< Quote > eqSpotToday() const
EqBsParametrization(const Currency &eqCcy, const std::string &eqName, const Handle< Quote > &equitySpotToday, const Handle< Quote > &fxSpotToday, const Handle< YieldTermStructure > &equityIrCurveToday, const Handle< YieldTermStructure > &equityDivYieldCurveToday)
const Handle< Quote > fxSpotToday() const
virtual const Currency & currency() const
+ Here is the call graph for this function:

Member Function Documentation

◆ variance()

Real variance ( const Time  t) const
overridevirtual

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

Implements EqBsParametrization.

Definition at line 60 of file eqbsconstantparametrization.hpp.

60 {
61 return direct(0, sigma_->params()[0]) * direct(0, sigma_->params()[0]) * t;
62}
Real direct(const Size i, const Real x) const override
+ Here is the call graph for this function:

◆ sigma()

Real sigma ( const Time  t) const
overridevirtual

is supposed to be positive

Reimplemented from EqBsParametrization.

Definition at line 64 of file eqbsconstantparametrization.hpp.

64{ return direct(0, sigma_->params()[0]); }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ parameter()

const QuantLib::ext::shared_ptr< Parameter > parameter ( const Size  Size) const
overridevirtual

the parameter storing the raw parameter values

Reimplemented from Parametrization.

Definition at line 66 of file eqbsconstantparametrization.hpp.

66 {
67 QL_REQUIRE(i == 0, "parameter " << i << " does not exist, only have 0");
68 return sigma_;
69}

◆ direct()

Real direct ( const Size  Size,
const Real  x 
) const
overrideprotectedvirtual

transformations between raw and actual parameters

Reimplemented from Parametrization.

Definition at line 56 of file eqbsconstantparametrization.hpp.

56{ return x * x; }
+ Here is the caller graph for this function:

◆ inverse()

Real inverse ( const Size  i,
const Real  y 
) const
overrideprotectedvirtual

Reimplemented from Parametrization.

Definition at line 58 of file eqbsconstantparametrization.hpp.

58{ return std::sqrt(y); }
+ Here is the caller graph for this function:

Member Data Documentation

◆ sigma_

const QuantLib::ext::shared_ptr<PseudoParameter> sigma_
private

Definition at line 51 of file eqbsconstantparametrization.hpp.