Expected Shortfall Backtesting
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
R
data
man
.Rbuildignore
.gitignore
DESCRIPTION
NAMESPACE
NEWS.md
README.md
esback.Rproj

README.md

esback

The esback package contains function that can be used to backtest expected shortfall forecasts.

Installation

CRAN (stable release)

esback is not on CRAN yet.

GitHub (development)

The latest version of the package is under development at GitHub. You can install the development version using these commands:

install.packages("devtools")
devtools::install_github("BayerSe/esback")

Implemented Backtests

These backtests are currently implemented:

The following table provides details on the requirements and properties of the tests.

Backtest Source Requires VaR Requires Volatility One Sided Alternative
Intercept ESR Bayer & Dimitriadis (2018) x
Bivariate ESR Bayer & Dimitriadis (2018)
ER McNeil & Frey (2000) x x
Standardized ER McNeil & Frey (2000) x x x
Simple CC Nolde & Ziegel (2017) x x
General CC Nolde & Ziegel (2017) x x x

Examples

# Load the esback package
library(esback)

# Load the data
data(risk_forecasts)

# Plot the returns and expected shortfall forecasts
plot(risk_forecasts$r, xlab = "Observation Number", ylab = "Return and ES forecasts")
lines(risk_forecasts$e, col = "red", lwd = 2)

# Backtest the forecast using the ESR test
esr_backtest(r = risk_forecasts$r, e = risk_forecasts$e, alpha = 0.025)