ES: Expected Shortfall

Description Usage Arguments Value Examples

Description

Functions for computing the expected shortfall derived from the Normal or Student's t distribution (see page 45 of QRM).

Usage

1
2
ESnorm(p, mu = 0, sd = 1)
ESst(p, mu = 0, sd = 1, df, scale = FALSE)

Arguments

p

numeric, probability

mu

numeric, location parameter

sd

numeric, scale parameter

df

numeric, degrees of freedom

scale

logical, scaling Student's t distribution to have variance one

Value

numeric

Examples

1
2
3
4
5
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)

Example output

Loading required package: gsl
Loading required package: Matrix
Loading required package: mvtnorm
Loading required package: numDeriv
Loading required package: timeSeries
Loading required package: timeDate

Attaching package: 'QRM'

The following object is masked from 'package:base':

    lbeta

[1] 2.062713 2.665214
[1] 286.4734 466.9432
[1] 3.202870 5.220584

QRM documentation built on April 14, 2020, 6:49 p.m.