QuantLib: a free/open-source library for quantitative finance
Reference manual - version 1.40
Loading...
Searching...
No Matches
AbcdMathFunction Class Reference

Abcd functional form More...

#include <ql/math/abcdmathfunction.hpp>

Inheritance diagram for AbcdMathFunction:

Public Member Functions

 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:
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:
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

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

◆ operator()()

Real operator() ( Time t) const

function value at time t:

\[ f(t) \]

◆ longTermValue()

Real longTermValue ( ) const

function value at time +inf:

\[ f(\inf) \]

◆ 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