ghyp-package              package:ghyp              R Documentation

_A _p_a_c_k_a_g_e _o_n _g_e_n_e_r_a_l_i_z_e_d _h_y_p_e_r_b_o_l_i_c _d_i_s_t_r_i_b_u_t_i_o_n_s

_D_e_s_c_r_i_p_t_i_o_n:

     This package provides all about univariate and multivariate
     generalized  hyperbolic distributions and its special cases
     (Hyperbolic (hyp), Normal Inverse Gaussian (NIG),  Variance Gamma
     (VG) 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.

_D_e_t_a_i_l_s:


       Package:  ghyp
       Type:     Package
       Version:  1.0.0; svn-revision 238
       Date:     2007-09-14
       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(-covariance).
       'logLik'              Returns Log-Likelihood of fitted ghyp objects.
       'AIC'                 Returns the Akaike's Information Criterion  of fitted ghyp objects.
       'lik.ratio.test'      Performs a likelihood-ratio test on fitted 'ghyp' distributions.
       '['                   Extract certain dimensions of a multivariate 'ghyp' distribution.
       'transform'           Transform a multivariate generalized hyperbolic distribution.
       'ghyp.moment'         Moments of the univariate 'ghyp' distribution.
       'coef'                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.
       'summary'             Summary of a fitted generalized hyperbolic distribution.

     *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.
       'plot'    Plot the density of a univariate 'ghyp' distribution.
       'lines'   Add the density of a univariate 'ghyp' distribution to a graphics device.

     *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.

_E_x_i_s_t_i_n_g _s_o_l_u_t_i_o_n_s:

     There are already two packages 'HyperbolicDist' and 'fBasics'
     which cover  univariate generalized hyperbolic distributions and
     some of its special cases. 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. Recently an R port of the S-Plus library 'QRMlib'
     was released. The package 'QRMlib' contains fitting procedure for
     the NIG, hyp and skewed Student-t case but not for the generalized
     hyperbolic case. The package 'fMultivar' implements a fitting
     routine for multivariate skewed student-t distributions as well.

_O_b_j_e_c_t _o_r_i_e_n_t_a_t_i_o_n:

     We follow an object-oriented programming approach in this package
     and introduce distribution objects. There are mainly four reasons
     for that:

        *  Unlike most distributions the GH distribution has quite a
           few parameters which have to fulfill some consistency
           requirements. Consistency checks can be performed uniquely
           when an object is initialized.

        *  Once initialized the common functions belonging to a
           distribution can be called conveniently by passing the
           distribution object. A repeated input of the parameters is
           avoided.

        *  Distributions returned from fitting procedures can be
           directly passed to, e.g., the density function since fitted
           distribution objects  add information to the distribution
           object and consequently inherit from the class of  the
           distribution object.

        *  Generic method dispatching can be used to provide a uniform
           interface to, e.g.,  plot the probability density of a
           specific distribution like 'plot(distribution.object)'.  
           Additionally, one can take advantage of generic programming
           since R provides virtual  classes and some forms of
           polymorphism. .in -3 

_A_c_k_n_o_w_l_e_d_g_e_m_e_n_t:

     This package has been partially developed in the framework of the
     COST-P10  "Physics of Risk" project. Financial support by the
     Swiss State Secretariat  for Education and Research (SBF) is
     gratefully acknowledged.

_A_u_t_h_o_r(_s):

     Wolfgang Breymann, David Lthi 

     Institute of Data Analyses and Process Design (<URL:
     http://www.idp.zhaw.ch>)  

     Maintainer: David Lthi <david.luethi@zhaw.ch>

_R_e_f_e_r_e_n_c_e_s:

     _Quantitative Risk Management: Concepts, Techniques and Tools_ by
     Alexander J. McNeil, Rdiger Frey and Paul Embrechts 
      Princeton Press, 2005 


     _S-Plus and R Library for Quantitative Risk Management QRMlib_  by
     Alexander J. McNeil (2005) and Scott Ulman (R-port) (2007)
      <URL: http://www.math.ethz.ch/~mcneil/book/QRMlib.html> and
     'QRMlib'

