Learn R Programming

GAS (version 0.3.4.1)

FZLoss: Fissler and Ziegel (2016) (FZ) joint loss function for Value at Risk and Expected Shortfall.

Description

This function implements Fissler and Ziegel (2016) (FZ) joint loss function for Value at Risk and Expected Shortfall.

Usage

FZLoss(data, VaR, ES, alpha)

Value

A numeric vector containing the joing VaR and ES loss values.

Arguments

data

numeric Vector of observations.

VaR

numeric Vector containing the VaR series.

ES

numeric Vector containing the ES series.

alpha

numeric The VaR and ES confidence level.

Author

Leopoldo Catania

Details

This function implements Fissler and Ziegel (2016) (FZ) joint loss function for Value at Risk and Expected Shortfall. The parameterization used is that of Patton et al. (2017) and is given by:

\(\frac{1}{\alpha ES_t^\alpha}I_t^\alpha(y_t - VaR_t^\alpha) + \frac{VaR_t^\alpha}{ES_t^\alpha} + \log{-ES_t^\alpha} - 1\).

See also Fissler et al. (2015).

References

Fissler, T., Ziegel, J.F., (2016). "Higher order elicitability and Osband's principle." The Annals of Statistics 44, 1680-1707.
Fissler, T., Ziegel, J.F., Tilmann, G. (2015). "Expected Shortfall is jointly elicitable with Value at Risk - Implications for backtesting." arXiv preprint arXiv:1507.00244.
Patton, A. J., Ziegel, J.F., Chen, R. (2017). "Dynamic semiparametric models for expected shortfall (and Value-at-Risk)." arXiv preprint arXiv:1707.05108.

Examples

Run this code

data("StockIndices")

GASSpec = UniGASSpec(Dist = "std", ScalingType = "Identity",
                     GASPar = list(location = FALSE, scale = TRUE,
                                   shape = FALSE))

FTSEMIB = StockIndices[, "FTSEMIB"]

InSampleData  = FTSEMIB[1:1500]
OutSampleData = FTSEMIB[1501:2404]

Fit = UniGASFit(GASSpec, InSampleData)

Forecast = UniGASFor(Fit, Roll = TRUE, out = OutSampleData)

alpha = 0.05

vVaR = quantile(Forecast, alpha)
vES  = ES(Forecast, alpha)

FZ = FZLoss(OutSampleData, vVaR, vES, alpha)


Run the code above in your browser using DataLab