ES: Conditional Value-at-Risk (VaR) and Expected Shortfall (ES)

View source: R/gets-base-source.R

ESR Documentation

Conditional Value-at-Risk (VaR) and Expected Shortfall (ES)

Description

Extract the in-sample conditional Value-at-Risk, or the in-sample conditional Expected Shortfall for the chosen risk level(s).

Usage

ES(object, level=0.99, type=7, ...)
VaR(object, level=0.99, type=7, ...)

Arguments

object

an arx or gets object

level

the risk level(s), must be between 0 and 1

type

the method used to compute the empirical quantiles of the standardised residuals

...

arguments passed on (currently not used)

Value

A vector or matrix containing either the conditional Value-at-Risk (VaR) or the conditional Expected Shortfall (ES) for the chosen risk level(s).

Author(s)

Genaro Sucarrat, http://www.sucarrat.net/

See Also

arx, getsm, getsv

Examples

##generate random variates, estimate model:
y <- rnorm(50)
mymodel <- arx(y, arch=1)

##extract 99% expected shortfall:
ES(mymodel)

##extract 99%, 95% and 90% expected shortfalls:
ES(mymodel, level=c(0.99, 0.95, 0.9))

##extract 99% value-at-risk:
VaR(mymodel)

##extract 99%, 95% and 90% values-at-risk:
VaR(mymodel, level=c(0.99, 0.95, 0.9))

gets documentation built on Oct. 10, 2022, 1:06 a.m.