CumulativeBehrensFisher − Cumulative (generalized) BehrensFisher distribution.
#include <ql/experimental/math/convolvedstudentt.hpp>
Inherits unary_function< Real, Probability >.
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() (const Real x) const
Returns the cumulative probability of the resulting distribution.
Probability density (const Real x) const
Returns the probability density of the resulting distribution.
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:
V. Witkovsky, Journal of Statistical Planning and Inference 94 (2001) 1-13
see also:
On the distribution of a linear combination of t-distributed variables; Glenn Alan Walker, Ph.D.thesis University of Florida 1977
The last reference provides direct expressions for some of the densities when the linear combination of only two Ts is just an addition. It can be used for testing the results here.
Another available test on this algorithm stems from the realization that a linear convex ( $ a_i=1$) combination of Ts of order one is stable in the distribution sense (but this result is often of no practical use because of its non-finite variance).
This implementation is for two or more T variables in the linear combination albeit these must be of odd order. The case of exactly two T of odd order is known to be a finite mixture of Ts but that result is not used here. On this line see ’Linearization coefficients of Bessel polynomials’ C.Berg, C.Vignat; February 2008; arXiv:math/0506458
CumulativeBehrensFisher (const std::vector< Integer > & degreesFreedom = std::vector< Integer >(), const std::vector< Real > & factors = std::vector< Real >())
Parameters:
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() (const Real x) const
Returns the cumulative probability of the resulting distribution.
To obtain the cumulative probability the Gil-Pelaez theorem is applied:
First compute the characteristic function of the linear combination variable by multiplying the individual characteristic functions. Then transform back integrating the characteristic function according to the GP theorem; this is done here analytically feeding in the expression of the total characteristic function this: int_0^{infty}x^n e^{-ax}sin(bx)dx = (-1)^n Gamma(n+1) ac{sin((n+1)arctg2(-b/a))} {(t{a^2+b^2})^{n+1}}; fora>0,b>0 ] and for the first term I use: int_0^{infty} ac{e^{-ax}sin(bx)}{x} dx = arctg2(b/a) ] The GP complex integration is simplified thanks to the symetry of the distribution.
Probability density (const Real x) const
Returns the probability density of the resulting distribution.
Similarly to the cumulative probability, Gil-Pelaez theorem is applied, the integration is similar.
Generated automatically by Doxygen for QuantLib from the source code.