var_test | R Documentation |
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).
var_test(
actual,
forecast,
x,
alpha,
lags = 1,
boot = FALSE,
n_boot = 2000,
...
)
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. |
This is a condensed table of both the var_cp_test
and
shortfall_de_test
.
An object of class “tstest.vares” which has a print and as_flextable method.
Kupiec1995tstests
\insertRefChristoffersen1998tstests
\insertRefChristoffersen2004tstests
\insertRefDu2017tstests
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.