esr_backtest: Expected Shortfall Regression Backtest

Description Usage Arguments Value References Examples

View source: R/backtest_functions.R

Description

This function implements multiple expected shortfall regression (esreg) based backtests. Using the version argument, the following backtests are available:

  1. ("Strict ESR") Regresses the returns on the expected shortfall forecasts and tests the ES coefficients for (0, 1).

  2. ("Auxiliary ESR") Regresses the returns on the quantile and the expected shortfall forecasts and tests the ES coefficients for (0, 1).

  3. ("Strict Intercept") Tests whether the expected shortfall of the forecast error r - e is zero.

Usage

1
2
3
4
5
6
7
8
9
esr_backtest(
  r,
  q,
  e,
  alpha,
  version,
  B = 0,
  cov_config = list(sparsity = "nid", sigma_est = "scl_sp", misspec = TRUE)
)

Arguments

r

A vector of returns.

q

A vector of Value-at-Risk forecasts.

e

A vector of Expected Shortfall forecasts.

alpha

Scalar probability level in (0, 1).

version

Version of the backtest to be used

B

Number of bootstrap samples. Set to 0 to disable bootstrapping.

cov_config

a list with three components: sparsity, sigma_est, and misspec, see vcovA

Value

Returns a list with the following components:

References

Bayer & Dimitriadis (2020)

Examples

1
2
3
4
5
data(risk_forecasts)
r <- risk_forecasts$r
q <- risk_forecasts$q
e <- risk_forecasts$e
esr_backtest(r = r, q = q, e = e, alpha = 0.025, version = 1)

Example output

$pvalue_twosided_asymptotic
[1] 0.0005703539

$pvalue_twosided_bootstrap
[1] NA

esback documentation built on July 2, 2020, 2:18 a.m.