risk: Computes risk measures

Description Usage Arguments Value Examples

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))

Example output

                 1%            5%
StD    0.0069950679  0.0069950679
VaR    0.0208643307  0.0121878927
EL    -0.0006800776 -0.0006800776
ELD    0.0045603057  0.0045603057
ES     0.0224565655  0.0165554801
SDR    0.0225922606  0.0172481931
EVaR   0.0140125977  0.0082850537
DEVaR  0.0150400070  0.0103963755
ENT   -0.0006556335 -0.0006556335
DENT   0.0045725372  0.0045725372
ML     0.0253284250  0.0253284250

riskR documentation built on May 2, 2019, 1:43 p.m.