From words to rules: formalization
Why this lesson
Section titled “Why this lesson”Every discretionary technique sounds precise until you try to hand it to a machine. “Buy the London breakout” feels like an instruction; it is actually a paragraph with holes a person fills in without noticing. Those holes are where the strategy secretly re-absorbs the trader’s hindsight — and where a backtest quietly lies to you. Formalization is the unglamorous skill of turning words into a rule spec so complete that two people, or two runs, produce the same trades. This is also the free-content gap: only two serious published treatments exist, and neither is free. So this lesson is the course adding its own value.
Segment: 24:00–31:00 — continuous vs binary rules, forecast scalingwatch full video
The explainer
Section titled “The explainer”A rule spec is a description of a strategy precise enough to be deterministic: run it twice on the same data and you get the same trades; hand it to another developer and they build the same thing. The bar is not “sounds clear.” The bar is two people, identical trade list. Anything short of that leaves room for judgment, and judgment under P&L stress is exactly what systematic trading exists to remove.
Robert Carver draws the line cleanly: if you cannot write an algorithm to identify the pattern, it is not systematic. A “head and shoulders” you recognize by eye is not a rule — it is a feeling with a name. The moment you try to code it, you discover the technique never actually specified how deep the neckline goes or how symmetric the shoulders must be. That discovery is the whole point. Carver’s Systematic Trading Part Four calls the trader who wraps a discretionary forecast inside a systematic risk-and-sizing framework the semi-automatic trader — a real and defensible archetype, but only if the discretionary part is walled off and named, not smuggled in everywhere.
A complete spec has four kinds of rule, and a description that omits any of them is not finished:
- Entry rules — the exact condition that opens a position: which price, which level, measured on which bar.
- Exit rules — how the position closes: target, stop, time-based exit, opposite signal. Most “strategies” are 90% entry and hand-wave the exit, which is backwards — the exit usually matters more.
- Filter rules — conditions that must hold for an entry to be allowed at all: a regime filter, a session window, a volatility floor.
- Sizing rules — how big the position is. “Buy” is not a spec; how many lots, computed how is.
Tomas Nesnidal’s breakdown of a breakout gives a concrete checklist for the entry side alone. Any breakout needs a point of initiation (the reference price you break from), a distance (how far beyond it counts as a break — often an ATR multiple, not a fixed number of pips), a time filter (when the setup is valid), and a confirmation filter (a second condition that separates a real break from noise). Each of those four is a decision the plain-English version silently made for you.
Now the failure mode this lesson is really about. Discretionary leakage is the extra judgment a trader applies but does not state — “I’d skip that one, it didn’t look clean.” When you formalize, every unstated judgment becomes a fork you must resolve, and here is the danger: it is enormously tempting to resolve each fork in the direction that made the historical chart look good. That is the taught-vs-actual gap — the difference between the rules someone describes and the rules that would reproduce their actual trades. David Aronson’s Evidence-Based Technical Analysis Part One is the definitive treatment of why subjective chart-reading feels valid and usually is not: the human eye finds patterns in noise and then remembers the confirmations. The discipline is to make every gap explicit, choose each resolution without looking at which choice performs better, and write it down.
So formalization has two motions. First, write the spec — entry, exit, filter, sizing, each deterministic. Second, and more important, hunt the underdetermined spots — the places where the words left the machine free to guess. Those spots are not annoyances to smooth over. They are the exact locations where hindsight sneaks back in, and finding them before you test is what separates an honest validation from a flattering one.
Here is a plain-English technique. It sounds complete. It is not.
London Breakout. “Before London opens, mark the high and low of the Asian session. When price breaks the range, go with it. Put your stop on the other side of the range and target the size of the range.”
Formalize it, then break it.
- Write the rule spec as four labelled blocks — Entry, Exit, Filter, Sizing — filling in every value you can from the description. Make each block something a developer could code without asking you a question.
- Find the three (or more) places the description underdetermines behavior. Aim for at least three; strong candidates:
- “The Asian session” — which exact hours, in which timezone, and what happens across daylight-saving shifts? “Mark the high and low” of what, precisely?
- “Breaks the range” — is a break a touch, a close beyond, or a move of X beyond it (Nesnidal’s distance)? On which bar do you act — the one that breaks, or the next open?
- “Go with it” — if both sides break in the same session (a whipsaw), do you take the first, both, or skip? And how big is the position — the description never gave a sizing rule at all.
- “Target the size of the range” — measured from the entry price or the range edge? If the stop and target are both “the range,” what is the reward-to-risk, really?
- For each gap, write down your resolution and one sentence on how you chose it. The honest rule: choose before you see which choice backtests better. If you catch yourself wanting to peek, that is discretionary leakage trying to get back in.
- Hand your spec to a second person (or your future self next week) and check the real test: would they generate the same trades? Every “it depends” is a hole you missed.
Keep this spec. The London Breakout you just pinned down is the strategy you will backtest on net costs in Lesson 2.4 and carry to the Level 2 capstone.
Terms introduced
Section titled “Terms introduced”Check yourself
A rule spec is "good enough" when:
Carver's test for whether something is genuinely systematic is:
The four categories every complete rule spec must cover are:
"Discretionary leakage" refers to:
The honest reason to hunt for the places a description underdetermines behavior is that:
You can move on when you can… take a verbally described technique and produce a deterministic rule spec two people could run identically — and identify where the description underdetermines the behavior.
Go deeper
Section titled “Go deeper”- Robert Carver’s blog (qoppac) — free fragments of the Systematic Trading framework, including his writing on rule design and not meddling.
- The two books that own this topic (both paid — this is the free-content gap):
- Robert Carver, Systematic Trading, Part Four — the “semi-automatic trader” archetype: how to wall off a discretionary forecast inside a systematic framework.
- David Aronson, Evidence-Based Technical Analysis, Part One — why subjective chart-reading feels valid and isn’t, and how to specify and test a rule like a scientist.