Learn R Programming

esback (version 0.3.1)

er_backtest: Exceedance Residuals Backtest

Description

Tests whether the mean of the exceedance residuals, respectively the mean of the standardized exceedance residuals is zero.

Usage

er_backtest(r, q, e, s = NULL, B = 1000)

Value

Returns a list with the following components:

  • pvalue_twosided_simple

  • pvalue_onesided_simple

  • pvalue_twosided_standardized

  • pvalue_onesided_standardized

Arguments

r

A vector of returns.

q

A vector of Value-at-Risk forecasts.

e

A vector of Expected Shortfall forecasts.

s

A vector of volatility forecasts.

B

Number of bootstrap iterations

References

McNeil & Frey (2000) tools:::Rd_expr_doi("10.1016/S0927-5398(00)00012-8")

Examples

Run this code
data(risk_forecasts)
r <- risk_forecasts$r
q <- risk_forecasts$q
e <- risk_forecasts$e
s <- risk_forecasts$s
er_backtest(r = r, q = q, e = e, s = s)

Run the code above in your browser using DataLab