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
AbcdFunction Class Reference

Abcd functional form for instantaneous volatility More...

#include <abcd.hpp>

+ Inheritance diagram for AbcdFunction:
+ Collaboration diagram for AbcdFunction:

Public Member Functions

 AbcdFunction (Real a=-0.06, Real b=0.17, Real c=0.54, Real d=0.17)
 
Real maximumVolatility () const
 maximum value of the volatility function More...
 
Real shortTermVolatility () const
 volatility function value at time 0: More...
 
Real longTermVolatility () const
 volatility function value at time +inf: More...
 
Real covariance (Time t, Time T, Time S) const
 
Real covariance (Time t1, Time t2, Time T, Time S) const
 
Real volatility (Time tMin, Time tMax, Time T) const
 
Real variance (Time tMin, Time tMax, Time T) const
 
Real instantaneousVolatility (Time t, Time T) const
 
Real instantaneousVariance (Time t, Time T) const
 
Real instantaneousCovariance (Time u, Time T, Time S) const
 
Real primitive (Time t, Time T, Time S) const
 
- Public Member Functions inherited from AbcdMathFunction
 AbcdMathFunction (Real a=0.002, Real b=0.001, Real c=0.16, Real d=0.0005)
 
 AbcdMathFunction (std::vector< Real > abcd)
 
Real operator() (Time t) const
 function value at time t: More...
 
Time maximumLocation () const
 time at which the function reaches maximum (if any) More...
 
Real maximumValue () const
 maximum value of the function More...
 
Real longTermValue () const
 function value at time +inf: More...
 
Real derivative (Time t) const
 
Real primitive (Time t) const
 
Real definiteIntegral (Time t1, Time t2) const
 
Real a () const
 
Real b () const
 
Real c () const
 
Real d () const
 
const std::vector< Real > & coefficients ()
 
const std::vector< Real > & derivativeCoefficients ()
 
std::vector< RealdefiniteIntegralCoefficients (Time t, Time t2) const
 
std::vector< RealdefiniteDerivativeCoefficients (Time t, Time t2) const
 

Additional Inherited Members

- Static Public Member Functions inherited from AbcdMathFunction
static void validate (Real a, Real b, Real c, Real d)
 
- Protected Attributes inherited from AbcdMathFunction
Real a_
 
Real b_
 
Real c_
 
Real d_
 

Detailed Description

Abcd functional form for instantaneous volatility

\[ f(T-t) = [ a + b(T-t) ] e^{-c(T-t)} + d \]

following Rebonato's notation.

Definition at line 34 of file abcd.hpp.

Constructor & Destructor Documentation

◆ AbcdFunction()

AbcdFunction ( Real  a = -0.06,
Real  b = 0.17,
Real  c = 0.54,
Real  d = 0.17 
)

Definition at line 29 of file abcd.cpp.

Member Function Documentation

◆ maximumVolatility()

Real maximumVolatility ( ) const

maximum value of the volatility function

Definition at line 43 of file abcd.hpp.

+ Here is the call graph for this function:

◆ shortTermVolatility()

Real shortTermVolatility ( ) const

volatility function value at time 0:

\[ f(0) \]

Definition at line 46 of file abcd.hpp.

◆ longTermVolatility()

Real longTermVolatility ( ) const

volatility function value at time +inf:

\[ f(\inf) \]

Definition at line 49 of file abcd.hpp.

+ Here is the call graph for this function:

◆ covariance() [1/2]

Real covariance ( Time  t,
Time  T,
Time  S 
) const

instantaneous covariance function at time t between T-fixing and S-fixing rates

\[ f(T-t)f(S-t) \]

Definition at line 43 of file abcd.cpp.

+ Here is the caller graph for this function:

◆ covariance() [2/2]

Real covariance ( Time  t1,
Time  t2,
Time  T,
Time  S 
) const

integral of the instantaneous covariance function between time t1 and t2 for T-fixing and S-fixing rates

\[ \int_{t1}^{t2} f(T-t)f(S-t)dt \]

Definition at line 47 of file abcd.cpp.

+ Here is the call graph for this function:

◆ volatility()

Real volatility ( Time  tMin,
Time  tMax,
Time  T 
) const

average volatility in [tMin,tMax] of T-fixing rate:

\[ \sqrt{ \frac{\int_{tMin}^{tMax} f^2(T-u)du}{tMax-tMin} } \]

Definition at line 32 of file abcd.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ variance()

Real variance ( Time  tMin,
Time  tMax,
Time  T 
) const

variance between tMin and tMax of T-fixing rate:

\[ \frac{\int_{tMin}^{tMax} f^2(T-u)du}{tMax-tMin} \]

Definition at line 39 of file abcd.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ instantaneousVolatility()

Real instantaneousVolatility ( Time  t,
Time  T 
) const

instantaneous volatility at time t of the T-fixing rate:

\[ f(T-t) \]

Definition at line 61 of file abcd.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ instantaneousVariance()

Real instantaneousVariance ( Time  t,
Time  T 
) const

instantaneous variance at time t of T-fixing rate:

\[ f(T-t)f(T-t) \]

Definition at line 65 of file abcd.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ instantaneousCovariance()

Real instantaneousCovariance ( Time  u,
Time  T,
Time  S 
) const

instantaneous covariance at time t between T and S fixing rates:

\[ f(T-u)f(S-u) \]

Definition at line 68 of file abcd.cpp.

+ Here is the caller graph for this function:

◆ primitive()

Real primitive ( Time  t,
Time  T,
Time  S 
) const

indefinite integral of the instantaneous covariance function at time t between T-fixing and S-fixing rates

\[ \int f(T-t)f(S-t)dt \]

Definition at line 73 of file abcd.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function: