Module 5 of 6 · 5 min read

Risks of AI Trading: Overfitting and Black Swan Events

Overfitting makes a strategy look brilliant on old data and useless on new, and a black swan is the rare shock no bot was built for, which is why a human keeps a hand on the off-switch.

Flash crash with and without a kill switch An account equity line drifts gently up, peaks, then a black-swan crash drives it down. With the kill switch off the line falls to almost zero; with it on the line stops at the chosen loss limit and goes flat as trading halts. $10,000$0black swan loss limit −20% ($8,000) time →
Kill switch
Loss limit−20%
No kill switch−99%$120 of $10,000 left, wiped out
Hard −20% limit−20%$8,000 of $10,000 left, survives
Same black swan, same strategy. The only difference is whether a hard limit was set in advance to halt trading. With the switch off, the strategy rides the crash all the way down and the account is all but wiped out.

Try the demo above. With the kill switch off, one black-swan move rides the account all the way down to almost nothing; flip it on and the same crash stops dead at your loss limit. That single difference, a strategy that can bleed out versus one that gets halted, is what this module builds toward. Two failure modes wreck more automated strategies than anything else, and they come at you from opposite directions. Overfitting is the trap of learning too much from the past: a model so glued to old data that it mistakes random wiggles for real patterns. Black swans are the opposite problem, the day the future serves up something the past never contained, so no amount of learning helps. One says the strategy studied history too hard; the other says history was never the whole story. Understanding both is what separates a trader who respects automated tools from one who gets quietly wrecked by them.

Overfitting: learning the noise instead of the signal

Inside any price chart there are two things mixed together. There is signal, the real, repeating pattern you actually want to trade. And there is noise, the random, one-off jiggle that happened once and will not happen the same way again.

A good model learns the signal and ignores the noise. An overfitted model does the reverse: it memorises the noise as if it meant something. Because it has traced every little bump in the historical data, it fits the past almost perfectly, which makes its backtest look like a money machine. But it predicts the future almost not at all, because the noise it memorised does not repeat.

That is the whole trap in one line: an overfitted strategy looks brilliant on old data and falls apart on new data. It is the central risk of genuine machine-learning trading, and it is exactly what the curve-fitting from Module 4 produces on the rules-based side.

The signs that a strategy is overfitted

You do not need to be a data scientist to smell overfitting. A few tell-tale signs give it away:

  • Too many parameters for the data. The more dials a strategy has, the easier it is to twist them until the past looks perfect. Lots of knobs plus not much data is a warning, not a feature.
  • An unrealistically smooth equity curve. Real edges are lumpy. A backtest that climbs in an almost perfect straight line usually means the strategy was moulded to the exact shape of the past.
  • Fragility. Nudge one parameter by a hair and the results swing wildly, or the strategy collapses the moment it meets data it has never seen. A real edge is not that delicate.
  • A need for constant re-tuning. If it only keeps working when you keep adjusting it, you are not maintaining an edge, you are chasing noise that keeps moving.

The healthy instinct is to prefer the simpler, sturdier strategy over the complex, fragile one, even when the complex one shows a prettier backtest. Robustness is what survives contact with tomorrow's data, and a suspiciously beautiful backtest is often the warning sign, not the prize.

Black swan events: the day outside the data

A black swan, in Nassim Nicholas Taleb's sense, is a rare, high-impact event that sits outside normal expectations and that everyone rationalises as "obvious in hindsight" only after it has happened. Think sudden crashes, exchange collapses, or a shock that markets had never priced.

Here is why this is poison for any automated strategy. A model learns from the data it was trained and tested on. A black swan is, by definition, outside that data. The model has never seen anything remotely like it, so it has no valid learned response. It keeps applying rules built for a world that no longer exists.

It gets worse. Real markets have fat tails, meaning extreme moves happen more often than a tidy bell-curve model assumes. A strategy calibrated on "normal" volatility is therefore quietly unprepared for the one day that actually matters, because its whole idea of "how bad can it get" was set too low.

When automation makes a crash worse

Automation does not just cope badly with a crash. It can help cause one.

In the 2010 Flash Crash on 6 May, the Dow Jones fell about 998 points (roughly 9 per cent) and around 1 trillion US dollars in market value briefly vanished within minutes before rebounding, with the whole episode lasting about 36 minutes. In events like this, automated strategies pile on: cascading stop-losses fire and trigger more selling, bids evaporate so there is nobody to sell to at a sane price, and fills land far away from where the strategy "expected" to trade.

Automation also executes plain mistakes at machine speed. Knight Capital lost roughly 440 million US dollars in about 45 minutes when a faulty software deployment let an automated system fire off a storm of unintended orders. A bot does not panic, which sounds like a virtue, but it also does not stop to think, and at full speed that is exactly the danger.

Why the off-switch needs a human

Both failure modes point to the same quiet lesson. Recognising "this situation is outside anything my strategy was built for" is a judgment call, and a fixed rule or a model trained on normal data usually cannot make that call for itself. It only knows the world it was shown.

That is why a manual off-switch and active human oversight are risk controls, not signs of a primitive setup. The most dangerous automated strategy is not the one that is wrong now and then. It is the one that keeps confidently trading into conditions it was never designed to handle, because no human was watching for the moment to pull the plug. Building those limits is what Module 6 is all about.

An overfitted curve meets reality

Picture two strategies side by side.

Strategy A has 15 parameters, all optimised on three years of history. In-sample it shows a 95 per cent win rate and a silky-smooth plus-200 per cent equity curve. It looks unstoppable. Then you run it, unchanged, on a fresh year it never saw. The win rate drops to about 48 per cent and the return comes in around minus 12 per cent. Worse, nudging a single parameter by one step flips that in-sample plus-200 per cent to about minus 5 per cent. The wild sensitivity and the collapse on new data are textbook overfitting: the 15 dials traced the noise of the past, not a real edge.

Strategy B uses just 2 parameters. In-sample it shows a more modest 80 per cent win rate. Out-of-sample it holds around 74 per cent, and small parameter changes barely move it. Its backtest is less dazzling, but its edge is stable across data it never saw.

A disciplined trader ships Strategy B and deletes Strategy A, because in live trading robustness beats a beautiful backtest every time.

What 'fat tails' actually means

Many simple models quietly assume market returns follow a neat bell curve (a normal distribution), where huge moves are so rare you can almost ignore them. Real markets do not behave that way. Their return distributions have fat tails: the extreme outcomes at the far edges happen far more often than the bell curve predicts.

The practical consequence is uncomfortable. A strategy tuned on "normal" days treats a once-in-a-decade move as basically impossible, so it sizes positions and sets risk as if the big shock will never come. When the fat tail does show up, and over a long enough horizon it always does, the strategy is caught with far more exposure than it ever accounted for. Fat tails are a big part of why black swans do so much damage to models that assumed calm.

Two machines that made it worse

The 2010 Flash Crash and the Knight Capital loss are worth sitting with, because they show the two ways automation turns bad into catastrophic.

The Flash Crash was a liquidity cascade. Automated selling begat more automated selling, resting buy orders were pulled almost instantly, and for a few minutes there was simply no floor. Prices for some assets printed at absurd levels before the market snapped back. No single "bug" was needed; the feedback loop between many automated participants was enough.

Knight Capital was a deployment error. A flawed software rollout left an old piece of code active, and the firm's automated system began sending a flood of unintended orders the moment the market opened. It was not a strategy being wrong about the market. It was a machine executing a mistake thousands of times before humans could intervene, and roughly 440 million US dollars evaporated in about three-quarters of an hour.

Different causes, same lesson: speed with no human circuit-breaker turns a small fault into a large disaster.

Quick knowledge check

What is overfitting, in plain terms? A strategy tuned so tightly to past data that it memorises the random noise instead of the real pattern, so it looks excellent in backtest but has no predictive value once it trades live.

Why is an automated strategy structurally unprepared for a black swan? A black swan is by definition outside the data the strategy was trained and tested on, so it has never seen anything like it and has no valid learned response, and markets have fat tails that make such shocks more common than a normal model assumes.

Why does deciding when to switch a strategy off need a human? Recognising that conditions have moved outside what the strategy was built for is a judgment call a fixed rule or a normally-trained model cannot reliably make for itself, so a manual off-switch and human oversight are essential controls, not signs of a primitive system.

Sources

  • Notices of the AMS (academic), Bailey, Borwein, Lopez de Prado & Zhu, "Pseudo-Mathematics and Financial Charlatanism: The Effects of Backtest Overfitting on Out-of-Sample Performance", on how a model can describe random noise instead of the underlying pattern and then fail to generalise to new data.
  • arXiv (academic), Nassim Nicholas Taleb, "Statistical Consequences of Fat Tails", Nassim Nicholas Taleb's definition of a rare, high-impact event rationalised as predictable only in hindsight.
  • U.S. SEC & CFTC (joint staff report), "Findings Regarding the Market Events of May 6, 2010", the 6 May 2010 intraday collapse, its scale, and its roughly 36-minute duration.
  • U.S. SEC, "Press Release 2013-222: SEC Charges Knight Capital With Violations of Market Access Rule", the 1 August 2012 software-deployment failure and the resulting loss.
  • OECD (OECD.AI Policy Observatory), "What is AI? Defining AI and machine learning", on models that learn patterns from data rather than following explicitly written rules.

CoinUnited Academy is an education initiative by CoinUnited.io.

This is an educational credential. It is not a licence, not authorisation to give financial advice, and not a guarantee of trading skill or profit.

© 2026 CoinUnited Academy · CoinUnited.io