bin
Binomial test for value-at-risk (VaR) backtesting
Description
generates the binomial test results for value-at-risk (VaR) backtesting.TestResults
= bin(vbt
)
adds an optional name-value pair argument for
TestResults
= bin(vbt
,Name,Value
)TestLevel
.
Examples
Input Arguments
Output Arguments
More About
Algorithms
The result of the binomial test is based on a normal approximation to a binomial distribution. Suppose:
N is the number of observations.
p =
1
-VaRLevel
is the probability of observing a failure if the model is correct.x is the number of failures.
If the failures are independent, then the number of failures is distributed as a binomial distribution with parameters N and p. The expected number of failures is N*p, and the standard deviation of the number of failures is
The test statistic for the bin
test is the z-score, defined as:
The z-score approximately follows a standard normal distribution. This
approximation is not reliable for small values of N or small values
of p, but for typical uses in VaR backtesting analyses
(N = 250
or much larger,p
in the range 1 -10%) the approximation gives results in line with other tests.
The tail probability of the bin
test is the probability that a
standard normal distribution exceeds the absolute value of the z-score
where F is the standard normal cumulative distribution. When too few failures are observed, relative to the expected failures, PValueBin is (approximately) the probability of observing that many failures or fewer. For too many failures, this is (approximately) the probability of observing that many failures or more.
The p-value of the bin
test is defined as two
times the tail probability. This is because the binomial test is a two-sided test.
If alpha is defined as 1 minus the test confidence level, the
test rejects if the tail probability is less than one half of
alpha, or equivalently if
References
[1] Jorion, P. Financial Risk Manager Handbook. 6th Edition. Wiley Finance, 2011.
Version History
Introduced in R2016b