AST: Asymmetric Student-t Distribution

Description Usage Arguments Details Value References Examples

Description

Probablity density function(PDF), Cumulative distribution function(CDF), Quantile function and Random generation of the AST distribution

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
dast(x, mu = 0, sigma = 1, alpha = 0.5, nu1 = Inf, nu2 = Inf,
  pars = NULL)

past(q, mu = 0, sigma = 1, alpha = 0.5, nu1 = Inf, nu2 = Inf,
  pars = NULL)

qast(p, mu = 0, sigma = 1, alpha = 0.5, nu1 = Inf, nu2 = Inf,
  pars = NULL)

rast(n, mu = 0, sigma = 1, alpha = 0.5, nu1 = Inf, nu2 = Inf,
  pars = NULL)

Arguments

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

Details

The 'asymmetric' in AST distribution, not only suggests skewness in the distribution, but also the asymmetry in the two tail powers of the distribution.

Value

dast gives the density, past gives the distribution function, qast gives the quantile function, and rast generates random samples for AST distribution.

References

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

Examples

 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)

dan9401/st documentation built on Sept. 5, 2020, 5:16 a.m.