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

One idea worth returning to.
The Alligator Was Not the Problem; I Was
The Constitutional Convention
Act I: The Crocodile Bites Twice, and Robin Immediately Calls a Constitutional Convention
T001 and T002 lose on paper. Execution is messy. Confidence falls faster than Bitcoin.
Act II: A Perfectly Reasonable Human Reaction, Also Known as Overengineering
T003 and T004 wobble. Suddenly we invent G1, no stacking, ATR targets, timecaps, blockers, and several elegant ways to improve an animal we may not yet understand.
Act III: The Dead Crocodile Sits Up
T005–T008, ugly in the G1 universe, quietly wins in the old M0 universe. The suspect returns to the crime scene carrying four receipts.
Act IV: Archaeology
We stop reading our own markdown mythology and interrogate Python. The true creature emerges: 1-hour soul, 15-minute heartbeat.
Act V: The Stop Loss Is Not a Stop Loss
The mysterious wide stops turn out to be structural 1-hour swing highs, often sitting exactly where Robin’s human eye had already marked supply.
Act VI: Worst-Case Therapy
Seven-year sandbox evidence shows the animal can lose five times in a row and draw down 5.5R with StopMove_B1. No-StopMove earns slightly more and makes the operator want to move to a monastery.
Act VII: Return of the Old King
P4 restores M0, but at R=1500, with StopMove_B1, three logical legs, no clever blocker, no timecap, and a black-box recorder. P4 is P1 with memory.
Five Courts of Law
I thought I was debugging a trading strategy. By early June, I realized I had been debugging something far more dangerous: my own interpretation of pain.
The story begins on May 18, when the first two Flash Crash production signals, T001 and T002, fired. They did not lose much actual money because execution itself was still stumbling over its shoelaces. There were leverage assumptions, max-size constraints, S4 reporting oddities, and exchange mechanics that production code understood only approximately. But in the research ledger, T001 and T002 were losers.
And psychologically, that was enough. I began to doubt the crocodile. This was the first mistake.
Not because doubt is bad. Doubt is the immune system of capital allocation. The mistake was allowing uncertainty in one layer to infect my judgment of another.
A trading system has several courts of law. There is the strategy court: did the signal have an edge? There is the execution court: did the order reach the exchange as intended? There is the operations court: did state, leverage, sizing, and protection behave correctly? There is the accounting court: did the ledger reflect reality?
And then there is the most dramatic court of all: the human nervous system.
In May, these courts were not sufficiently separated. So when execution was immature, I began prosecuting the strategy. T003 and T004 arrived a few days later and did not improve morale. One appeared favorable for a while and later lost. Another showed limited favorable excursions. The trades felt slow, sticky and unsatisfying.
I began asking perfectly intelligent questions. Was the 3R target too ambitious? Was the system waiting too long? Was stacking trades a form of automated stupidity?Were we shorting after the move had already happened? Could we harvest only the first bite?
Optimizing for the Operator
The answers became G1. G1 was elegant. It compressed the target using ATR. It prohibited stacking. It imposed a 24-hour timecap. It treated the signal as a release detector rather than a prophecy of apocalypse. The philosophy sounded almost poetic: The signal predicts release, not apocalypse. Harvest the first bite, then move on.
I liked G1 because it solved psychological problems. Time pain. Giveback pain. Stacking pain. Late-entry pain. Bottom-tick pain. The terrible feeling of watching a short position float around for several days while Bitcoin does absolutely nothing useful. G1 gave those pains names. That was valuable. But there is a subtle danger in optimization: sometimes we accidentally optimize for the operator instead of the strategy.
We were about to discover that. The turning point came with T005, T006, T007 and T008. In the G1 universe, these trades looked increasingly ridiculous. The entries seemed late. Some looked like they were stacking into weakness after the first move had already occurred. Human intuition looked at them and muttered, “What exactly are you doing?” Then we reconciled them in the original M0 universe.
The Dead Crocodile Sits Up
All four worked. I remember staring at the results.
Wait. What?
The ugly trades survived because their stops were enormous. At first, “enormous” sounded like an accusation. Looking closer, M0 was not using some arbitrary wide stop because the programmer had forgotten risk management. It was using a 1-hour structural stop. The stop was the most recent confirmed 1-hour swing high, with a fallback to the previous 20 completed hourly highs. This was the moment the old crocodile suddenly became intelligent.
M0 was not saying: “If the price goes against me a little, I am wrong.”
It was saying: “If price reclaims the structure that invalidates the bearish breakdown, I am wrong.”
That is a completely different philosophy. And it explained the tolerance.
Flash crashes are not polite. They break, bounce, squeeze weak shorts, fake repairs, and they break again. The market rarely performs the clean textbook gesture of falling immediately after entry because the algorithm has politely arrived.
M0 gave the market room to misbehave without declaring the thesis dead.
A One-Hour Soul
Then something even stranger happened. I began reviewing the stop levels visually. Many of them sat exactly where I would have drawn a 1-hour supply zone. Months earlier, I had experimented with what I jokingly called the “wait for the rabbit” Zone + MA99 idea: do not chase price; wait for price to approach a structural area and let the market reveal itself. The program knew nothing about my eyes. Yet its confirmed swing-high stops often landed near the same supply structures I had been marking manually. The human chart reader and the machine were speaking different dialects of the same language.
That was when the entire project rotated in my head. Maybe the crocodile was not crude. Maybe I had misunderstood its species. M0 was not a 15-minute scalper. It had a 1-hour soul and a 15-minute heartbeat. The scheduler woke every fifteen minutes, but it looked at the latest fixed 1-hour candle bucket and its structural features. The entry used the latest partial 1-hour close snapshot, effectively the current market price at the scan. The signal architecture lived in a 1-hour structure.
This also explained stacking. From a single-trade perspective, stacking looked psychologically terrible. The next entry might be lower. The exchange might merge the positions into one average net entry. It could feel like the system was chasing the market downward.
But viewed as a campaign, stacking became more coherent. The first signal says the structure is fragile.The second signal says the structure remains fragile. The third says the market has still not been repaired. The trades are separate logical legs inside the same structural campaign. Suddenly T005–T008 were no longer four embarrassing trades. They were one story.
This was the beginning of my real lesson. My discomfort had been real. But I had interpreted the discomfort incorrectly.
I thought pain meant: “The strategy is wrong.”
Sometimes pain actually means: “You do not yet understand the strategy’s worst-case path.”
Worst-Case Therapy
So we stopped designing new crocodiles and started studying the old ones. We looked at the seven-year sandbox. M0 with StopMove_B1, max three open logical positions, fixed 3R target, produced roughly 103 trades and 77R in that historical sandbox. More important than the total return was the shape of suffering. Maximum drawdown: about 5.5R. Maximum consecutive losses: five. Average duration: roughly sixty hours. Some drawdowns took months to recover.This was the map I had been missing. Then we compared the version without StopMove_B1. Raw return improved slightly, from roughly 77R to 79R, yet the maximum drawdown rose from 5.5R from 10R. From a Pareto frontier, M0 with StopMove_B1 wins with an edge: psychological tradeoff and system survivability.
The Blocker That Failed
Then, because we are human and apparently incapable of seeing an elegant pattern without attempting to improve it, we discovered blockers. One blocker looked beautiful. Zero winners were blocked. Six losers were eliminated. Higher total R, lower drawdown. We became excited for approximately five minutes. Then we tested it dynamically. A raw candidate winner appeared among the blocked trades. We tested the cleaner N4 blocker against the production fossil slice. It blocked T008, a winner. The blocker was escorted politely out of the building. This may have been one of the most mature moments in the entire project: By not trying to outsmart myself, the alligator was saved from another surgery.
P4 Is P1 With Memory
By June 9, the design had converged. Production V4: M0 real-money track. Maximum three logical positions. StopMove_B1 on. No blocker. No timecap. G1 demoted to shadow research. On paper, this looked suspiciously like Production V1.
Had we spent three weeks running in a circle?
Yes. And no.
P4 restored P1’s strategy soul. But P1 had almost no memory. P4 had an entire nervous system including a scan snapshot, signal row, opportunity ledger, lifecycle update, each campaign state, exchange order readback, logical leg, protection order, StopMove state, and reconciliation report. P4 = P1 with memory. The old crocodile returned to the swamp, with camera recorders.
The Contract With Pain
That is the deepest lesson I took from the entire first arc of Flash Crash Lab: When a system behaves painfully, do not immediately change the system.
First ask: Where is the failure point - strategy, execution, operations, data, or logging? Or simply a known form of pain that the strategy must endure to earn its edge? I used to think set-and-forget meant designing a system that produced no discomfort. Now I think the opposite.
Set-and-forget is achieved by understanding discomfort in advance.
I know the losing streak, the drawdown, the holding time, the failure mode and you manage the risk until those outcomes are tolerable. Then I make a contract with myself: “If it hurts in the way I already understood and accepted, I will not interfere.”
The Contract Needs a Passport
A worst-case map becomes useful only when it is written as an operating contract. The seven-year sandbox did not promise that the next live sequence would resemble history. It gave us a bounded reference: five consecutive losses had happened; a drawdown near 5.5R had happened; recoveries could take months; average holding time was measured in days rather than minutes. Those observations changed the question from “Does this hurt?” to “Is this pain still inside the distribution I approved?”
The contract also separated several kinds of discomfort that my nervous system had previously compressed into one alarm. A clean strategic loss belonged to the hypothesis. An exchange rejection belonged to execution. A local-versus-exchange mismatch belonged to reconciliation. Missing telemetry belonged to evidence quality. Each failure had a different owner, a different escalation path, and a different right to stop the experiment.
That separation mattered because a human can tolerate more uncertainty when its jurisdiction is clear. I did not need to feel calm during every drawdown. I needed to know which law applied, how much capital remained at risk, and what evidence would authorize intervention. Smaller R made the accepted loss path survivable. StopMove_B1 reduced the depth of historical suffering without amputating the strategy. The three-leg cap kept one campaign from becoming an empire. The black-box recorder made future disagreements reconstructable.
The result was less exciting than a clever new signal. It was also far more valuable. P4 did not eliminate fear. It stopped fear from acquiring root access to the strategy. That is the actual meaning of set-and-forget: the system continues under pre-agreed law while the operator is uncomfortable, and it stops automatically when reality crosses a boundary that was defined before the pain arrived.
The contract does not ask me to become emotionless. It asks me to keep emotion inside the same evidence system as price, execution, risk, and memory.