The esback can be used to backtest forecasts of the expected shortfall risk measure.
You can install the released version from CRAN via:
install.packages("esback")
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", ref = "master")
This package implements the following backtests:
# 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, version = 1)
Need a high-speed mirror for your open-source project?
Contact our mirror admin team at info@clientvps.com.
This archive is provided as a free public service to the community.
Proudly supported by infrastructure from VPSPulse , RxServers , BuyNumber , UnitVPS , OffshoreName and secure payment technology by ArionPay.