Research method
Mechanical systems: fixed rules, tested out of sample
A mechanical trading system writes entry, exit, position size and the decision to stand aside as rules before the test, and then follows them without discretion. 322 readings in the TradersWeek archive use the idea; in 22 it is the main subject.
- Output
- Signal
- Input
- Price bars and any other series the rules read; trading costs and account size for the test
- Horizon
- Any bar interval; set by the rules, with shorter bars raising turnover and the cost each trade must clear
- Best use
- Turning a trading idea into one procedure that can be tested, checked on unseen data and run without second-guessing
- A system is mechanical only when two people given the same data and the same rules would place the same trades: entry, exit, size and standing aside are all written down.
- The rules have to be fixed before the test. Every change made after looking at the result turns part of the test data into design data.
- Out-of-sample data is history the rules never saw while they were chosen. A result that holds only in-sample describes the past, not the rules.
- Optimizing on the whole history and adding parameters are the two usual ways to fit a system to noise; each extra parameter needs more trades to judge it.
- In the archive mechanical systems sit most often beside rule-based entries (56 readings), trading psychology and process (53), system optimization (53) and walk-forward analysis (43).
How the method is built, and where it has been read
Depends on
Often reviewed together
Drawdown limit4 readings
Often reviewed together
Breakout system4 readings
Often reviewed together
Pattern recognition5 readings
Often reviewed together
Momentum strategy6 readings
Often reviewed together
Rank rotation7 readings
Often reviewed together
Moving-average crossover7 readings
Often reviewed together
Trend filter8 readings
Often reviewed together
Market breadth8 readings
Read in the archive24 of 322 readings
What makes a system mechanical
A mechanical trading system is a procedure, not an indicator. It states which data it reads, when it enters, where it exits on a loss and on a gain, how large each position is, and when it does nothing. Given the same bars, it produces the same trades every time, whoever runs it, so it can be tested and then followed when the next trade feels wrong.
"Enter on a breakout unless the market looks weak" is not a rule until "looks weak" is written as a condition. Standing aside is a rule too, and it changes results as much as the entry does.
Why the rules come before the test
A backtest says what these exact rules would have done on this history, and nothing about rules adjusted after seeing the answer. If a lookback is changed because the first run lost money in 2018, the 2018 bars are no longer a test; they became part of the design. Write the rules, run them, and treat each change as a new system that needs fresh data to judge.
In-sample and out-of-sample
Split the history. The in-sample part is where rules and parameters are chosen. The out-of-sample part is kept aside and used once, after the choice is final. If the system keeps a reasonable share of its in-sample result on bars it never saw, the rules may be catching something repeatable. If it falls apart, the in-sample result was mostly fit.
Walk-forward analysis repeats this in steps: optimize on one window, test on the window that follows, move forward and do it again. One slice can be lucky; several show whether the parameters keep working or every window wants different values.
Two pitfalls
Optimizing on the whole history. Searching parameters over all available data and reporting that result leaves no unseen data. The best set found that way is the best description of the past, and a search over enough combinations always finds one that looks good.
Too many parameters. Each lookback, threshold and filter is another degree of freedom. With six parameters and eighty trades, the system can bend around individual trades. Fewer parameters, values chosen from the idea rather than the result, and neighbouring values that behave similarly are signs of a rule rather than a fit.
Parameter set
The choices that decide whether a test means anything
- inSample
- In-sample share
Share of each window used to choose parameters; the rest is the out-of-sample test that follows it.
Default: 60% in-sample, 4 windowsA small out-of-sample share holds few trades, so a good or bad result there can be chance. - freeParameters
- Free parameters
Values the optimizer is allowed to change: lookbacks, thresholds, stop and target distances.
Default: 2–4Each added parameter lets the system fit more of the noise in the sample it was tuned on. - minTrades
- Minimum trades
Trades a window needs before its result is counted at all.
Default: 5 per in-sample and out-of-sample halfThis is a floor, not a sample: a ratio built on a handful of trades says very little. - costs
- Costs per side
Commission and slippage charged on every entry and exit in the test.
Default: 0.1% + 0.05% (crypto)Testing without costs favours rules that trade often; short bars raise the cost each trade must clear.
What 322 readings in the archive do with mechanical systems
The TradersWeek research archive links mechanical trading systems to 322 readings: 21 in the 1980s, 103 in the 1990s, 85 in the 2000s, 99 in the 2010s and 14 in the 2020s. In 22 of them the mechanical system itself is the main subject.
The most frequent companions are rule-based entries (56 readings), trading psychology and process (53), system optimization (53), walk-forward analysis (43), checklists (36), trend following (28), moving averages (25), robustness testing (23) and stop-losses (17).
The readings return to four themes:
- One complete procedure. Readings from 1991 to 2020 call a system complete only when entry, exit and standing aside are written as one rule set; a market view, a sketch on a chart or a vendor listing does not qualify until it is restated that way.
- Undisclosed rules cannot be tested. Readings from 1988 to 2020 treat catalogues and packaged systems as inventories to question, not as evidence: without the rules, inputs and markets, a system cannot be checked, versioned or diagnosed.
- Optimization needs unseen data. 92 readings pair mechanical systems with optimization, walk-forward analysis or robustness testing; they lock parameters only after later history is checked, read walk-forward windows as a test of parameter stability, and test on synthetic prices when history is short.
- The trader still decides. Readings from 2008 to 2020 note that fixed rules do not remove emotion: accepting a signal, choosing which system runs and switching it off in a drawdown are human choices that need rules of their own.
Where it fits in a workflow
Write the idea as rules, exit and staying flat included, and set costs and risk before the first run. Choose few parameters on in-sample data, check them out of sample and with walk-forward windows, read the longest losing streak and drawdown as closely as the net result, then run the unchanged rules forward on paper.
On the TradersWeek chart
Strategy Builder, part of the Pro plan at $30/month, writes a system as entry and exit conditions with a risk block: 2% of a $10,000 starting balance at risk, a stop at 1.5 ATR and a target at 2 ATR by default, with commission and slippage set per market (0.1% and 0.05% per side on crypto). The backtest runs in the browser on the loaded bars.
The genetic optimizer searches parameter ranges, by default the stop, the two targets and the ATR period, against one of 12 goals. It works on all loaded bars, so its best set is in-sample. Walk-forward uses 4 windows of 60% in-sample by default, sliding or anchored; its verdict is the median ratio of out-of-sample to in-sample Sharpe over windows with at least 5 trades in each half, Robust from 0.7, Acceptable from 0.4. The evolver, which builds rule sets itself, uses only the first 70% of history and marks entries that fail on the last 30% as Overfit. Monte Carlo runs 1,000, 5,000 or 10,000 passes over the trade list. A strategy can be exported as Pine Script v5.
A strategy bound to auto paper trading places orders on the free paper account when a bar closes; it runs only while the tab is open. Without the tab, the grid and DCA bots, also Pro, are built to trade on Binance, Bybit or OKX through your own API key, within default limits of 5 live bots, $5,000 notional per bot and $500 daily loss; their rules are the bot settings, not a Strategy Builder system.
