Countless test statistics can be written as quadratic forms in certain random vectors, or ratios thereof. Consequently, their distribution has received considerable attention in the literature. Except for a few special cases, no closed-form expression for the cdf exists, and one resorts to numerical methods. Traditionally the problem is analyzed under the assumption of joint Gaussianity; the algorithm that is usually employed is that of Imhof (1961). The present manuscript generalizes this result to the case of multivariate generalized hyperbolic random vectors. This flexible distribution nests, among others, the multivariate t, Laplace, and variance gamma distributions. An expression for the first partial moment is also obtained, which plays a vital role in financial risk management. The proof involves a generalization of the classic inversion formula due to Gil-Pelaez (1951). Two numerical applications are considered: first, the finite-sample distribution of the two stage least squares estimator of a structural parameter. Second, the Value at Risk and expected shortfall of a quadratic portfolio with heavy-tailed risk factors. An empirical application is examined, in which a portfolio of Dow Jones Industrial Index stock options is optimized with respect to its expected shortfall. The results demonstrate the benefits of the analytical expression.
Keywords: Characteristic Function; Conditional Value at Risk; Expected Shortfall; Transform Inversion; Two Stage Least Squares.