Learn R Programming

riskR (version 1.1)

risk: Computes risk measures

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

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

Run this code
# computes risk measures for the SP500 

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

Run the code above in your browser using DataLab