QuantLib: a free/open-source library for quantitative finance
Fully annotated sources - version 1.32
|
Abcd functional form More...
#include <ql/math/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) |
Public Attributes | |
QL_DEPRECATED typedef Time | argument_type |
QL_DEPRECATED typedef Real | result_type |
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 131 of file abcdmathfunction.hpp.
Real longTermValue | ( | ) | const |
function value at time +inf:
\[ f(\inf) \]
Definition at line 66 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 121 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 126 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 81 of file abcdmathfunction.hpp.
Real b | ( | ) | const |
Real c | ( | ) | const |
Real d | ( | ) | const |
const std::vector< Real > & coefficients | ( | ) |
Definition at line 85 of file abcdmathfunction.hpp.
const std::vector< Real > & derivativeCoefficients | ( | ) |
Definition at line 86 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.
QL_DEPRECATED typedef Time argument_type |
auto
or decltype
instead. Deprecated in version 1.29. Definition at line 42 of file abcdmathfunction.hpp.
QL_DEPRECATED typedef Real result_type |
auto
or decltype
instead. Deprecated in version 1.29. Definition at line 48 of file abcdmathfunction.hpp.
|
protected |
Definition at line 104 of file abcdmathfunction.hpp.
|
protected |
Definition at line 104 of file abcdmathfunction.hpp.
|
protected |
Definition at line 104 of file abcdmathfunction.hpp.
|
protected |
Definition at line 104 of file abcdmathfunction.hpp.
|
private |
Definition at line 107 of file abcdmathfunction.hpp.
|
private |
Definition at line 108 of file abcdmathfunction.hpp.
|
private |
Definition at line 109 of file abcdmathfunction.hpp.
|
private |
Definition at line 109 of file abcdmathfunction.hpp.
|
private |
Definition at line 110 of file abcdmathfunction.hpp.
|
private |
Definition at line 110 of file abcdmathfunction.hpp.
|
private |
Definition at line 110 of file abcdmathfunction.hpp.
|
private |
Definition at line 112 of file abcdmathfunction.hpp.
|
private |
Definition at line 112 of file abcdmathfunction.hpp.