Computes risk measures

Share:

Description

Computes risk measures (Standard Deviation (StD), Value at Risk (VaR), Expected Loss (EL), Expected Loss Deviation (ELD), Expected Shortfall (ES), Shortfall Deviation Risk (SDR), Expectile Value at Risk (EVaR), Deviation Expectile Value at Risk (DEVaR), Entropic (ENT), Deviation Entropic (DENT), Maximum Loss (ML)) from empirical data.

Usage

1
risk(x, alpha = c(0.05), beta = 1, p = 2)

Arguments

x

a vector of observations.

alpha

a vector of probabilities for significance level.

beta

a positive risk aversion parameter.

p

a positive value for the power of deviation terms.

Value

A matrix with values for each risk measure at all probabilities of interest.

Examples

1
2
3
4
5
# computes risk measures for the SP500 

data(returns)
s <- returns[, 2]
risk(s, c(0.01, 0.05))