Risk {OCA} | R Documentation |
Risk
Description
Risk measures such as Value at Risk (VaR) and Expected Shortfall (ES) with normal and t-student distributions based on variance-covariance method. It is a shortcut for VaR and ES.
Usage
Risk(
variance,
alpha = 0.95,
measure = c("both", "VaR", "ES"),
weights = NULL,
model = c("both", "normal", "t-student"),
df = NULL,
percentage = FALSE
)
Arguments
variance |
It could be either a scalar or a matrix containing the variances and covariances of the losses. Provide a covariance matrix when analyzing correlated losses or a scalar when dealing with a single loss. |
alpha |
The confidence level at which either the VaR or the ES will be computed, by default |
measure |
An optional character string giving a measure for computing the risk. |
weights |
A vector containing the weights. It is only needed if |
model |
A character string indicating which probability model has to be used for computing the risk measures, it could only be a
normal distribution or a t-student distribution with \(v\) degrees of freedom. The normal distribution is the
default model for this function. |
df |
An integer ( |
percentage |
Logical indicating whether the file names in the VaR table should be presented in percentage or decimal. |
Value
A data.frame
containing each risk measure at its corresponding confidence level.
Author(s)
Jilber Urbina
References
Dhaene J., Tsanakas A., Valdez E. and Vanduffel S. (2011). Optimal Capital Allocation Principles. The Journal of Risk and Insurance. Vol. 00, No. 0, 1-28.
Urbina, J. (2013) Quantifying Optimal Capital Allocation Principles based on Risk Measures. Master Thesis, Universitat Politècnica de Catalunya.
Urbina, J. and Guillén, M. (2014). An application of capital allocation principles to operational risk and the cost of fraud. Expert Systems with Applications. 41(16):7023-7031.
See Also
Examples
# Reproducing Table 2.1 in page 47 of
# McNeal A., Frey R. and Embrechts P (2005).
alpha <- c(.90, .95, .975, .99, .995)
(Risk(variance=(0.2/sqrt(250))^2, alpha=alpha, measure='both', model='both', df=4))*10000
# only VaR results
(Risk(variance=(0.2/sqrt(250))^2, alpha=alpha, measure='VaR', model='both', df=4))*10000
# only SE based on a 4 degrees t-student.
(Risk(variance=(0.2/sqrt(250))^2, alpha=alpha, measure='ES', model='t-student', df=4))*10000