rskFac {gnFit} | R Documentation |
Risk Factors
Description
The Value at Risk (VaR) of level (
-quantile) of an event is a number attempting to summarize the risk of that event and define the worst expected loss of the event over a period of time. The Average VaR is another important measure of the risk at a given confidence level, which calculated by using the function of "rskFac".
Usage
rskFac(dat, alpha = 0.1, dist = "norm", df = NULL)
Arguments
dat |
A numeric vector of object data. |
alpha |
Confidence level |
dist |
A named of distribution function which should be fitted to data values. The distibution function is selected by the name of "laplace", "logis", "gum", "t" and "norm". |
df |
degrees of freedom from a specified distribution function. |
Details
Suppose is random variable (rv) has distribution function (df)
. Given a confidence level
Value at Risk (VaR) of the underlying
at the confidence level
is the smallest number
such that the probability that the underlying
exceeds
is at least
In other word, if
is a rv with symmetric distribution function
(e.g., the return value of a portfolio), then
is the negative of the
quantile, i.e.,
where,
Since, the is the nagative of
quantile in the left tail,
is positive value of VaR in right tail.
The average
for
of
is defined as
The AVaR is known under the names of conditional VaR (CVaR), tail VaR (TVaR) and expected shortfall.
Pflug and Romisch (2007, ISBN: 9812707409) shows the AVaR may be represented as the optimal value of the following optimization problem
where, .
To approximate the integral, it is given by
where, is number of observations. By considering the rv
, the
in right tail is obtainable.
Value
The values of output are "VaR", "AVaR_n" and "AVaR_p" correspond to the VaR, Average VaR in left tail, Average VaR in right tail.
References
Pflug and Romisch (2007, ISBN: 9812707409)
Examples
library(rmutil)
r <- rlaplace(1000, m = 1, s = 2)
rskFac(r, dist = "laplace", alpha = 0.1)