2

I am interested in the standardized version (mean zero, variance one) of the generalized hyperbolic and the hyperbolic distribution. I want to include this in my analysis and therefore I need the dervations and the implementations. In R, there is an implementation of the standardized generalized hyperbolic distribution.

  1. I need the used formula and how to derive it for this implementation, where can I get it?

  2. Where can I see, what the code is doing? So where can I get a 'look behind the scenes' to see what is implemented?

  3. I searched via google but I could not find any derviations of how to get a standardized version of the ghyp or hyp. Where can I find this?

  4. I could use the R command to also fit a standardized hyperbolic distribution if I do the following: Inser for lambda=1 (this gives hyperbolic) and then use the dsgh command along together with the optim command to get a good fit of the standardized hyperbolic distribution to my data, is this correct?

edit: OK, the answer to 2) is, that I just can load the package and enter the command without any specifications. I then get the code behind it.

edit: I also noticed the sghFIT command, where can I find the theory behind this? Because they have to use a standardized version, so they need the formula and the derivation, this is what I need.

edit: I just saw, that they also only use the dsgh command for fitting.

Ok, my last edit, all comes back to the implementation of the dsgh command, the code for this command is:

dsgh <-  
function(x, zeta = 1, rho = 0, lambda = 1, log = FALSE) 
{
    # A function implemented by Diethelm Wuertz

    # Description:
    #   Returns density of the sgh distribution

    # FUNCTION:    

    # Parameters:
    if (length(zeta) == 3) {
       lambda = zeta[3]
       rho = zeta[2]
       zeta = zeta[1]
    } 

    # Compute Density:
    param = .paramGH(zeta, rho, lambda)
    ans = dgh(x, param[1], param[2], param[3], param[4], lambda, log)

    # Return Value:
    ans
}

He computes the density with

# Compute Density:
        param = .paramGH(zeta, rho, lambda)
        ans = dgh(x, param[1], param[2], param[3], param[4], lambda, log)

but I am not getting the idea behind the code. dgh is just giving the moments of the generalized hyperbolic distribution, see here? So where is the density? How does he do the modification to get a standardized version? Where is the theory behind this? So there must be a puplished paper or so, where it is described how to get the standardized version? I cannot find this?

Stat Tistician
  • 2,321
  • 5
  • 34
  • 57
  • Typing .paramGH at the R command line shows you the code used to transform $\zeta, \rho, \lambda$ to the dgh parameters. – whuber May 01 '13 at 18:50

1 Answers1

1

First of all, "Standardised" in the location-scale family also means: location $0$ and scale $1$, not always mean $0$ and variance $1$. They coincide in the Normal distribution, but not in general. This applies to several of your questions. So, be careful about this.

  • dgh is just giving the moments of the generalized hyperbolic distribution, see here?

No, the standardised density is implemented in the command dgsh() as stated in your first link which is more reliable.

  • So where is the density?

See the link in the last point. See also the manual of the fBasics package.

  • How does he do the modification to get a standardized version? Where is the theory behind this?

See the link in the last point.

  • So there must be a puplished paper or so, where it is described how to get the standardized version? I cannot find this?

Section 2.3.5 of the following manual

http://cran.r-project.org/web/packages/rugarch/vignettes/Introduction_to_the_rugarch_package.pdf

I found it by googling "standardized generalized hyperbolic distribution". Remember: google is your friend.

  • To the first point: As you posted the link you can see, that in the framework standardization means mean zero and variance one, since the innovation process is assumed to be iid(0,1) or not? I already knew the rugarch package and the section you posted. But this does not answer my questions! – Stat Tistician May 01 '13 at 17:13
  • "Standardization is simple and involves rescaling the density to have unit standard deviation" So it does NOT mean scale 1! – Stat Tistician May 01 '13 at 17:17
  • they don't give the final pdf and there approach is a different one. Also you can clearly see, that this link is not an appropriate answer to my question! – Stat Tistician May 01 '13 at 17:27
  • by giving an answer you let other people think that my question is answered, but this is clearly not the case! I always try to give people a comprehensive answer, if I know the topic, just posting a (wrong) link does not help. So if you can't answer you should not do it, otherwise, if you are that wise, give a comprehensive answer! And your comment about standardization is clearly wrong, as you can see in the cite in my previous comment. – Stat Tistician May 01 '13 at 17:29
  • PayAttention, although I appreciate the distinction you are making about two meanings of "standardized," I have never seen it made before; in fact, it appears to be almost worse than useless. In practice and in theory, one would choose parameters of a location-scale family so that a location of $0$ would be defined to have a mean of $0$ and a scale of $1$ would be defined to have a variance of $1$. Do you have a reference for this distinction? Another reason I ask is that dgh et al. in R do appear to be standardized as I have described: they have zero mean and unit variance. – whuber May 01 '13 at 18:53
  • See my post here: http://stats.stackexchange.com/questions/57804/different-possible-parameter-combinations-to-obtain-a-standardized-generalized-h which pdf does R use? How can I derive it? The link PayAttention posted to the rugarch package is not what I mean! – Stat Tistician May 01 '13 at 19:30