Choosing the Correct Skewed Student-t Distribution for Density Plots
Summary
The document addresses why simulated density plots from a skewed generalized t distribution did not match a reference figure for a skewed Student-t distribution. Its central point is that these are different distribution families, so changing the tail parameter in the generalized t sampler does not necessarily reproduce the target curves. The accepted response recommends using a skewed Student-t density function from a different R package to generate the plotted curves directly.
The example compares densities at several degrees-of-freedom settings and a fixed skew parameter, showing how the intended distribution can be evaluated over a grid and drawn as overlaid curves. This is a practical warning about matching the model specification before comparing density shapes: similarly named distributions and parameters are not automatically interchangeable. The discussion gives a software-based reproduction approach, but it does not explain the distributions’ parameterizations in depth or assess how estimated densities perform on financial data.
Key ideas
- A skewed generalized t distribution and a skewed Student-t distribution are distinct models.
- Changing a tail parameter in one family may not reproduce a density from another family.
- Use a density function for the specific distribution used in the reference before comparing curves.
- Degrees of freedom and skew parameters affect the plotted shape.
Tags
Full text
# Density plot of the skew-t distribution
# Density plot of the skew-t distribution
I am using the `sgt` package in R to recreate the plot from Hansen's paper ( available here http://www.ssc.wisc.edu/~bhansen/papers/ier_94.pdf on page 8) using random draws from the skew-t distribution.
I begin with $\eta=30$ using the following code:
> x = rsgt(1000000, mu = 0, sigma = 1, lambda = 0.5, p = 2, q=30, mean.cent=TRUE, var.adj=TRUE) t=density(x) plot(t, xlim=c(-2, 2))
And I obtain a plot that is analogycal to the one given in the paper. However, using $\eta = 3$ or $\eta = 2.1$ (replace q with one of those values) results in much different plots, which look weird. Do you have any suggestions to how to solve this matter?
Edit: I include the plots I want to obtain and the ones I can obtain.
The one for $\eta=30$:
The one for $\eta=2.1$:
## Answer by rbm (score 3, accepted)
https://quant.stackexchange.com/a/24482
The `rsgt` is a skewed generalized t distribution, whereas your picture is a skewed student-t distribution. Try using `fGarch` package.
Plot reproduced:
```
library(fGarch)
x<-seq(-2.5, +2.5, by=0.001)
plot(x,
fGarch::dsstd(x, mean = 0, sd = 1, nu = 30, xi = 1 + 0.5),
type = "l",
ylim=c(0, 2.4), lty = 1,
xlab="z",
ylab=expression(paste("g(z|",nu,",",lambda,")")),
main="CONDITIONAL DENSITY ESTIMATION")
lines(x,
fGarch::dsstd(x, mean = 0, sd = 1, nu = 3.0, xi = 1 + 0.5),
type = "l",
ylim=c(0, 2.4),
lty = 2)
lines(x,
fGarch::dsstd(x, mean = 0, sd = 1, nu = 2.1, xi = 1 + 0.5),
type = "l",
ylim=c(0, 2.4),
lty = 5)
legend(x="topleft", legend = c(expression(paste(eta,"=2.1")),
expression(paste(eta,"=3.0")),
expression(paste(eta,"=30"))),
lty=c(5,2,1))
```Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.