QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
|
Abcd functional form More...
#include <abcdmathfunction.hpp>
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: 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< 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_ |
Private Member Functions | |
void | initialize_ () |
Private Attributes | |
std::vector< Real > | abcd_ |
std::vector< Real > | dabcd_ |
Real | da_ |
Real | db_ |
Real | pa_ |
Real | pb_ |
Real | K_ |
Real | dibc_ |
Real | diacplusbcc_ |
Abcd functional form
\[ f(t) = [ a + b*t ] e^{-c*t} + d \]
following Rebonato's notation.
Definition at line 35 of file abcdmathfunction.hpp.
AbcdMathFunction | ( | Real | a = 0.002 , |
Real | b = 0.001 , |
||
Real | c = 0.16 , |
||
Real | d = 0.0005 |
||
) |
AbcdMathFunction | ( | std::vector< Real > | abcd | ) |
Time maximumLocation | ( | ) | const |
time at which the function reaches maximum (if any)
Definition at line 88 of file abcdmathfunction.cpp.
Real maximumValue | ( | ) | const |
maximum value of the function
Definition at line 119 of file abcdmathfunction.hpp.
Real longTermValue | ( | ) | const |
function value at time +inf:
\[ f(\inf) \]
Definition at line 54 of file abcdmathfunction.hpp.
first derivative of the function at time t
\[ f'(t) = [ (b-c*a) + (-c*b)*t) ] e^{-c*t} \]
Definition at line 109 of file abcdmathfunction.hpp.
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 \]
Definition at line 114 of file abcdmathfunction.hpp.
definite integral of the function between t1 and t2
\[ \int_{t1}^{t2} f(t)dt \]
Definition at line 103 of file abcdmathfunction.cpp.
Real a | ( | ) | const |
Inspectors
Definition at line 69 of file abcdmathfunction.hpp.
Real b | ( | ) | const |
Real c | ( | ) | const |
Real d | ( | ) | const |
const std::vector< Real > & coefficients | ( | ) |
Definition at line 73 of file abcdmathfunction.hpp.
const std::vector< Real > & derivativeCoefficients | ( | ) |
Definition at line 74 of file abcdmathfunction.hpp.
coefficients of a AbcdMathFunction defined as definite integral on a rolling window of length tau, with tau = t2-t
Definition at line 109 of file abcdmathfunction.cpp.
coefficients of a AbcdMathFunction defined as definite derivative on a rolling window of length tau, with tau = t2-t
Definition at line 122 of file abcdmathfunction.cpp.
Definition at line 29 of file abcdmathfunction.cpp.
|
private |
Definition at line 54 of file abcdmathfunction.cpp.
|
protected |
Definition at line 92 of file abcdmathfunction.hpp.
|
protected |
Definition at line 92 of file abcdmathfunction.hpp.
|
protected |
Definition at line 92 of file abcdmathfunction.hpp.
|
protected |
Definition at line 92 of file abcdmathfunction.hpp.
|
private |
Definition at line 95 of file abcdmathfunction.hpp.
|
private |
Definition at line 96 of file abcdmathfunction.hpp.
|
private |
Definition at line 97 of file abcdmathfunction.hpp.
|
private |
Definition at line 97 of file abcdmathfunction.hpp.
|
private |
Definition at line 98 of file abcdmathfunction.hpp.
|
private |
Definition at line 98 of file abcdmathfunction.hpp.
|
private |
Definition at line 98 of file abcdmathfunction.hpp.
|
private |
Definition at line 100 of file abcdmathfunction.hpp.
|
private |
Definition at line 100 of file abcdmathfunction.hpp.