QuantLib: AbcdFunction Class Reference

A free/open-source library for quantitative finance Reference manual - version 1.12

Public Member Functions | List of all members
AbcdFunction Class Reference

Abcd functional form for instantaneous volatility More...

`#include <ql/termstructures/volatility/abcd.hpp>`

Inheritance diagram for AbcdFunction:
[legend]

## 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
Real | shortTermVolatility () const
| volatility function value at time 0: \[ f(0) \]
Real | longTermVolatility () const
| volatility function value at time +inf: \[ f(\inf) \]
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 (const std::vector< Real > &abcd)
Real | operator() (Time t) const
| function value at time t: \[ f(t) \]
Time | maximumLocation () const
| time at which the function reaches maximum (if any)
Real | maximumValue () const
| maximum value of the function
Real | longTermValue () const
| function value at time +inf: \[ f(\inf) \]
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< Real > | definiteIntegralCoefficients (Time t, Time t2) const
std::vector< Real > | definiteDerivativeCoefficients (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.

## Member Function Documentation

## ◆ 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) \]

## ◆ 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 \]

## ◆ 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} } \]

## ◆ 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} \]

## ◆ instantaneousVolatility()

Real instantaneousVolatility | ( | Time | t,
|  | Time | T
| ) |  | const

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

\[ f(T-t) \]

## ◆ instantaneousVariance()

Real instantaneousVariance | ( | Time | t,
|  | Time | T
| ) |  | const

instantaneous variance at time t of T-fixing rate:

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

## ◆ 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) \]

## ◆ 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 \]