Function 1 calculates the p-value of the iid test. Function 2 calculates the p-value of the unconditional coverage test.
Oxford Bulletin of Economics and Statistics (2022)
Matsuoka Hideaki
By Berens Tobias, Ziggel Daniel, and Wied Dominik
Working Paper (2013)
We propose a new set of formal backtests for VaR-forecasts that significantly improve upon existing backtesting procedures. Our new test of unconditional coverage can be used for both one-sided and two-sided testing, which leads to a significantly increased power. Second, we stress the importance of testing the property of independent and identically distributed (i.i.d.) VaR-exceedances and propose a simple approach that explicitly tests for the presence of clusters in VaR-violation processes. Results from a simulation study indicate that our tests significantly outperform competing backtests in several distinct settings.
Berens T., Ziggel D., and Wied D. (2013) A New Set of Improved Value-at-Risk Backtests. Working Paper.