ghyp-package {ghyp} | R Documentation |
Description: This package provides all about univariate and multivariate generalized hyperbolic distributions and its special cases (Hyperbolic, Normal Inverse Gaussian, Variance Gamma and skewed Student-t distribution). Especially fitting procedures, an AIC-based model selection routine and functions for the computation of the density, quantile, probability, random variates, expected shortfall and some portfolio optimization and plotting routines. In addition the generalized inverse gaussian distribution is contained in this package.
Package: | ghyp |
Type: | Package |
Version: | 0.9.2; svn-revision 122 |
Date: | 2007-06-11 |
License: | GPL (GNU Public Licence), Version 2 or later |
Initialize:
ghyp | Initialize a generalized hyperbolic distribution |
hyp | Initialize a hyperbolic distribution |
NIG | Initialize a normal inverse gaussian distribution |
VG | Initialize a variance gamma distribution |
student.t | Initialize a student-t distribution |
Density, distribution function, quantile function, expected shortfall and random generation:
dghyp | Density of a generalized hyperbolic distribution |
pghyp | Distribution function of a generalized hyperbolic distribution |
qghyp | Quantile of a univariate generalized hyperbolic distribution |
ESghyp | Expected shortfall of a univariate generalized hyperbolic distribution |
rghyp | Random generation of a generalized hyperbolic distribution |
Fit to data:
fit.ghypuv | Fit a generalized hyperbolic distribution to univariate data |
fit.hypuv | Fit a hyperbolic distribution to univariate data |
fit.NIGuv | Fit a normal inverse gaussian distribution to univariate data |
fit.VGuv | Fit a variance gamma distribution to univariate data |
fit.tuv | Fit a skewed student-t distribution to univariate data |
fit.ghypmv | Fit a generalized hyperbolic distribution to multivariate data |
fit.hypmv | Fit a hyperbolic distribution to multivariate data |
fit.NIGmv | Fit a normal inverse gaussian distribution to multivariate data |
fit.VGmv | Fit a variance gamma distribution to multivariate data |
fit.tmv | Fit a skewed student-t distribution to multivariate data |
stepAIC.ghyp | Perform a model selection based on the AIC |
Portfolio optimization and utilities:
portfolio.optimize | Calculate an optimal portfolio given a multivariate ghyp distribution |
mean | Returns the expected value |
vcov | Returns the variance in the univariate case or else the variance covariance matrix |
logLik | Returns Log-Likelihood of fitted ghyp objects. |
AIC | Returns Akaike's Information Criterion of fitted ghyp objects. |
redim | Extract certain dimensions of a multivariate ghyp distribution |
lin.transf | Transform a multivariate generalized hyperbolic distribution |
ghyp.moments | Expected value and variance of the ghyp and the GIG distribution |
ghyp.params | Parameters of a generalized hyperbolic distribution |
ghyp.data | Data of a (fitted) generalized hyperbolic distribution |
ghyp.fit.info | Information about the fitting procedure, log-likelihood and AIC value |
Plot functions:
qqghyp | Perform a quantile-quantile plot of a (fitted) univariate ghyp distribution |
hist | Plot a histogram of a (fitted) univariate generalized hyperbolic distribution |
pairs | Produce a matrix of scatterplots with quantile-quantile plots on the diagonal. |
Generalized inverse gaussian distribution:
dgig | Density of a generalized inverse gaussian distribution |
pgig | Distribution function of a generalized inverse gaussian distribution |
qgig | Quantile of a generalized inverse gaussian distribution |
ESgig | Expected shortfall of a generalized inverse gaussian distribution |
rgig | Random generation of a generalized inverse gaussian distribution |
Package vignette:
A document about generalized hyperbolic distributions can be found in the
doc
folder of this package.
There are already two packages HyperbolicDist
and fBasics
which cover
univariate generalized hyperbolic distributions. However, the univariate case is contained
in this package as well because we aim to provide a uniform interface to deal with
generalized hyperbolic distribution. Additionally, the above-mentioned packages have
some restrictions concerning the fitting procedures (e.g. no possibility to keep some
parameters constant) and the special cases are not (completely) covered (fBasics
covers
the hyperbolic and normal inverse gaussian case).
The package fMultivar
implements
a fitting routine for multivariate skewed student-t distributions.
We follow an object-oriented programming approach in this package and introduce distribution objects. There are mainly four reasons for that:
rand(n, distribution.object
.
Additionally, one can take advantage of generic programming since R provides virtual
classes and some forms of polymorphism.
Wolfgang Breymann, David Lüthi
Institute of Data Analyses and Process Design (http://www.idp.zhwin.ch)
Maintainer: David Lüthi <david.luethi@zhwin.ch>
Alexander J. McNeil, Rüdiger Frey, Paul Embrechts (2005) Quantitative
Risk Management, Concepts, Techniques and Tools
Alexander J. McNeil(2005), S-Plus Library for Quantitative Risk Management
QRMlib, http://www.math.ethz.ch/~mcneil/book/QRMlib.html