cc_backtest: Conditional Calibration Backtest

View source: R/backtest_functions.R

cc_backtestR Documentation

Conditional Calibration Backtest

Description

The simple and general conditional calibration backtests of Nolde & Ziegel (2007).

Usage

cc_backtest(r, q, e, s = NULL, alpha, hommel = TRUE)

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.

alpha

Scalar probability level in (0, 1).

hommel

If TRUE, use Hommels correction, otherwise use the classical Bonferroni correction.

Value

Returns a list with the following components:

  • pvalue_twosided_simple

  • pvalue_onesided_simple

  • pvalue_twosided_general

  • pvalue_onesided_general

References

Nolde & Ziegel (2007) \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1214/17-AOAS1041")}

Examples

data(risk_forecasts)
r <- risk_forecasts$r
q <- risk_forecasts$q
e <- risk_forecasts$e
s <- risk_forecasts$s
cc_backtest(r = r, q = q, e = e, s = s, alpha = 0.025)

esback documentation built on Sept. 4, 2023, 1:06 a.m.