shortfall_de_test | R Documentation |
The expected shortfall test of Du and Escanciano (2017).
shortfall_de_test(x, alpha = 0.05, lags = 1, boot = FALSE, n_boot = 2000, ...)
x |
the probability integral transformed series (pit). |
alpha |
the quantile level for calculating the forecast value at risk and expected shortfall. |
lags |
the numbers of lags to use for the conditional test. |
boot |
whether to use bootstrap simulation for estimating the p-values. |
n_boot |
the bootstrap replications used to calculate the p-value. |
... |
not currently used. |
The test of Du and Escanciano (2017) combines ideas from Berkowitz (2001) and Christoffersen (1998) to create an unconditional and conditional shortfall test based on the probability integral transformed actuals conditioned on the forecast distribution to evaluate the severity and independence of the residuals shortfall (based on violations of VaR). The unconditional test (severity) checks for the mean of cumulative violations using a t-test, whilst the conditional test (independence) is a Portmanteau test applied to estimated cumulative violations. A bootstrap approach to calculating the distribution of the test statistics is available for finite samples, similar to the suggestions of McNeil (2000).
An object of class “tstest.shortfall_de” which has a print and as_flextable method.
Du2017tstests
\insertRefBerkowitz2001tstests
\insertRefChristoffersen1998tstests
\insertRefMcNeil2000tstests
library(tsdistributions)
data("garch_forecast")
x <- pdist("jsu", q = garch_forecast$actual, mu = garch_forecast$forecast,
sigma = garch_forecast$sigma, skew = garch_forecast$skew,
shape = garch_forecast$shape)
print(shortfall_de_test(x, alpha = 0.05, lags = 4))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.