Cumulative (generalized) BehrensFisher distribution. More...
#include <ql/experimental/math/convolvedstudentt.hpp>
Public Types | |
typedef Probability | result_type |
typedef Real | argument_type |
Public Member Functions | |
CumulativeBehrensFisher (const std::vector< Integer > °reesFreedom=std::vector< Integer >(), const std::vector< Real > &factors=std::vector< Real >()) | |
const std::vector< Integer > & | degreeFreedom () const |
Degrees of freedom of the Ts involved in the convolution. | |
const std::vector< Real > & | factors () const |
Factors in the linear combination. | |
Probability | operator() (Real x) const |
Returns the cumulative probability of the resulting distribution. More... | |
Probability | density (Real x) const |
Returns the probability density of the resulting distribution. More... | |
Cumulative (generalized) BehrensFisher distribution.
Exact analitical computation of the cumulative probability distribution of the linear combination of an arbitrary number (not just two) of T random variables of odd integer order. Adapted from the algorithm in:
\todo Implement the series expansion solution for the addition of two Ts of even order described in: 'On the density of the sum of two independent Student t-random vectors' C.Berg, C.Vignat; June 2009; eprint arXiv:0906.3037
CumulativeBehrensFisher | ( | const std::vector< Integer > & | degreesFreedom = std::vector< Integer >() , |
const std::vector< Real > & | factors = std::vector< Real >() |
||
) |
degreesFreedom | Degrees of freedom of the Ts convolved. The algorithm is limited to odd orders only. |
factors | Factors in the linear combination of the Ts. |
Probability operator() | ( | Real | x | ) | const |
Returns the cumulative probability of the resulting distribution.
\[ \int_0^{\infty}x^n e^{-ax}sin(bx)dx = (-1)^n \Gamma(n+1) \frac{sin((n+1)arctg2(-b/a))} {(\sqrt{a^2+b^2})^{n+1}}; for\,a>0,\,b>0 \]
and for the first term I use:\[ \int_0^{\infty} \frac{e^{-ax}sin(bx)}{x} dx = arctg2(b/a) \]
The GP complex integration is simplified thanks to the symetry of the distribution.Probability density | ( | Real | x | ) | const |
Returns the probability density of the resulting distribution.