How TradingPal Backtests
If you've ever looked at a smooth equity curve and thought, “Okay, but what did you leave out?”—good.
Anyone can say a chart pattern “works.” Backtesting is how you check: write the rule precisely, replay it over years of prices, and keep every simulated trade—winners and losers alike. Here's the beginner version, the sneaky ways a test can lie, and where TradingPal's nightly pattern records fit into the larger methodology.
Backtesting is replaying a precise trading rule over 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 qualifying pennant the detector found in the supported history, “buys” at each eligible 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 historical track record for an idea. Before risking a real dollar, you can see how the rule behaved across thousands of past market situations, including the ugly ones.
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 has to keep the losers. A pattern working in your memory might be three lucky charts; a rule applied across thousands of counted trades has at least faced a much harder exam. That still does not guarantee the future, but it is more useful than a highlight reel.
Counting is boring, and boring is the point. It replaces “do I believe this?” with a better question: “What happened when we applied the same rule every time?”
A useful rule-based backtest usually follows the same four moves:
Entry, safety exit, and target must be precise enough for a computer to follow consistently. “Buy strong-looking breakouts” isn't testable; “after prior-bar establishment, buy when price reaches the confirmed trigger beyond the upper boundary” is. If a human has to redraw the rule after every outcome, the result cannot be reproduced.
For every simulated decision and fill, the test walks through old prices one bar at a time and uses only information available then. Standing on a Tuesday in 2019, it knows nothing about Wednesday. Later confirmation can still affect which patterns qualify for the published group, so that separate limitation is disclosed below.
Every time the rule fires, the trade gets logged: entry price, exit price, result. Winners and losers alike — no deleting the embarrassing ones.
Qualifying resolved setups produce edge statistics such as win rate, average R, and profit factor. A constrained subset the simulated account could actually hold produces return and drawdown. The track-record metrics guide explains what each means and which numbers belong together.
A backtest is only as honest as its builder. These are the three traps to look for before trusting a beautiful equity curve:
One strong defense against curve fitting is to split the history before you tune the rule. The first pile — the “in-sample” data — is the practice set you may study. The second — the “out-of-sample” data — is the exam: years and stocks the finished rule did not see while it was being designed.
A fitted rule often looks best on the practice set because that is where it was designed. The useful question is how much of the result remains on the locked-away data. The edge may hold up, weaken, change shape, or disappear. Less degradation is stronger evidence that the rule learned something repeatable, but no single split proves a real edge by itself.
TradingPal uses held-out tests when a filter, gate, or policy choice is being tuned under a frozen research protocol. A candidate earns its keep on one slice of history, then has to hold up on symbols or years it was not tuned on. A good in-sample score is not enough. The complete methodology explains which parts use held-out validation, which use walk-forward ranking, and which limitations still remain.
One honest limit: out-of-sample data is still the past. Passing the exam isn't a promise about next year—the future is the one set of prices nobody can hold out in advance. It is simply stronger evidence than an in-sample score from the same history used to tune the rule.
After the market closes, the pattern pipeline scans 500+ stocks and refreshes the stored results the product serves. Here is how one simulated pattern trade works; for portfolio caps, 25-run medians, cost scenarios, and live drift checks, continue to How TradingPal backtests.
After the pattern existed on a prior bar, an entry can fill at the confirmed trigger—the boundary plus its close-confirm threshold. When a stock gaps through that trigger overnight, the simulation uses the worse opening price instead, because the planned trigger price was no longer available.
Every trade carries a declared safety exit (the “stop-loss”) beyond the relevant recent swing—a dip for a long or a peak for a short—and every simulated trade follows its mechanical exit rule. Targets come from the pattern's own height (the “measured move”); some upward breakouts can keep riding above the 10-day average after reaching that target because that rule was declared in advance.
One limitation matters: the published pattern group contains shapes that ultimately passed the detector's checks after the first crossing. The first eligible fill uses only information available then, but the published group is not proof that every pattern was already known to be confirmed at its first tick. The result is tens of thousands of simulated trades, winners and losers included, summarized in the latest completed stored result.
This table comes from the latest completed nightly result — each pattern's win rate, its average return in R, and the number of simulated trades behind the row. The article renders the stored result immediately instead of starting a new calculation.
| Pattern | Usual break | Win rate | Avg return | Backtested trades | Fresh (45d) |
|---|---|---|---|---|---|
| Bullish Pennant | Up | 55.2% | +0.58R | 13,034 | 74 |
| Bearish Pennant | Down | 44.1% | +0.15R | 11,004 | 51 |
| Ascending Triangle | Up | 55.2% | +0.58R | 13,034 | 14 |
| Descending Triangle | Down | 44.1% | +0.15R | 11,004 | 4 |
| Symmetrical Triangle | Either way | 55.2% | +0.58R | 13,034 | 95 |
| Falling Wedge | Up | 53.9% | +0.38R | 13,048 | 83 |
| Rising Wedge | Down | 49.3% | +0.13R | 14,154 | 56 |
Historical results of a simulated strategy, refreshed nightly. Triangle rows show their usual break direction's family; each guide breaks out both directions.
The key outputs from the latest completed stored result flow into the app. The screener's left rail carries the track-record panel—the real component below—summarizing the current family's win rate, the cumulative return and CAGR of a capital-constrained account trading it, its drawdown, and profit factor. Qualifying setup tiles and the copilot can also show the relevant historical context.
That's the point of doing all this counting: not a research paper hidden in a folder, but historical context beside a qualifying setup when you're deciding what to study next.
Not a screenshot — this is the real panel from the screener, populated from the latest completed stored nightly result.
The past isn't a promise. Markets change, and a rule that thrived in one era can fade in the next. A long test and a held-out exam make the evidence stronger; they do not turn it into a forecast.
Real fills can also differ from simulated ones, and today's supported stock universe does not include every company that disappeared from history. The honest way to hold all of this in your head: a backtest tells you what happened under stated rules and assumptions. It does not tell you what the next trade will do.
If you've ever looked at a smooth equity curve and thought, “Okay, but what did you leave out?”—good.
No single number tells you whether a strategy is good.
Before experienced traders ask “will this trade win?”, they ask a better question: “if it wins, how much could it make — and if it loses, how much is planned at risk?” That comparison is the risk/reward ratio.
A falling wedge looks weak at first—the price is still sliding—but each push down is losing ground.
Educational content, not investment advice. Backtest statistics are historical results of a simulated strategy. Publication timing varies by record; the numbers describe the past, not the next trade.