# Kupiec test and the traffic light

URL: https://www.aureumfrontiers.com/learn/terms/kupiec-test/
Summary: The Kupiec test checks whether a Value at Risk estimate was breached about as often as its confidence level allows.

The Kupiec test checks whether a Value at Risk estimate was breached about as often as its confidence level allows.

- Advanced
- [Testing risk estimates](https://www.aureumfrontiers.com/learn/topics/checking-a-model/)
- 3 min read

## Key takeaways

- At 95% confidence, a VaR line should be crossed on about 5 days in 100.
- The test compares the breach count with that expected count and asks whether the gap could be chance.
- Sentinel shows the verdict as a green, amber or red light, for each of its three VaR methods.
- It counts breaches only; it ignores how large each breach was.

In Sentinel

- Analyst and up

## How it works

A [Backtesting and breaches](https://www.aureumfrontiers.com/learn/terms/backtesting/) check rebuilds a Value at Risk estimate for each past day from data available before it, then counts the days whose loss went past the estimate. Each such day is a [Breach (exceedance)](https://www.aureumfrontiers.com/learn/terms/breach/).

If the estimate is right, breaches turn up at the rate the confidence level promises: about 5 in 100 at 95%, about 1 in 100 at 99%. The Kupiec test, also called the proportion-of-failures (POF) test, asks whether the observed count is far enough from that rate that chance is an unlikely explanation.

Too many breaches means the estimate has been too low. Too few means it has been too cautious. Both are failures of calibration.

## Formula

p=1 − confidence level (0.05 at 95%)
LR=−2 ln[(1 − p)T − x × px] + 2 ln[(1 − x/T)T − x × (x/T)x]
whereT=number of days tested
x=number of breaches

The statistic LR is compared with a chi-squared distribution with one degree of freedom. The larger it is, the less likely the breach count is to be chance.

## Worked example

Illustrative numbers only, for a 95% estimate.

| | Days tested (T) | Expected breaches (T × 5%) | Observed breaches (x) | Reading
| 126 | 6.3 | 6 | Close to expected
| 126 | 6.3 | 15 | Far too many: the estimate has been too low
| 126 | 6.3 | 0 | Far too few: the estimate has been too cautious

With only 126 days, a wide band of counts is consistent with a well-calibrated estimate, which is why a short test gives a rough verdict.

## How Sentinel shows it

- Analyst and up, your own portfolio: each of the three Value at Risk methods (parametric, historical and Monte Carlo) is backtested separately. Each is tested at 95% and at 99% and graded with the Kupiec test.
- Window: about 126 days are tested on the one-year view and about 1,008 on the five-year view. Nothing is shown with fewer than 100 days of history.
- The light: green reads "Passes the backtest". Amber and red flag a breach count too far from what the confidence level allows.
- Pro: shows the three estimates but not this backtest.
- Not tested: [Expected shortfall](https://www.aureumfrontiers.com/learn/terms/expected-shortfall/) is shown but not backtested.

The S&P 500 market card runs a separate backtest on the market itself (see [Market VaR backtest](https://www.aureumfrontiers.com/learn/terms/market-var-backtest/)).

## Often confused with

The Basel traffic light. The [Basel traffic light](https://www.aureumfrontiers.com/learn/terms/basel-traffic-light/) used by bank supervisors counts breaches of a 99% estimate over 250 days. It sorts them into green, yellow and red zones, and only penalises too many breaches. Sentinel's light comes from the Kupiec test, which also flags too few.

Backtesting in general. [Backtesting and breaches](https://www.aureumfrontiers.com/learn/terms/backtesting/) is the process of replaying an estimate against what happened. The Kupiec test is one way to grade the result.

### Limitations

- It counts breaches but ignores their size: one breach of 20% scores the same as one of 2%.
- It ignores clustering: ten breaches in one week score the same as ten spread across a year.
- Short windows give rough verdicts; a wide range of counts can pass.
- A pass describes the past window, not the next one.

## Questions

### Does a green light mean the estimate is safe?

No. It means the breach count over the tested window was consistent with the confidence level. Conditions can change, and the test ignores how large breaches were.

### Why would too few breaches be a problem?

An estimate that is almost never crossed is set too high. It overstates ordinary bad days, which is a calibration error in the other direction.

### Why does Sentinel test each method separately?

The three methods make different assumptions and can disagree. Testing each one shows which has held up for this portfolio.

## Related terms

- [Backtesting and breaches](https://www.aureumfrontiers.com/learn/terms/backtesting/)
- [Breach (exceedance)](https://www.aureumfrontiers.com/learn/terms/breach/)
- [Value at Risk](https://www.aureumfrontiers.com/learn/terms/value-at-risk/)
- [Basel traffic light](https://www.aureumfrontiers.com/learn/terms/basel-traffic-light/)
- [Market VaR backtest](https://www.aureumfrontiers.com/learn/terms/market-var-backtest/)
- [Confidence level and time horizon](https://www.aureumfrontiers.com/learn/terms/confidence-and-horizon/)
- [All of Testing risk estimates](https://www.aureumfrontiers.com/learn/topics/checking-a-model/)

### Sources

- Kupiec, P. (1995). Techniques for verifying the accuracy of risk measurement models. The Journal of Derivatives, 3(2), 73 to 84.
- Basel Committee on Banking Supervision (1996). Supervisory Framework for the Use of "Backtesting" in Conjunction with the Internal Models Approach to Market Risk Capital Requirements.

Draft: not yet reviewed against the Sentinel app. Examples are illustrative. General information, not investment advice.

## Check your understanding

4 questions on this page. Nothing is saved.

-

A 95% VaR is tested over 200 days. About how many breaches would a well-calibrated estimate produce?

- 2
- 10
- 20
- 95

### Show the answer

10. At 95%, about 5 in 100 days should breach: 200 × 5% = 10. See How it works.

-

Which result points to an estimate that has been too cautious?

- Many more breaches than expected
- Far fewer breaches than expected
- A breach count close to expected
- One very large breach

### Show the answer

Far fewer breaches than expected. Too few breaches means the line was set too high. See How it works.

-

What does the Kupiec test leave out?

- The number of breaches
- The confidence level
- How large each breach was
- The number of days tested

### Show the answer

How large each breach was. It counts breaches only, so a 20% breach scores the same as a 2% one. See Limitations.

-

On which Sentinel plan is your own portfolio's VaR backtested?

- Basic and up
- Pro and up
- Analyst and up
- Institutional only

### Show the answer

Analyst and up. Pro shows the three estimates; the backtest of your own portfolio starts at Analyst. See How Sentinel shows it.

Try again
