udghyp {Runuran} | R Documentation |
UNU.RAN object for Generalized Hyperbolic distribution
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
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 |
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)}
\cdot \exp(\beta(x-\mu))
\cdot K_{\lambda-1/2}\left(\alpha\sqrt{\delta^2+(x-\mu)^2}\right)
where the normalization constant is given by
\kappa =
\frac{\left(\sqrt{\alpha^2 - \beta^2}/\delta\right)^{\lambda}}{
\sqrt{2\pi} \, \alpha^{\lambda-1/2} \,
K_{\lambda}\left(\delta \sqrt{\alpha^2-\beta^2}\right)}
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 unuran@statmath.wu.ac.at.
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.
See Also
Examples
## 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)