rskFac: Risk Factors

Description Usage Arguments Details Value References Examples

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

1
rskFac(dat, alpha = 0.1, dist = "norm", df = NULL)

Arguments

dat

A numeric vector of object data.

alpha

Confidence level α (0<α<0.5).

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 X is random variable (rv) has distribution function (df) F. Given a confidence level α\in (0, 1), Value at Risk (VaR) of the underlying X at the confidence level α is the smallest number x such that the probability that the underlying X exceeds x is at least 1-α. In other word, if X is a rv with symmetric distribution function F (e.g., the return value of a portfolio), then VaR_{α} is the negative of the α quantile, i.e.,

VaR_{α}(X)=Q(α)=inf{x \in Real : Pr( X ≤ x )≤ α}.

where, Q(.)=F^{-1}(.).

Since, the VaR_α(X) is the nagative of α quantile in the left tail, -VaR_{1-α}(-X) is positive value of VaR in right tail.

The average VaR_α, (AVaR_α) for 0<α≤ 1 of X is defined as

AVaR_α(X)= \frac{1}{α}\int_{0}^{α}VaR(x) dx,

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

AVaR_α (X) = VaR_α(X) - \frac{1}{α} E((X - VaR_α(X))^{-}).

where, (y)^{-} = min (y,0). To approximate the integral, it is given by

AVaR_α(X)=VaR_α(X)+\frac{1}{t α}∑_{i=1}^{t}max{(VaR_α(X) - X), 0},

where, t is number of observations. By considering the rv -X, the -AVaR_{1-α} 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

1
2
3
library(rmutil)
r <- rlaplace(1000, m = 1, s = 2)
rskFac(r, dist = "laplace", alpha = 0.1)

gnFit documentation built on May 2, 2019, 5:14 a.m.