powered by
Functions for computing the expected shortfall derived from the Normal or Student's t distribution (see page 45 of QRM).
ESnorm(p, mu = 0, sd = 1) ESst(p, mu = 0, sd = 1, df, scale = FALSE)
numeric, probability
numeric
numeric, location parameter
numeric, scale parameter
numeric, degrees of freedom
logical, scaling Student's t distribution to have variance one
# NOT RUN { p <- c(0.95, 0.99) s <- 0.2 * 10000 / sqrt(250) ESnorm(p) ESst(p, sd = s, df = 4, scale = TRUE) ESst(p, df = 4) # }
Run the code above in your browser using DataLab