RISK/ENGINE
How bad could a bad day get?
a guide to market risk

Markets move every day. Most days, a little. Some days, a lot.

How bad could a bad day get?

A guide to market risk · no finance degree needed

How bad could a bad day get?

Every investor asks it. This engine answers it with a number, then checks whether that number can be trusted.

A polished silver ribbon looping into an infinity shape, thick in the foreground and tapering away. Its outside is a smooth mirror and its inside is cut with a deep grid of panels. A wave of panels lifts out and settles back as it travels round the loop, in front of a thin grey frame.
Trading days
4,987
Assets, 25% each
4
Ways to estimate
3
Confidence
99%

Modelled and rendered in Blender (Cycles)

01The idea

Risk is a weather forecast for your money.

140 possible futures for one portfolio. Orange = the worst 5%, the tail.

A forecaster can't tell you whether it will rain at 3 pm tomorrow. They can say "a 1-in-100 chance of a storm worse than this." That's useful: you know whether to bring a coat.

Banks, pension funds and fund managers do the same with money. They hold a mix of things (shares, bonds, gold) called a portfolio. Each day it goes up or down. The question is not what will happen, but how bad can it plausibly get?

Portfolio
Your basket of investments. Here: US shares (SPY), US bonds (TLT), gold (GLD), emerging markets (EEM), 25% each.
Return
How much the basket gained or lost in a day, as a percentage. −2% means $20,000 gone from $1,000,000.
Tail
The rare, ugly end of the possible outcomes. Risk management is mostly about the tail.
02Two numbers

Value at Risk, and what it hides.

Value at Risk (VaR) is a line in the sand. Pick a confidence level, say 99%. VaR is the loss that, on 99 days out of 100, you should not exceed.

But VaR says nothing about the other 1 day. Expected Shortfall (ES) fills that gap: when the line is crossed, how bad is it on average?

VaR on $1,000,000—
Expected Shortfall—
Bell-curve VaR—

5,000 simulated days for a portfolio with fat tails (Student-t, 5 degrees of freedom). Orange = the worst days. Green = days inside the line. Dashed = bell curve.
03Three ways to estimate it

Same question. Three honest attempts.

Real numbers from this engine: equal-weight SPY, TLT, GLD, EEM, 4,987 trading days from January 2007 to October 2026. Loss on a single day, 99% confidence.

A stack of brushed-metal and green glass plates on polished posts, like pages of past days.

Take every real day since 2007, sort them worst to best, and read off the line. No assumptions, but it only knows what already happened.

Neat machined concentric rings around a green sphere, with a small green sphere in orbit: the tidy world a bell curve assumes.

Assume returns follow a bell curve, measure the average and spread, and the formula does the rest. Fast and elegant, and too optimistic about disasters.

A cloud of white dice tumbling onto a brushed plate; a few that landed far out are orange: rare shocks in thousands of simulated rolls.

Roll the dice thousands of times using a curve that allows rare shocks (Student-t), keeping the same correlations between assets.

The bell-curve method's tail loss (ES) comes out about a third lower than what history shows. Markets have more extreme days than a bell curve allows.

04Can you trust it?
A brushed-metal traffic light with a ruler of 250 days down its side; only the green lens is lit: today's Basel zone.
Each tick is a trading day on which the loss was worse than the forecast. Placement is illustrative; the counts are the real results.

A forecast is only worth what its report card says.

Backtesting replays history day by day. Each morning the model forecasts a 99% VaR using only the previous 250 days, then we see whether the loss broke the line. At 99%, that should happen about 1 day in 100.

Breaks of the line47
Out of4,737 days
Kupiec p-value—

If the model were perfect we would expect about 47 breaks.

  • Kupiec test: are there the right number of breaks?
  • Independence test: are they spread out, or do they bunch together?
  • Basel traffic light: the regulator's green/yellow/red score on the last 250 days. Today's zone is green, even though the full history is rejected.
05When the past rhymes

Stress tests: replay the worst chapters.

VaR describes a normal-bad day. A stress test asks about a historic catastrophe: "if 2008 happened again to my portfolio today, what would I lose?"

A bar-chart sculpture on a dark plinth: four stacked bars sized by the four crisis losses; the tallest, 2022, is orange and breaks into floating cubes; a thin green glass blade marks a normal bad day.
Lehman collapseSep–Oct 2008
−12.1%
Euro debt crisisJul–Aug 2011
−4.6%
COVID crashFeb–Mar 2020
−14.2%
Rate-hike selloff2022
−22.9%

2022 was the worst, and it wasn't even a "crash." Shares and bonds fell together, so the usual protection from mixing them vanished. That is why diversification can fail exactly when you need it.

06Your turn

Break the portfolio yourself.

Set a shock for each holding and see the hit to a $1,000,000 portfolio split equally four ways. This is the engine's custom shock feature.

Four pillars for SPY, TLT, GLD and EEM after the 2008-style shock: shares and emerging markets cut down in orange, bonds and gold a little taller in green, each with a glass ring at its starting height.
Portfolio impact0.0%$0
07Honesty

What this engine does not know.

One day only
Forecasts a single day ahead, not weeks or months.
Simple portfolios
Fixed weights; no options, no trading costs.
Free data
Yahoo Finance prices are convenient, not institutional grade.

Both main models failed their own report card. We published that instead of hiding it. Next: volatility-filtered history (EWMA/GARCH), component VaR showing which asset drives the risk, and multi-day horizons.