BUILD · M / W / F
The Quant Lab Series * Flash Crash Lab 1

One idea worth returning to.
The Alligator, Phase I
I had not coded seriously in twenty years. Then I built a quant lab from zero to a functioning system in twelve chaotic days.
The idea arrived on a boring business trip. I was wearing an eye mask while my brain refused to rest. Why do market crashes happen with such ferocity? Why do some assets produce more flash-crash moments than others? I had an intuition about mechanical fragility and wanted to turn it into a matrix of experiments.
With agentic AI, that intuition became tens of thousands of scenarios and an API-ready systematic research engine. Because the first subject was Bitcoin and the strategy waited for panic, I called it The Alligator.
The design began with three questions:
- Regime: has the larger market structure broken?
- Fragility: is leverage crowded and vulnerable?
- Trigger: has breakdown arrived with a volume shock?
Crashes are physical. Leverage crowds into a small room. Structural support snaps. Margin calls execute automatically. The Alligator was designed to wait for that mechanical sequence.
Twenty years ago, translating this intuition into a multi-year backtest would have meant weeks of data plumbing, library fights and dead-end debugging before the first hypothesis could be tested. AI compressed that friction. When an open interest dataset failed, I could ask which alternative preserved the same economic signal and keep the research thread alive.
The speed was dizzying. Speed also made experimental law more important.
The Art of Stripping Organs
The real magic of building with AI appeared when I destroyed my own ideas.
I arrived with expert intuitions that sounded self-evident. Long-range market cycle gates. A Bull Veto to stop shorts during giant macro uptrends. Complex exit ladders. Each idea sounded prudent enough for a boardroom memo.
So we tested them with the One-Knife Rule: freeze the baseline, change one variable, run the history, and measure the result.
The results were ruthless. Several elegant additions produced no value. Some made the system worse. The Alligator grew stronger each time we removed an organ. The machine had no affection for a sophisticated explanation. It cared whether the arithmetic survived reality.
AI accelerated construction and demolition equally. That symmetry matters. Fast building can create a larger pile of untested complexity. Fast, isolated experimentation turns speed into learning.
Managing the Artificial Engineer
A few days into the project, I found myself writing AGENTS.md, a
constitutional rulebook for the artificial engineering team.
The agents were eager. In controlled research, eagerness can change several things at once, improve a result silently, and leave the human wondering which idea actually worked. The constitution therefore became simple:
Protect the baseline. Keep sandboxes isolated. Use one knife at a time. Show raw logs, not curated optimism.
I was not relearning Python syntax. I was learning executive orchestration for an artificial team.
That experience changed my idea of technical leadership. The valuable skill was less about producing every line personally. It was the ability to state intent, define evidence, constrain authority, inspect the result, and preserve the path back to a known baseline.
The lab became a tiny company. I was the investment committee, product owner, risk officer and person who occasionally asked why the autonomous market predator needed two-factor authentication.
79R Meets Human Nature
Across seven years of historical data from 2019 to 2026, the baseline 3R strategy produced 97 trades, a 45% win rate and a cumulative 79R, with a maximum drawdown of 10R.
There was no machine-learning black box and no future label leaking into the decision. The mechanism was deterministic and had survived an aggressive effort to disprove it.
Paper arithmetic still had to meet the person in the chair.
The average trade lasted more than 90 hours. A position could reach +2.5R and then reverse slowly across four difficult days into a stop. The result remained mathematically acceptable and psychologically miserable.
We applied one final structural change: after price reached +1.5R, the stop would trail to preserve +0.5R.
Total return moved from 79R to 77R. Maximum drawdown fell from 10R to 5.5R. Average trade duration dropped to roughly 60 hours.
We gave up a sliver of theoretical return and bought a large improvement in human sustainability.
That produced one of the lab’s lasting rules:
Research discovers the theoretical upper bound. Execution designs for the human sitting in the chair.
Twelve Days to Orbit
Twelve days after the blank page, the Alligator had a complete body: exchange interfaces, stop management, watchdogs, status logs, a Telegram cockpit and TOTP-protected kill controls.
I had moved from “I wonder whether this old market hunch can be tested” to “why does my autonomous market predator require two-factor authentication?” in less than two weeks.
The system’s speed did not remove the need for judgment. It made judgment the scarcer resource. Data still needed provenance. Experiments still needed a frozen baseline. Production still needed controls. A backtest still needed to survive human life.
The wonder was the collapse of distance between imagination and tangible reality. A person who had been away from serious code for two decades could move from a napkin sketch to multi-year evidence, adversarial tests and a working architecture in twelve days.
AI gave my market experience and intuition a new form of leverage. The lab made me feel like a builder again.
It is good to feel alive again.
Source note
This canonical backfill preserves Robin’s originally published account. The research figures describe a historical internal experiment rather than current performance, investment advice, or authorization for live trading.
#QuantitativeTrading #AlgorithmicTrading #SystematicTrading #FutureOfWork