The quantile test (also known as the
third Acerbi-Szekely test) uses a sample estimator of the expected
shortfall.
The expected shortfall for a sample
Y
1,…,Y
N is:
where
N
is the number of periods in the test window
(t = 1
,…,N
).
P
VaR is the probability of VaR
failure defined as 1-VaR level.
Y
[1],…,Y
[N]
are the sorted sample values (from smallest to largest), and is the largest integer less than or equal to
Np
VaR.
To compute the quantile test statistic, a sample of size N
is created at each time t as follows. First, convert the
portfolio outcomes to X
t to ranks using the cumulative distribution function
P
t. If the distribution
assumptions are correct, the rank values
U
1,…,U
N
are uniformly distributed in the interval (0,1). Then at each time
t:
Invert the ranks U =
(U
1,…,U
N)
to get N
quantiles .
Compute the sample estimator .
Compute the expected value of the sample estimator
where V
=
(V
1,…,V
N
is a sample of N
independent uniform random
variables in the interval (0,1). This value can be computed
analytically.
Define the quantile test statistic as
The denominator inside the sum can be computed analytically as
where
I
x(z
,w
)
is the regularized incomplete beta function. For more information, see betainc
.