udghyp | R Documentation |
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.
udghyp(lambda, alpha, beta, delta, mu, lb=-Inf, ub=Inf)
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. |
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
).
An object of class "unuran.cont"
.
Josef Leydold and Wolfgang H\"ormann unuran@statmath.wu.ac.at.
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
.
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.