Articles

How do you run the Christoffersen test on VaR exceptions?

The Kupiec test only counts exceptions; the Christoffersen test asks whether they arrive together, and on the same count it can turn a green model into a rejected one.

Classify every day of the backtest as an exception or not, count the four possible transitions from one day to the next, and compare the probability of an exception after an exception with the probability after a clean day. On 500 days of a 99 per cent VaR with six exceptions, a spread pattern and one with five exceptions in a single week give the same Kupiec result, an LR of 0.19 and a pass, but the clustered pattern gives an independence LR of 31.32 against a 3.841 critical value, a p-value of 0.00000002. Same count, opposite verdict.

Worked in full in Financial Risk Management by Julian R. Sterling, with every figure reproduced in a free workbook.See the book on Amazon →

The assumptions

The fund and its two exception histories are illustrative. Both histories have exactly the same number of exceptions; only the dates differ.

Two backtests of the same 99 per cent one-day VaR.
InputPattern A: spreadPattern B: clustered
Observation days500500
Confidence level99.00%99.00%
Expected exceptions (1.00% of 500)5.005.00
Observed exceptions66
Exception days41, 118, 203, 287, 362, 44997, then 311 to 315

Step 1: the count test, which both pass

The Kupiec proportion-of-failures test compares the observed exception rate, 6 / 500 = 1.20 per cent, with the promised 1.00 per cent:

LRpof = −2 ln[ (1 − p)n−x px / ((1 − x/n)n−x (x/n)x) ] = 0.19

Read against a chi-squared with one degree of freedom: critical value 3.841 at 5 per cent, p-value 0.66.

Both histories are green. The test never sees the dates, so it cannot tell them apart. This is where most backtest reports stop, and where the traffic-light zones stop too.

Step 2: count the transitions

Turn the 500 days into a string of zeros and ones and look at each of the 499 pairs of consecutive days. Each pair is one of four types: n00 (clean, then clean), n01 (clean, then exception), n10 (exception, then clean) and n11 (exception, then exception).

Transition counts over 499 day pairs.
CountPattern APattern B
n00487491
n0162
n1062
n1104
π01 = n01 / (n00 + n01)1.22%0.41%
π11 = n11 / (n10 + n11)0.00%66.67%
π = (n01 + n11) / 4991.20%1.20%

In pattern B, once an exception has happened the next day is an exception two times in three. After a clean day the chance is 0.41 per cent. If exceptions were independent, those two probabilities would be the same, and both would be close to π.

Step 3: the likelihood ratio

L0 = (1 − π)n00+n10 πn01+n11   (one probability for every day)

L1 = (1 − π01)n00 π01n01 (1 − π11)n10 π11n11   (a probability that depends on yesterday)

LRind = −2 ln(L0 / L1), chi-squared with one degree of freedom

In Excel, with the counts in B2:B5 and the logs taken term by term to avoid underflow, the p-value is =CHISQ.DIST.RT(LR, 1).

Take logs before multiplying: (0.9880)493 is a small number, and spreadsheets lose precision long before they show an error. Where n11 is zero, the term π110 is 1, not an error.

The result

Count, independence and conditional coverage.
StatisticPattern APattern B5% critical value
Kupiec LRpof0.190.193.841
Christoffersen LRind0.1531.323.841
p-value, independence0.700.00000002
Conditional coverage LRcc = LRpof + LRind0.3431.515.991

Pattern A passes everything. Pattern B passes the count and fails independence by a factor of eight over the critical value. The conditional coverage test, which reads the sum against a chi-squared with two degrees of freedom, rejects it with a p-value of 0.00000014. A correct 99 per cent model would put five exceptions into one given week with a probability of one in 10,000,000,000.

What if: how much clustering it takes

Keep six exceptions in 500 days and move them together one at a time: k is the number of back-to-back pairs, built as one run of k + 1 days with the remaining exceptions isolated.

Six exceptions, increasing clustering.
Back-to-back pairs (n11)π11LRindp-valueLRccp-value
00.00%0.150.7020.340.845
116.67%3.710.0543.900.142
233.33%10.860.00111.050.004
350.00%20.070.00020.260.000
4 (pattern B)66.67%31.320.00031.510.000
583.33%45.170.00045.360.000

One back-to-back pair sits just inside the 5 per cent line, at a p-value of 0.054. A run of three exception days is already a rejection at 0.001. The test is sensitive because exceptions are rare: with π at 1.20 per cent, two in a row should almost never happen.

With few exceptions the chi-squared approximation is rough, and the conditional coverage test dilutes a strong independence signal with a weak count signal. Report the independence statistic on its own, and beside the total count carry the largest number of exceptions in any five-day window.

The common mistake

Takeaway

Count the transitions, compute π01 and π11, and take the log-likelihood ratio. Six exceptions in 500 days pass the count test whether they are spread across two years or packed into one week, but the second pattern gives an independence statistic of 31.32 and a p-value of 0.00000002. The exception counter, with the zones drawn by the binomial, is in the free workbooks for this book, and the VaR and expected shortfall template produces the daily series to test.

Questions readers ask

What is the difference between the Kupiec and Christoffersen tests?

Kupiec tests the number of exceptions: six in 500 days against five expected gives an LR of 0.19 and a p-value of 0.66, a pass. Christoffersen tests their timing, comparing the chance of an exception after an exception with the chance after a clean day. Combined, the conditional coverage statistic is the sum of the two, read against a chi-squared with two degrees of freedom and a 5.991 critical value.

How many consecutive VaR exceptions fail the independence test?

On 500 days with six exceptions at 99 per cent, one back-to-back pair gives an independence LR of 3.71 and a p-value of 0.054, just inside the 5 per cent line. Two pairs, a run of three days, give 10.86 and a p-value of 0.001. In practice, any run of three exception days in a year or two of data should be treated as a rejection.

Why do clustered VaR exceptions matter more than the count?

Because clustered losses arrive while the position is still on and the funding is under pressure. Five exceptions in a week on a correct 99 per cent model happen with a probability of one in 10,000,000,000. A model that misses volatility regimes will pass a count test over 500 days and still fail in exactly the week that matters.

Read the whole case

Clustered exceptions are the subject of the case the companion files attach to chapter 6 of Financial Risk Management. The book takes the same case from first principles to the decision, chapter by chapter, and every figure it prints is a live formula in the free companion workbooks.

Get the book on Amazon →Free companion files

Also on Amazon UK · Amazon Germany · Amazon France · Amazon Canada

Also on this site

Reading guide: corporate finance, valuation and markets → · All 1340 articles →

If this book helped, or didn’t, a few lines on Amazon are worth more than they look: they are what the next reader goes on. Write a review. The workbook stays free either way.