ES: Expected shortfall function

Description Usage Arguments Value Examples

View source: R/ES.R

Description

This function compute the expected shortfall of an univariate distribution

Usage

1
ES(family, p, param, size = 0, Nsim = 25000)

Arguments

family

distribution name; run the function distributions() for help

p

value (1 x 1) at which the expected shortfall needs to be computed; between 0 and 1; (e.g 0.01, 0.05)

param

parameters of the distribution; (1 x p)

size

additional parameter for some discrete distributions; run the command distributions() for help

Nsim

number of simulations

Value

es

expected shortfall

Examples

1
2
3
4
5
6
family = "gaussian"

theta = matrix(c(-1.5, 1.7),1,2) ;
es = ES(family, (0.01), theta)
print('Expected shortfall : ')
print(es$es)

GenHMM1d documentation built on Jan. 21, 2021, 9:07 a.m.

Related to ES in GenHMM1d...