Calculates univariate Value at Risk and Expected Shortfall (also called
Conditional Value at Risk) by means of volatility weighted historical
simulation. Volatility is estimated with an exponentially weighted moving
average.
Usage
vwhs(x, p = 0.95, lambda = 0.94)
Arguments
x
a numeric vector of asset returns
p
confidence level for VaR calculation; default is 0.95%
lambda
decay factor for the calculation of weights; default is 0.94
Value
Returns a list with the following elements:
VaR
Calculated Value at Risk
ES
Calculated Expected Shortfall (Conditional Value at Risk)