Description Usage Arguments Details Value References Examples
Probablity density function(PDF), Cumulative distribution function(CDF), Quantile function and Random generation of the AST distribution
1 2 3 4 5 6 7 8 9 10 11 |
x, q |
vector of quantiles |
mu |
location parameter |
sigma |
scale parameter, sigma > 0 |
alpha |
skewness parameter, 0 < alpha < 1 |
nu1 |
degrees of freedom / tail parameter for the left tail, nu1 > 0 |
nu2 |
degrees of freedom / tail parameter for the right tail, nu2 > 0 |
pars |
a vector that contains mu, sigma, alpha, nu1, nu2, if pars is specified, mu, sigma, alpha, nu1, nu2 should not be specified |
p |
vector of probablilities |
n |
number of observations for random generation |
The 'asymmetric' in AST distribution, not only suggests skewness in the distribution, but also the asymmetry in the two tail powers of the distribution.
Location parameter mu
is the mode, but not necessarily the mean of the distribution.
Scale parameter sigma
is not necessarily the standard deviation.
The distribution skews to the right when the skewness parameter alpha < 0.5, skews to the left when alpha > 0.5.
The location paramter mu
always locates at the α-th percentile of the distribution.
The two degrees of freedom / tail parameters each controls one tail of the distribution,
separated at the location paramter mu
.
The left tail parameter nu1
only affects the left half(0th to α-th percentile) of the distribution,
while the right tail paramter nu2
only affects the right half(α-th to 100-th percentile) of the distribution.
dast
gives the density, past
gives the distribution function, qast
gives the quantile function, and rast
generates random samples for AST distribution.
Zhu, D., & Galbraith, J. W. (2010). A generalized asymmetric Student-t distribution with application to financial econometrics. Journal of Econometrics, 157(2), 297-305.https://www.sciencedirect.com/science/article/pii/S0304407610000266 https://econpapers.repec.org/paper/circirwor/2009s-13.htm
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | # The parameter values are specially set for a volatile portfolio.
# density at the mu is always 1 / sigma
d <- dast(0.12, 0.12, 0.6, 0.6, 3, 5)
# cumulative distribution at mu is alpha
p <- past(0.12, 0.12, 0.6, 0.6, 3, 5)
# quantile at alpha is mu
q <- qast(0.4, 0.12, 0.6, 0.6, 3, 5)
data <- rast(1000, 0.12, 0.6, 0.6, 3, 5)
hist(data, breaks = 50, probability = TRUE)
# using the 'pars' argument
pars <- c(0.12, 0.6, 0.6, 3, 5)
x <- seq(-3, 3, 0.01)
y <- dast(x, pars = pars)
lines(x, y, col = 4)
pars1 <- c(0, 2, 0.3, 5, 5)
pars2 <- c(0, 2, 0.5, 5, 5)
pars3 <- c(0, 2, 0.7, 5, 5)
y1 <- dast(x, pars = pars1)
y2 <- dast(x, pars = pars2)
y3 <- dast(x, pars = pars3)
plot(x, y1, type = "l", main = expression(alpha), xlab = "x", ylab = "density")
lines(x, y2, lty = 2)
lines(x, y3, lty = 3)
abline(v = 0, col = 4, lty = 2)
legend(x = "topleft", legend = c("alpha = 0.3", "alpha = 0.5", "alpha = 0.7"), lty = 1:3)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.