Computes risk measures through rolling scheme

Share:

Description

Computes risk measures (StD, VaR, EL, ELD, ES, SDR, EVaR, DEVaR, ENT, DENT, ML) from empirical data using a rolling estimation window.

Usage

1
risk.roll(x, N = length(x) - 1, alpha = c(0.05), beta = 1, p = 2)

Arguments

x

a vector of observations.

N

an integer representing estimation window size. Very small values are not recommended.

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

An array with values for each risk measure at all probabilities of interest for every point of the rolling scheme.

Examples

1
2
3
4
5
## computes risk measures for SP500 using one year of daily data.

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