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

Description Usage Arguments Value Author(s) See Also Examples

View source: R/ES.R

Description

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

Usage

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

Arguments

object

an arx, gets or isat 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, isat

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
##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 May 30, 2017, 4:09 a.m.

Search within the gets package
Search all R packages, documentation and source code