Learn R Programming

tstests (version 1.0.0)

var_test: 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,
  ...
)

Value

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

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.

References

Kupiec1995tstests

Christoffersen1998tstests

Christoffersen2004tstests

Du2017tstests