WhitmanTrading

Systematic Trading: The Rules Decide

Systematic trading specifies entries, exits and position sizing as rules precise enough to be executed without any judgement in the moment. That removes discretion from the point of decision and, more importantly, makes the whole approach testable in a way a discretionary method never is.

How it works

A candlestick chart of the site's shared price history. The headline on the chart reads: Rules decide, and the person does not.
Rules decide, and the person does not. Illustrative chart - not real market data.

Every decision is specified in advance. What qualifies as a signal, how large the position is, where the exit sits — written down completely enough that no judgement is required at the moment of acting.

A gently rising stretch of the long price series with an account equity curve beneath it. The headline on the chart reads: It removes the decision that was going wrong.
It removes the decision that was going wrong. Illustrative chart - not real market data.

The usual reason for adopting it is behavioural. The decisions being made under pressure were the ones producing the losses, and removing the decision removes the problem more reliably than trying to make it better.

A calmly advancing stretch of the long price series with a slowly rising equity curve beneath it. The headline on the chart reads: Every rule has to be specific enough to code.
Every rule has to be specific enough to code. Illustrative chart - not real market data.

Codability is the test of a rule. “Enter on a strong breakout” is not a rule; “enter when the close exceeds the highest close of the previous twenty bars” is. Writing the rules is where most of the useful work happens, because vagueness that survived in a discretionary method cannot survive here.

A flat, quiet stretch of the long price series with a gradually rising equity curve beneath it. The headline on the chart reads: Which makes the whole thing testable, which is the point.
Which makes the whole thing testable, which is the point. Illustrative chart - not real market data.

And testability is the real advantage. A discretionary approach cannot be evaluated because it was never fully specified; a systematic one produces a result somebody else could reproduce.

The failure the structure invites

A strongly rising stretch of the long price series with an account curve breaching its limit. The headline on the chart reads: And also makes it very easy to fit to the past.
And also makes it very easy to fit to the past. Illustrative chart - not real market data.

The same testability makes fitting trivial. Parameters can be adjusted until the historical curve looks excellent, and the result describes the history rather than any edge.

A choppy, directionless stretch of the long price series. The headline on the chart reads: A rule added to fix a bad year is usually curve fitting.
A rule added to fix a bad year is usually curve fitting. Illustrative chart - not real market data.

The characteristic version is a rule added to remove a bad period. It always improves the backtest and almost never improves the future, because it was derived from the outcome it is fixing. Overfitting is the failure this whole approach is most exposed to.

A declining stretch of the long price series. The headline on the chart reads: The hard part is following it through a losing run.
The hard part is following it through a losing run. Illustrative chart - not real market data.

And the behavioural problem returns in a different place. The discretion removed from individual trades reappears as the decision whether to keep running the system at all, usually during the drawdown the testing predicted.

In practice

A 72-bar candlestick section of the shared price history with an account curve shown with and without fees. The headline on the chart reads: And costs have to be in the model or it is not a model.
And costs have to be in the model or it is not a model. Illustrative chart - not real market data.

Costs belong inside the rules. At 2% of a median bar’s range per round trip on this site’s shared history, a high-frequency system’s result is mostly determined by the cost assumption rather than by the logic.

A candlestick chart with a volume histogram beneath it, with the volume histogram emphasised. The headline on the chart reads: It can use participation, and most of them do not.
It can use participation, and most of them do not. Illustrative chart - not real market data.

Volume is available as an input and mostly ignored. Price-only systems dominate, partly because volume data is less consistent and partly through convention.

A long-horizon candlestick view of the same price series. The headline on the chart reads: A slower system needs far more years to evaluate.
A slower system needs far more years to evaluate. Illustrative chart - not real market data.

Evaluation time scales with trade frequency. A system taking four trades a year needs decades to produce a usable sample, which is why slow systems are so difficult to validate honestly.

A candlestick series containing several opening gaps, with the largest opening gap marked. The headline on the chart reads: And a gap is the event no backtest models properly.
And a gap is the event no backtest models properly. Illustrative chart - not real market data.

A gap is where most backtests are wrong. Many fill stops at their level across one, which cannot happen and removes the largest single risk from the record.

A declining stretch of the long price series, with the entry price and the level at which a stop would trigger drawn as horizontal lines. The headline on the chart reads: The stop is a line of code and not a decision.
The stop is a line of code and not a decision. Illustrative chart - not real market data.

The stop stops being a decision. Which is the clearest single benefit — the level was chosen when nothing was at stake and it executes without a conversation.

A candlestick chart of the site's shared price history, annotated with the round-trip cost. The headline on the chart reads: Every signal taken costs a share of a bar.
Every signal taken costs a share of a bar. Illustrative chart - not real market data.

Every signal has a price. Which makes the number of trades a system generates a design parameter rather than an outcome, and one worth deciding deliberately.

Making it survivable

The rule that keeps a system alive is a stopping condition written before it starts. A maximum drawdown or a losing run beyond what the testing produced, at which point the system is switched off and reviewed rather than adjusted mid-run.

Without that, the decision arrives during the drawdown and it will be made badly. A system with no stated failure condition cannot be abandoned rationally, which means it will be abandoned emotionally — and usually at the worst point in its distribution.

One decision matters more than the rules themselves and gets far less attention: how many parameters the system has. Each one is a dial that can be turned until the past looks good, so a system with three parameters is far harder to overfit than one with twelve — and far more likely to survive contact with data it has not seen.

Fewer parameters also make the failures legible. When a two-parameter system stops working you can usually say what changed; when a twelve-parameter one does, you cannot. Prefer the simpler version even when it tests worse, because the tested advantage of the complex one is largely an artefact of having more dials.

What systematic trading is not

It is not automatic profit. The rules can be wrong.

It is not free of judgement. The judgement moved earlier.

It is not free of psychology. It relocates the difficulty.

And it is not validated by a backtest. That is the first filter only.

When it fails

A sideways, range-bound candlestick series. The headline on the chart reads: In a range a trend system loses exactly as designed.
In a range a trend system loses exactly as designed. Illustrative chart - not real market data.

A trend system in a range loses exactly as intended, and that is the moment people conclude it is broken. Distinguishing a system performing as designed from one that has stopped working is the central difficulty, and only pre-stated expectations make it possible.

The second failure is adding rules during a drawdown. Every one improves the past and the sample restarts.

A third is over-optimising the parameters. A system that only works at exactly one setting is describing history.

A fourth is omitting costs. For anything short-horizon they decide the outcome.

And a fifth is switching systems after a losing run. Twenty trades cannot distinguish a broken system from a normal drawdown, and the switch resets the sample to zero.

The original data

On this site’s shared 576-bar history the round-trip cost is 2% of the median bar range and 45% of the smallest bar, the base rate for a higher close is 52% over one bar across 571 observations, and a breakout above a 20-bar high closed back below the level within ten bars in 85% of 39 events. The figures are in research/series-measurements.json, produced by site/measure_series.py.

A strongly rising stretch of the long price series, cut short at the decision bar. The headline on the chart reads: Twenty losses and the rules say take the next one. Do it?
Twenty losses and the rules say take the next one. Do it? Illustrative chart - not real market data.

That 85% figure is the sort of thing a system has to be built around rather than surprised by. Thirty- nine events is a small sample and the direction is clear: breakouts on this series mostly fail, so a system trading them needs its edge to come from the size of the winners rather than from the hit rate. Compute the base rate before writing any rule — a signal that beats doing nothing by two percentage points is not an edge once costs arrive.

Backtesting is how the rules get checked, and its six failure modes. Overfitting is the error this approach invites. And trading bot is the execution layer once the rules exist.

What I actually do

I moved most of my process to rules for one reason: I could not tell afterwards whether a discretionary decision had been good. With rules, a losing run is either inside what the testing predicted or it is not, and that is a question with an answer.

— Michael Whitman

This page is educational, not financial advice. Test every idea on your own charts before risking money.