This backtest made +489 %. Then it lost money.
A moving-average rule on Tesla: 334 trades, profit factor 2.23, a curve that only goes up. On the years it had never seen, it made −8 %.
Nothing broke. The rule never had an edge — Tesla's rally made it look like one. Most backtests you see online fail the same way.
Here are the 10 checks our algos have to survive — and how you can run each one yourself. Two contestants take every check side by side:
Intraday momentum on the Nasdaq 100, from Beat the Market (Zarattini, Aziz, Barbon 2024). Profit factor 1.10 — modest.
Moving-average timing after Zakamulin (2015), coded by our pipeline for Tesla 1-hour candles. Profit factor 2.23 — spectacular.
Is there a reason it should work?
Most ideas die before any code runs. In one research round, 196 papers became one live algo.
The tell. The Noise Band paper names a mechanism — an unusual move away from the open signals a real supply-demand imbalance — and a second, independent paper confirmed it on Nasdaq futures. Zakamulin studied the stock market from 1870 to 2010. Hourly Tesla candles were our pipeline's own translation: an idea with no evidence behind it.
Try it yourself: 5 questions before you write code
- Why should it work — who is on the other side of the trade?
- Which market, timeframe and years was it shown on?
- Were costs included?
- How many trades carry the result?
- Was any period kept back for testing? (The Nasdaq paper says openly that all its results are in-sample. That honesty is a good sign.)
Write the rule down exactly
If two people could code your rule differently, you are testing many strategies and keeping the best — by accident.
The trap. "Long above a rising moving average" needed six choices before it could run: average type and length, distance, slope window, extra filter, stop. Every choice is a dial that can be tuned to the past.
Try it yourself: the rule table
One row each: market, timeframe, time zone, signal, when it is checked (on a closed candle), entry, stop, exit, position size, costs. Measure results in R — the amount risked per trade. Then let someone else (or an AI) code it from the table. If the two versions trade differently, the rule is not exact yet.
Enough trades for the number to mean anything?
Both pass. Tesla even looks far better: twice the profit factor, less than half the drawdown.
The trap. With 30 trades, 16 % of no-edge samples still show a profit factor of 1.5 or more. With 300, 95 % stay below 1.25. Want 300+ trades — and remember that passing this check proves nothing yet.
Try it yourself: a clean first run in MetaTrader 5
| Period | Only the first ~70 % of your history. Keep the rest untouched. |
|---|---|
| Modelling | Real-tick modelling ("every tick based on real ticks"). Never open prices only for a rule with stops inside the candle. |
| Risk | A fixed % per trade, so results read in R. |
| Read | Profit factor and expected payoff first, drawdown second, the curve last. |
Does it beat random entries?
We build 200 copies of each rule: same trades, direction, time of day, stops and costs — only the day is random.
The tell. On Tesla, even random entries made +0.103R per trade in-sample — the stock was rising. The rule beat them there, then lost to 60 % of them afterwards. The Noise Band beat 98 % and 96 % of its copies, in both periods.
Try it yourself: random entries in Python
rng = np.random.default_rng(1)
random_avg = []
for run in range(200):
r = []
for t in trades:
# a random day, same clock time
bar = rng.choice(bars_at_time[t.clock_time])
# same direction, stop, exit, costs
r.append(simulate(bar, t.direction))
random_avg.append(np.mean(r))
# want this below 5-10 %, in BOTH periods
share = np.mean(np.array(random_avg) >= real_avg)
No code? Compare with "enter every day at the same time, same stop and exit". If that does about as well, the signal adds nothing.
Does it survive years it has never seen?
The last 30 % of the data stay locked until the rule is finished. Then it runs once.
The tell. A real edge looks much the same on both sides of the line. A fitted one breaks exactly where the test begins. And not just this rule: of 858 strategies we tested on Tesla, 61 % were profitable in-sample and 42 % afterwards. Of 170 with a profit factor of 1.5 or more, 8 kept it.
Try it yourself: split before you start — and see all 858 Tesla rules
- Fix the split before the first run, e.g. 70 / 30.
- The MetaTrader 5 tester has a forward option where you set the date the test period starts; optimisation then only uses the earlier part.
- A drop is normal. A profit factor below 1 is a fail.
- Failed? Don't tweak and re-run on the same period — it is no longer unseen.
Do nearby settings work too?
We map a whole grid of settings, not just the best one. The Noise Band shows a broad slope: every band width from 1.2 up made money after costs, in-sample and out-of-sample.
The trap. Tesla passes too — all 35 settings profitable in-sample. Out-of-sample the whole plateau sank to around 1. A plateau protects you from a lucky setting, not from a lucky market. That is check 6.
Try it yourself: map the neighbourhood — and see the Tesla grid
- Take the two settings that matter most, 5–10 steps each, from half to double the paper's value.
- Run every combination on the in-sample period (in MetaTrader 5: the complete optimisation, not the genetic one).
- View the results as a 2D map. Pick the middle of a good area — never the single best cell at the edge.
Does it work on similar markets?
Same rule, same settings, other markets. It need not shine everywhere — but it should not lose almost everywhere.
The tell. The Tesla rule lost money in-sample on 15 of the 20 other markets. The wide Noise Band made money on the Nasdaq, S&P 500 and Dow (+0.085R, +0.063R, +0.042R per trade) and lost on the Russell 2000 (−0.016R).
Try it yourself
Run the unchanged settings on 2–5 related markets: other indices for an index rule, other large stocks for a stock rule. If it only works where you built it, you found the market, not a rule.
Choose on the past, trade the next year blind
Pick the best setting from 3 years, trade the next 12 months blind, move on a year, repeat. Only the blind years count.
The honest part. Tesla passes this one: its blind years from late 2019 rode the same rally. Walk-forward on one market cannot tell a rule from a trend — checks 3 and 6 can. The Noise Band passed with only 3 good years out of 6, and the chosen band width often sat at the edge of the grid. A pass, not a landslide.
Try it yourself: walk-forward by hand
- 3 years to choose, 1 year to test. Eight years of data give five blind years.
- Optimise on the 3 years only; note the chosen setting (middle of the plateau).
- Run it unchanged on the next year. Note the result in R.
- Add up the blind years. That sum — not the optimised backtest — is your realistic expectation.
Does it survive triple costs?
We charge spread and commission on every trade — then double and triple them.
The trap. The paper's narrow band trades so often that triple costs turn it negative (−0.012R). The wide band keeps +0.026R. Tesla trades rarely, so costs never hurt it — its problem was elsewhere. Every check catches a different failure.
Try it yourself
Add a cost input to your EA (extra points per trade) and re-run at 2× and 3×. Use your own broker's data and account type — spreads differ a lot. Negative at 2×? The edge is too thin to trade.
Does a second engine agree?
Survivors become real Expert Advisors and run in the MetaTrader 5 tester on every tick, with the broker's spreads and commission, October 2021 to October 2026.
The tell. Two engines built differently agreed within a few hundredths of profit factor. A big gap would mean the code is not the rule you tested.
Try it yourself
Run your EA with real-tick modelling and check the history quality in the report — it should be near 100 %. Compare the number of trades with your own backtest; a large gap means you are testing two different rules.
Does it trade live like its backtest?
Settings frozen, live prices, demo money. The question is not "did it make money?" but "does it trade the way the tester says?" A few months prove no edge — they prove the system works.
Honest status. The customer Noise Band uses settings chosen on all our data, so it has no untouched backtest years left. Its demo forward test only began in November 2026 — too early to judge.
Try it yourself
- Freeze settings and EA version; write the date down.
- Run it on a demo account at your broker for 2–3 months or about 50 trades.
- Every few weeks, run the tester over the same weeks and compare trade by trade. Different entries mean a bug or a time-zone problem.
How much to risk
Shuffle the same 1,589 Noise Band trades into 10,000 random orders. The backtest's worst drawdown was 25R; one order in 20 was worse than 37R, one in 100 worse than 44R. At 1 % per trade, 1R ≈ 1 % of the account. Size for the bad order, not the lucky one.
Try it yourself: Monte Carlo in a spreadsheet
- Column A: every trade in R. Column B:
=RAND(). Sort both by B. - Column C: running sum of A. Column D:
=MAX($C$2:C2)-C2. The maximum of D is that order's drawdown. - Repeat 1,000 times (data table or macro); look at the 95th and 99th percentile.
The scoreboard
| Noise Band | Tesla MA | |
|---|---|---|
| 1. A reason to work | pass | fail |
| 2. Enough trades | pass | pass |
| 3. Beats random | pass | fail |
| 4. Unseen years | pass | fail |
| 5. Plateau | pass | pass |
| 6. Other markets | pass | fail |
| 7. Walk-forward | pass | pass |
| 8. Triple costs | pass | pass |
| 9. Second engine | pass | — |
| 10. Forward test | running | — |
| Passed | 9 + 1 running | 4 |
Tesla passed four checks — the ones most people stop at: a big profit factor, a smooth plateau, a positive walk-forward, low costs. It failed the four that separate a rule from a lucky market.
7 questions to ask any backtest
Yours, a seller's or ours. Tick them off.
Fine print
- Python backtests on 30-minute (Noise Band) and 1-hour (Tesla) candles, costs at our broker's current conditions, 70/30 split. MetaTrader 5 on every tick. Walk-forward (Noise Band), MT5 and the research funnel come from our Noise Band study; everything else, including Tesla's walk-forward, was recomputed for this page.
- Random copies of the Tesla rule hold trades longer than the rule itself, which exits on the opposite signal.
- Forward tests run on demo accounts. Passing every check lowers the odds of fooling yourself; it guarantees nothing. Past results are no guarantee of future results, and trading leveraged products involves risk of loss.