var_test: Value at Risk and Expected Shortfall Tests

View source: R/var.R

var_testR Documentation

Value at Risk and Expected Shortfall Tests

Description

The value at risk coverage and duration tests of Kupiec (1995) and Christoffersen and Pelletier (1998,2004), and expected shortfall test of Du and Escanciano (2017).

Usage

var_test(
  actual,
  forecast,
  x,
  alpha,
  lags = 1,
  boot = FALSE,
  n_boot = 2000,
  ...
)

Arguments

actual

a series representing the actual value of the series in the out of sample period.

forecast

the forecast values of the series at the quantile given by alpha (the forecast value at risk).

x

the probability integral transformed series (pit).

alpha

the quantile level used to calculate the forecast value at risk.

lags

the numbers of lags to use for the conditional shortfall test.

boot

whether to use bootstrap simulation for estimating the p-values of the conditional shortfall test.

n_boot

the bootstrap replications used to calculate the p-value.

...

not currently used.

Details

This is a condensed table of both the var_cp_test and shortfall_de_test.

Value

An object of class “tstest.vares” which has a print and as_flextable method.

References

\insertRef

Kupiec1995tstests

\insertRef

Christoffersen1998tstests

\insertRef

Christoffersen2004tstests

\insertRef

Du2017tstests


tstests documentation built on Oct. 30, 2024, 9:28 a.m.