# udghyp: UNU.RAN object for Generalized Hyperbolic distribution In Runuran: R Interface to the UNU.RAN Random Variate Generators

## Description

Create UNU.RAN object for a Generalized Hyperbolic distribution with shape parameter `lambda`, shape parameter `alpha`, asymmetry (shape) parameter `beta`, scale parameter `delta`, and location parameter `mu`.

[Distribution] – Generalized Hyperbolic.

## Usage

 `1` ```udghyp(lambda, alpha, beta, delta, mu, lb=-Inf, ub=Inf) ```

## Arguments

 `lambda` shape parameter. `alpha` shape parameter (must be strictly larger than absolute value of `beta`). `beta` asymmetry (shape) parameter. `delta` scale parameter (must be strictly positive). `mu` location parameter. `lb` lower bound of (truncated) distribution. `ub` upper bound of (truncated) distribution.

## Details

The generalized hyperbolic distribution with parameters lambda, alpha, beta, delta, and mu has density

f(x) = kappa * (delta^2+(x-mu)^2)^(1/2*(lambda-1/2)) * exp(beta*(x-mu)) * K_{lambda-1/2}(alpha * sqrt(delta^2+(x-mu)^2))

where the normalization constant is given by

kappa = (sqrt(alpha^2 - beta^2)/delta)^lambda / (sqrt(2*pi) * alpha^(lambda-1/2) * K_{lambda}(delta*sqrt(alpha^2-beta^2))

K_(lambda)(t) is the modified Bessel function of the third kind with index lambda.

Notice that alpha > |beta| and delta>0.

The domain of the distribution can be truncated to the interval (`lb`,`ub`).

## Value

An object of class `"unuran.cont"`.

## Author(s)

Josef Leydold and Wolfgang H\"ormann [email protected].

## References

Barndorff-Nielsen, O., Blaesild, P., 1983. Hyperbolic distributions. In: Johnson, N. L., Kotz, S., Read, C. B. (Eds.), Encyclopedia of Statistical Sciences. Vol. 3. Wiley, New York, p. 700–707.

Prause, K., 1997. Modelling financial data using generalized hyperbolic distributions. FDM preprint 48, University of Freiburg.

Prause, K., 1999. The generalized hyperbolic model: Estimation, financial derivatives, and risk measures. Ph.D. thesis, University of Freiburg.

`unuran.cont`.
 ```1 2 3 4 5 6``` ```## Create distribution object for generalized hyperbolic distribution distr <- udghyp(lambda=-1.0024, alpha=39.6, beta=4.14, delta=0.0118, mu=-0.000158) ## Generate generator object; use method PINV (inversion) gen <- pinvd.new(distr) ## Draw a sample of size 100 x <- ur(gen,100) ```