VaR.gpd {VaR}R Documentation

Value at Risk Calculation from Log-Likelihood Fit of General Pareto Distribution (GPD)

Description

Estimation of Value at Risk from log-likelihood fit of GPD.

Usage

VaR.gpd(ydat, p = 0.01, p.tr = 0.97, drift.appx = FALSE, init = c(1, 0.3), cflevel = 0.95)

Arguments

ydat Numeric vector of data for which VaR is to be calculated.
p Confidence level for VaR calculation.
p.tr Threshold for GPD fit.
drift.appx Logical; if TRUE VaR is calculated in non-zero drift approximation.
init Initial values for log-likelihood fit of GPD.
cflevel Confidence level for estimation of VaR and ES intervals.

Details

This function estimates Value at Risk and Expected Shortfall of a single risk factor with a given confidence by using a fit of Generalized Pareto Distribution to the part of data exceeding a given threshold (Peak over Threshold (POT) Method). The input data transformed to procentual daily return. Then, transformed data is sorted and only part exceeding a given threshold is hold. Threshold is calculated according an expression p.tr*std. Log-likelihood fit is then applied to get values of VaR and ES. After that, confidence intervals for this values are calculated (see reference for details).

Value

A list containing following components:

VaR Value at Risk for input data.
VaR.interval Lower and higher bounds of VaR estimation with confidence given by parameter cflevel.
ES Expected shortfall.
ES.interval Lower and higher bounds of ES estimation with confidence given by parameter cflevel.
data Same as ydat.
cdata Vector of data used for GPD fit.
conf.level Same as p.
tr Same as p.tr.
mean Mean value of cdata.
std Standard deviation of cdata.
gfit Best fit values of GPD.
int.conf.level Same as cflevel.

Author(s)

T. Daniyarov

References

Embrechts, P., Kluepelberg, C., and Mikosch, T. (1999) Modelling Extremal Events for Insurance and Finance. Application of Mathematics. Springer. 2nd ed. (1st ed., 1997)

See Also

VaR.gpd.plots

Examples

data(exchange.rates)
attach(exchange.rates)
y <- USDJPY[!is.na(USDJPY)]
z <- VaR.gpd(y)
z$VaR
z$VaR.interval
z$ES
z$ES.interval
detach(exchange.rates)

[Package VaR version 0.2 Index]