Skip to content
Get a license
The study · ProRealAlgos

What works (and what doesn’t) in the stock market.

Most backtests look better than the future turns out. This page looks beyond the shiny backtest, in moving pictures: what a backtest is, how it breaks, and what 419,486 of them say about trading strategies.

419,486Backtests run
943Passed all four filters
139Years of market data
Illustration
In sampleWhat the backtest promisedOut of sample
Part 1 · The basics

Six ideas you need before any number.

Every strategy page, every equity curve and every claim about trading rests on these. Each picture is an illustration on made-up prices, so the idea is easy to see.

01 · THE BACKTEST

A backtest replays fixed rules on past prices.

You write the rules down first: when to buy, when to sell, how big the cost of each trade is. Then a computer walks through history bar by bar and records every trade the rules would have made. Add the trades up and you get the equity curve.

It answers one question only: what would these exact rules have done on these exact prices? It says nothing about anyone’s real account, and nothing about tomorrow.

Rule: buy when price closes above its 20-bar average, sell when below
Price20-bar averageEquity of the rule
0Trades
–Winners
0.0Paid in costs
0.0Net result
02 · IN SAMPLE AND OUT OF SAMPLE

The data you built on, and the data you didn’t.

In sample is the stretch of history a strategy was designed, chosen or tuned on. It has seen those prices, so it looks good there almost by definition.

Out of sample is history the strategy never saw: prices after its rules were fixed, or a period held back on purpose. Only there do you learn whether the edge was real.

1.58 → 1.12Gains/loss ratio, before vs after 2022
16%Of the edge left out of sample
29%Did as well or better after release
71%Did worse than in sample

Last two: strategies with at least two years of prices after their release date (or last change).

Illustration
03 · CURVE FITTING

Every knob you turn fits the past a little tighter.

Give a rule enough settings and it can trace almost any history: every bump, every bit of noise. That is curve fitting, also called overfitting. The past looks perfect and the future gets worse.

Drag the slider. The line learns from the black dots only. Watch the error on the past fall while the error on the new data, the hollow dots, climbs.

Fitting a curve to noisy data
2 knobs
Error on the past–
Error on new data–
04 · COSTS

Every trade pays. Fast charts pay most.

Each trade pays a spread and a commission. On a daily chart that is small next to the size of a typical move. On a 2-minute chart the moves are tiny and the cost is the same, so it can eat the whole profit and more.

3 in 10Passing backtests fail once costs are paid
60% → 44%Of backtests make money, before vs after costs
Profit left after costs, typical backtest
Share of the profit before costs that is left after spread and commission, median backtest per bar size. Below zero, costs turn it into a loss.
05 · LUCK

Throw enough darts and some hit.

Test thousands of rules and a few will look great by chance alone. To check, we gave 5,000 backtests a twin: the same market, the same number of trades, the same holding times and costs, but every entry at a random minute. A twin has no rule at all.

4.56%Of random twins pass the screen
3.36%Of the real strategies they copy pass
Illustration: 200 random strategies, no rule at all
Looks like a winnerThe rest
06 · HIDDEN RISK

Closed trades hide the dips.

Many reports count a trade only when it closes. While it is open, the account can be far deeper in the red, and you live through that. Value the open positions too and the real drawdown appears.

1.34×Deeper drop when open trades count (median)
4.7 yrsTypical wait for a new high
Illustration: the same account, measured two ways
Closed trades onlyOpen trades valued
Part 2 · Breaking a backtest

We try to break every backtest before we trust it.

A strategy has to get through four filters, after costs. Then the ones left face the stress tests below. Most never make it this far.

1.4+Gains/loss ratio after costs
100+Trades, enough to judge
33%Largest drawdown at most
0.7+R²: a smooth equity curve
419,486
Backtests
→
 
 
Costs doubledDoes it still pass if trading costs twice as much?
Out of sampleHow much of the edge is left on prices it never saw?
Random twinsDoes it beat the same trades opened at random?
Other marketsDoes the edge show anywhere else?
Bull, bear, sidewaysDoes one kind of market carry all the profit?
Open drawdownHow deep does it really get with open trades valued?
Monte CarloWhat if the same trades came in another order?
Many tests at onceWould this stand out among all the runs by chance?
Part 3 · What the study found

Nine findings from 103,708 backtests, and one from 139 years.

3,591 strategies, unchanged from their sources, run on up to 13 futures markets on 1-minute prices from 2008 to November 2026, with costs on every trade. Every figure is a backtest, not a trading result.

01 · HOW MANY SURVIVE

Most ideas don’t survive testing.

3.15%pass

A gains/loss ratio above 1.4 with 100+ trades, after costs. The stricter screen: 0.74%.

Long only5.6%
Both ways1.8%
Short only0.8%
02 · COSTS

Costs decide more than signals.

29.6%fail

Of the runs that pass before costs, 29.6% no longer pass after. Doubling the cost removes another 15%.

Profitable, before60%
After costs44%
03 · OUT OF SAMPLE

Edges fade.

16%of the edge left

Runs that passed on 2008–2021 went from a ratio of 1.58 to 1.12 on 2022–2026. One in five still passes.

Mean reversion35%
Momentum19%
Pattern19%
Trend following12%
Breakout12%
04 · LUCK

Passing is not proof of skill.

4.56%random pass

Random twins pass more often than the real strategies (3.36%). Long-only twins on stock indices pass 11% of the time: a rising market passes the screen without any signal.

Random twins4.56%
Real strategies3.36%
05 · ACROSS MARKETS

An edge rarely travels.

2.1of 12 other markets

A strategy that passes on its own market passes on 2.1 of the other twelve on average. A quarter pass on none.

Pass on none25%
Pass on 6+6.6%
06 · KINDS OF MARKET

Bull, bear or sideways.

2.03ratio in bear markets

The passing strategies did not lean on bull markets: 1.56 in bull, 2.03 in bear, 1.56 sideways. Still, 16% lose money in bear markets and 24% sideways.

Bull1.56
Bear2.03
Sideways1.56
07 · HIDDEN RISK

The real drawdown is bigger.

1.34×deeper

With open positions valued minute by minute, the largest drop is 1.34 times the closed-trade figure. For 14% it is twice as large or more.

Closed trades1.00×
Open valued1.34×
08 · DIVERSIFICATION

Many small edges, side by side.

0.08correlation

An illustration, not a recommendation. Ten passing strategies in equal parts had a largest drawdown of 1.2 years of their average gain, against 4.2 for one alone. Chosen with hindsight, so a real basket would do worse.

One strategy4.2 yr
Ten together1.2 yr
09 · TWO ENGINES

Different data, different verdict.

23%agree

Of 1,725 runs that pass in ProRealTime, 23% also pass in Python on 18 years of futures prices with fuller costs. On 2- to 5-minute bars, none of 57 does.

Pass in ProRealTime1,725
Also in Python23%
10 · 139 YEARS OF US STOCKS

Avoiding the crash beats catching the top.

−84%Worst drop, buy & hold
−49%Worst drop, 200-day trend rule
−14%In 2008, against −55% for buy & hold
0.4%A year less return than buy & hold
7 of 7Big drawdowns cut by stepping aside
0%-25%-50%-75%190019251950197520002025−84%−49%
Buy & hold200-day trend ruleHow far US stocks fell below their last high, 1886–2025
Part 4 · Five principles

What we take from it, in five lines.

01

Most ideas don’t survive testing.

About 3% pass our filters after costs. Random entries pass as often.

PrincipleTest before you trust.
02

Costs decide more than signals.

Costs erase three in ten passing backtests. Faster timeframes lose even more to them.

PrincipleCount every cost.
03

Avoiding the crash beats catching the top.

Over 139 years, rules that step aside in downtrends cut the worst drops sharply for little lost return.

PrincipleLimit the downside first.
04

No rule wins every era.

Edges mostly fade from one period to the next, and rarely carry over to other markets.

PrincipleExpect an edge to fade.
05

The real drawdown is bigger.

With open trades valued, drops run deeper than closed trades show. Long waits are normal.

PrinciplePlan for the deeper drawdown.
Part 5 · Read it fairly

What this does not show.

These are backtests. They say what fixed rules would have done on past prices, not what anyone earned.
2008 to 2026 was a long rise for stock indices. Long-only results lean on that.
The strategies are public scripts, ported by us. A port can differ from its source.
2022 to 2026 is not fully out of sample for strategies published in those years.
Faster bars have so far been run only on each strategy’s own market.
One contract per trade, in points: later years, with higher prices, weigh more.
Method
  • Prices. 1-minute bars of continuous futures contracts, ratio-adjusted at each roll, January 2008 to 20 November 2026. Bars of every other size are built from them; fills inside a bar are simulated on the 1-minute prices.
  • Costs per round trip, in price points: S&P 500 0.5, Nasdaq 1.0, Dow 3.0, DAX 2.0, FTSE 1.5, Nikkei 10, gold 0.3, silver 0.015, crude oil 0.03, Brent 0.03, EUR/USD 0.0001, GBP/USD 0.00015, USD/JPY 0.02. No overnight fee: a futures price carries the financing.
  • Counting. A run is one strategy on one market and bar size. No two codes are identical once comments, blanks and case are removed. Runs that could not be translated or that broke are left out (7,170 of them).
  • Screens. Gains/loss ratio above 1.4 and at least 100 trades. Stricter: also net gain / open drawdown of 3 or more and R² of the day-end equity (open positions valued) of 0.7 or more. The four filters on this page add a 33% largest drawdown.
  • Out of sample. Trades opened before 1 January 2022 against trades opened from that day on; at least 100 and 30 trades. Edge left = (ratio after − 1) / (ratio before − 1).
  • Twins. 5,000 runs drawn at random; each trade keeps its side, its holding time and its cost, and is opened at a random minute.
  • Many tests. One-sided t-test of the mean trade after costs for every run with 100 trades; Benjamini-Hochberg false discovery rate at 5% (215 runs stand out, 0.31%). Measured by the deflated Sharpe ratio, none of the passing runs stands out.
  • Kinds of market. Close above the 200-day average and the average higher than 20 days earlier = bull; below and lower = bear; otherwise sideways.
  • Baskets. Monthly results from 2010, each strategy scaled to the same variability, equal weights, 2,000 random draws per basket size.
  • 139 years. US stocks 1886–2025: buy & hold against a rule that holds only when the price is above its 200-day average.
Published research we compare with
  • Bailey, Borwein, Lopez de Prado and Zhu (2014). Pseudo-Mathematics and Financial Charlatanism. Notices of the AMS.
  • Bailey and Lopez de Prado (2014). The Deflated Sharpe Ratio. Journal of Portfolio Management.
  • Bajgrowicz and Scaillet (2012). Technical Trading Revisited. Journal of Financial Economics.
  • Chen and Velikov (2023). Zeroing in on the Expected Returns of Anomalies. JFQA.
  • Harvey, Liu and Zhu (2016). …and the Cross-Section of Expected Returns. Review of Financial Studies.
  • Hurst, Ooi and Pedersen (2014). A Century of Evidence on Trend-Following Investing. AQR.
  • McLean and Pontiff (2016). Does Academic Research Destroy Stock Return Predictability? Journal of Finance.
  • Park and Irwin (2005). A Reality Check on Technical Trading Rule Profits in US Futures Markets.
  • Sullivan, Timmermann and White (1999). Data-Snooping, Technical Trading Rule Performance, and the Bootstrap. Journal of Finance.
  • Wiecki, Campbell, Lent and Stauth (2016). All that Glitters Is Not Gold. SSRN.

Everything on this page is backtests on past prices and general information, not personal advice and not a recommendation. Backtests are not live results and do not predict future results. Trading involves risk of loss, and with leveraged products you can lose more than you put in. The tools are yours to run and control; the decision is always yours.