QuantLib: AbcdMathFunction Class Reference

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

Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
AbcdMathFunction Class Reference

Abcd functional form More...

`#include <ql/math/abcdmathfunction.hpp>`

Inheritance diagram for AbcdMathFunction:
[legend]

## Public Member Functions
| 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

## Static Public Member Functions
static void | validate (Real a, Real b, Real c, Real d)

## Protected Attributes
Real | a_
Real | b_
Real | c_
Real | d_

## Detailed Description

Abcd functional form

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

following Rebonato's notation.

## Member Function Documentation

## ◆ derivative()

Real derivative | ( | Time | t | ) | const

first derivative of the function at time t

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

## ◆ primitive()

Real primitive | ( | Time | t | ) | const

indefinite integral of the function at time t

\[ \int f(t)dt = [ (-a/c-b/c^2) + (-b/c)*t ] e^{-c*t} + d*t \]

## ◆ definiteIntegral()

Real definiteIntegral | ( | Time | t1,
|  | Time | t2
| ) |  | const

definite integral of the function between t1 and t2

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

## ◆ a()

Real a | ( |  | ) | const

Inspectors

## ◆ definiteIntegralCoefficients()

std::vector<Real> definiteIntegralCoefficients | ( | Time | t,
|  | Time | t2
| ) |  | const

coefficients of a AbcdMathFunction defined as definite integral on a rolling window of length tau, with tau = t2-t

## ◆ definiteDerivativeCoefficients()

std::vector<Real> definiteDerivativeCoefficients | ( | Time | t,
|  | Time | t2
| ) |  | const

coefficients of a AbcdMathFunction defined as definite derivative on a rolling window of length tau, with tau = t2-t