You’re early —

What Is Backtesting in Trading? Plain English — Plus Exactly How Ours Works

Anyone can claim a chart pattern “works.” Backtesting is how you check: write the rule down precisely, replay it over years of real price history, and count every trade it would have taken — winners and losers alike. Here's how it works, the sneaky ways a backtest can lie, and exactly how TradingPal runs its own every night.

Live backtest numbers on this page updated Jul 2, 2026.

What is backtesting?

Backtesting is replaying a trading rule over years of past prices and counting what would have happened. You take an idea — say, “buy when a stock breaks out of a bull pennant, sell at the target or the safety exit” — turn it into exact instructions, and walk it through history one day at a time, recording every trade it would have made.

A plain example: apply that pennant rule to ten years of daily prices for 500 stocks. The computer finds every pennant that ever formed, “buys” at each breakout, “sells” wherever the rules say, and writes each result down. At the end you have a pile of simulated trades: how many won, how many lost, and how big each result was.

The output isn't a prediction — it's a track record for an idea. Before risking a real dollar, you know how the rule has behaved across thousands of real market situations, including the ugly ones.

Why backtesting beats opinions

Human memory is a terrible statistician. You remember the spectacular chart where a pattern nailed the move, and quietly forget the four charts where it fizzled. Every trading forum is full of patterns that “work” — in someone's memory.

A backtest can't cherry-pick. A pattern working in your memory might be three lucky charts; a pattern working in a backtest is 13,000 counted trades, losers included. When the count says a rule made money, that claim survived every crash, boring stretch, and bad year in the data — not just the highlights someone chose to remember.

Counting is boring, and boring is the point. It replaces the question “do I believe this?” with a better one: “what happened when we tried it 13,000 times?”

How a backtest works, step by step

Every honest backtest — ours included — is the same four moves:

1.Define the exact rule

Entry, safety exit, and target must be precise enough for a computer to follow with zero judgment calls. “Buy strong-looking breakouts” isn't testable; “buy when the price crosses the pattern's upper line” is. If a human has to squint and decide, it can't be tested.

2.Replay history bar by bar

The test walks forward through the old prices one bar at a time, and at each moment it may only use information that existed right then. Standing on a Tuesday in 2019, it knows nothing about Wednesday. This one discipline separates a real backtest from a fantasy.

3.Record every simulated trade

Every time the rule fires, the trade gets logged: entry price, exit price, result. Winners and losers alike — no deleting the embarrassing ones.

4.Summarize the pile

Thousands of logged trades get boiled down to a few honest statistics: win rate, average return in R, profit factor. We explain how to read those three in a separate guide — they're the language of every table on this site.

The mistakes that make backtests lie: look-ahead bias and friends

A backtest is only as honest as its builder, and three classic mistakes make bad backtests look brilliant. The worst is look-ahead bias: accidentally letting the test peek at tomorrow's prices. A test that “buys at the day's low” is cheating — nobody knows a price was the day's low until the day is over. Let the test peek even slightly and its results become fiction.

The second is survivorship bias: testing only the stocks that survived. Run a strategy on today's biggest 500 companies and you're only grading it on companies that did well enough to still be around — the ones that collapsed, the very stocks that would have wrecked the strategy, have been quietly removed from the exam.

The third is curve fitting (also called “overfitting”): tuning the rules until they fit the past perfectly — and nothing else. Add enough conditions and any decade can be “predicted” in hindsight. A rule with fourteen carefully tweaked exceptions hasn't learned how markets work; it has memorized one specific history that will never repeat exactly.

How TradingPal backtests

Every night after the market closes, we re-run the full test: every pattern our screener knows, across 500+ stocks, over years of daily prices. Here is exactly how each simulated trade works, because the details are where the honesty lives.

Entries fill at the pattern's line — the price you could actually have set an order at in advance. When a stock gapped past the line overnight, the simulated buy happens at that day's opening price instead, because that's the first price anyone could realistically have gotten. Never a price you couldn't have had.

Every trade carries a safety exit (the “stop-loss”) at the last small dip before the breakout, and every simulated trade obeys it — there is no “holding and hoping” in our data. Targets come from the pattern's own height (the “measured move”), and for upward breakouts the test keeps riding while the price holds above its 10-day average even after the target hits, because that rule tested better than selling immediately.

The result is tens of thousands of simulated trades, refreshed after every scan.

The results, live

This is the live output of that nightly run — each pattern's win rate, its average return in R, and the number of simulated trades behind the row. It updates after every scan, so the table you're reading reflects the most recent test, not a screenshot from one lucky month.

PatternUsual breakWin rateAvg returnBacktested tradesFresh (45d)
Bull PennantUp55.2%+0.58R13,03480
Bear PennantDown44.1%+0.15R11,00452
Ascending TriangleUp55.2%+0.58R13,03414
Descending TriangleDown44.1%+0.15R11,0046
Symmetrical TriangleEither way55.2%+0.58R13,03499
Falling WedgeUp53.9%+0.38R13,04884
Rising WedgeDown49.3%+0.13R14,15456

Historical results of a simulated strategy, refreshed nightly. Triangle rows show their usual break direction's family; each guide breaks out both directions.

Where the backtest shows up in TradingPal

Everything the nightly test produces flows straight into the app. The screener's left rail carries the track-record panel — the live component below — summarizing the current family's win rate, average R, and profit factor. Each setup tile wears its stock's own win-rate badge from the same test, and the copilot's plain-English read of a live pattern quotes its historical follow-through rate.

That's the point of doing all this counting: not a research paper, but numbers standing next to every chart at the moment you're deciding what to do about it.

TradingPal screener · track record panel

Not a screenshot — this is the live panel from the screener, showing the current all-patterns backtest. It refreshes after every nightly scan.

What a backtest can't promise

The past isn't a promise. Markets change, and a rule that thrived in one era can fade in the next — which is one reason we re-run the test every night instead of framing an old report on the wall.

Real-life fills can also differ slightly from simulated ones: prices move fast at a breakout, and a real order might fill a few cents away from the tested price. The honest way to hold all of this in your head: a backtest tells you the odds so far. It doesn't tell you the future — it just makes sure you're never betting against the count.

What Is Backtesting?: FAQ

What is backtesting in trading?
Replaying a precise trading rule over years of historical prices and counting every trade it would have made — wins, losses, and sizes. It turns “this pattern works” from an opinion into a measured track record.
What is look-ahead bias in backtesting?
Letting the test use information that didn't exist yet at the moment of the simulated trade — like buying at a day's low, which nobody could have known was the low until the day ended. It quietly inflates results and is the most common way backtests lie.
How many trades does a backtest need?
Dozens is noise — a lucky streak can print any number. Hundreds of trades per pattern start to mean something. TradingPal's nightly test aggregates tens of thousands of simulated trades across its patterns.
Does backtesting guarantee future results?
No. A backtest measures how a rule behaved in the past; markets change, and the future can differ. It tells you the odds so far — which beats guessing — but it's a track record, not a promise.
How often are TradingPal's backtest numbers updated?
Every night, after the scan that re-draws patterns across 500+ stocks. Every statistic on the site reflects the latest run.

Educational content, not investment advice. Backtest statistics are historical results of a simulated strategy, refreshed nightly — they describe the past, not the next trade.

Go Premium