<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[ForwardProof]]></title><description><![CDATA[ForwardProof]]></description><link>https://forwardproof.hashnode.dev</link><generator>RSS for Node</generator><lastBuildDate>Wed, 28 Oct 2026 12:06:13 GMT</lastBuildDate><atom:link href="https://forwardproof.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[How many trades do you need for a backtest to mean anything?]]></title><description><![CDATA[At 20–50 trades a 60% win rate tells you almost nothing.]]></description><link>https://forwardproof.hashnode.dev/how-many-trades-do-you-need-for-a-backtest-to-mean-anything</link><guid isPermaLink="true">https://forwardproof.hashnode.dev/how-many-trades-do-you-need-for-a-backtest-to-mean-anything</guid><category><![CDATA[trading, ]]></category><category><![CDATA[Backtesting]]></category><category><![CDATA[quantitative finance]]></category><category><![CDATA[sample-size]]></category><category><![CDATA[statistics]]></category><category><![CDATA[win-rate]]></category><category><![CDATA[algorithmic trading]]></category><dc:creator><![CDATA[ForwardProof]]></dc:creator><pubDate>Sun, 25 Oct 2026 13:34:09 GMT</pubDate><content:encoded><![CDATA[<p>This article was first published on <a href="https://forwardproof.pages.dev/research/how-many-trades-backtest">ForwardProof</a>. This Hashnode post is a reprint; the canonical version lives on ForwardProof.</p>
<p>We simulated 200,000 backtests per sample size for a strategy with no edge at all, and for one with a real but modest edge. Short answer: at 20–50 trades a 60% win rate tells you almost nothing.</p>
<p><em>Published 25 Oct 2026 · Code and output saved with fixed random seed 20261025 · Simulation, not market data</em></p>
<h2>The short version</h2>
<p><strong>A strategy with zero edge shows a 60%+ win rate in 25.2% of 20-trade backtests, 10.1% of 50-trade backtests, 2.8% at 100 trades, and 0.03% at 300.</strong> And the reverse problem is just as big: a strategy that truly wins 55% of the time shows 50% or worse in 40.9% of 20-trade samples and still 18.3% of 100-trade samples.</p>
<h2>The experiment</h2>
<p>Every simulated trade either wins 1R or loses 1R (same size win and loss), so the win rate is the whole story. We used two strategies:</p>
<ul>
<li><strong>Coin flip:</strong> true win rate 50% — no edge whatsoever.</li>
<li><strong>Real edge:</strong> true win rate 55% — an expected +0.10R per trade before costs, which would be a genuinely good strategy.</li>
</ul>
<p>For each sample size (20, 50, 100, 300 trades) we ran 200,000 backtests of each strategy and counted how often the result looked misleading. We also computed the exact binomial probabilities; they match the simulation to within 0.1 percentage points.</p>
<p><em>(Bar chart on the live page: how often a small sample fools you — no-edge strategy shows ≥60% wins vs real 55% edge shows ≤50% wins, across 20 / 50 / 100 / 300 trades. See the <a href="https://forwardproof.pages.dev/research/how-many-trades-backtest">canonical article</a>.)</em></p>
<table>
<thead>
<tr>
<th align="right">Trades</th>
<th>Coin-flip win rate, middle 90% of backtests</th>
<th align="right">Coin flip shows ≥60% wins</th>
<th align="right">Best of 10 coin flips shows ≥60%</th>
<th align="right">Best of 50 coin flips shows ≥60%</th>
<th align="right">Real 55% edge shows ≤50%</th>
<th align="right">p-value of a 60% win rate</th>
</tr>
</thead>
<tbody><tr>
<td align="right">20</td>
<td>30–70%</td>
<td align="right">25.2%</td>
<td align="right">94.5%</td>
<td align="right">&gt;99.9%</td>
<td align="right">40.9%</td>
<td align="right">0.2517</td>
</tr>
<tr>
<td align="right">50</td>
<td>38–62%</td>
<td align="right">10.1%</td>
<td align="right">65.6%</td>
<td align="right">99.5%</td>
<td align="right">28.3%</td>
<td align="right">0.1013</td>
</tr>
<tr>
<td align="right">100</td>
<td>42–58%</td>
<td align="right">2.8%</td>
<td align="right">25.0%</td>
<td align="right">76.3%</td>
<td align="right">18.3%</td>
<td align="right">0.0284</td>
</tr>
<tr>
<td align="right">300</td>
<td>45–55%</td>
<td align="right">0.03%</td>
<td align="right">0.30%</td>
<td align="right">1.5%</td>
<td align="right">4.7%</td>
<td align="right">0.0003</td>
</tr>
</tbody></table>
<p>"Best of 10/50" = you tried 10 or 50 variations (different settings, filters, timeframes) of a strategy that has no edge, and kept the best one. p-value: one-sided exact binomial test against a 50% win rate.</p>
<h2>What this means in plain English</h2>
<ul>
<li><strong>Under about 100 trades, a 60% win rate is not evidence.</strong> At 20 trades, one in four no-edge strategies gets there by luck. At 50 trades it is still one in ten.</li>
<li><strong>Trying many versions makes it much worse.</strong> Tweak a no-edge idea 10 times on 50 trades each and the best version shows 60%+ wins 65.6% of the time. Most "optimised" backtests are exactly this.</li>
<li><strong>Small samples also hide real edges.</strong> A genuine 55% strategy looks like a loser or break-even in 28.3% of 50-trade samples. Abandoning a strategy after 30 bad trades can be as wrong as trusting one after 30 good ones.</li>
<li><strong>How many trades is enough?</strong> To have an 80% chance of telling a real edge from luck (one-sided test at the 5% level), you need about <strong>158 trades</strong> if the true win rate is 60%, <strong>620</strong> if it is 55%, and <strong>3,886</strong> if it is 52%. The smaller the edge, the more trades you need.</li>
</ul>
<h2>Checklist before you trust a backtest</h2>
<ol>
<li>Count the trades. Fewer than ~100: treat any result as a hypothesis, not a finding.</li>
<li>Count how many variants you tried. Every extra parameter tweak raises the odds that the best one is luck.</li>
<li>Test on data you did not use to build the rules (out-of-sample), and with real spreads and slippage.</li>
<li>Look at expectancy (average R per trade), not just win rate: a 60% win rate with small wins and big losses can still lose money.</li>
</ol>
<h2>Assumptions and limitations</h2>
<ul>
<li>Trades are independent and every win/loss is exactly ±1R. Real strategies have variable wins and losses, and losing streaks can cluster, which usually makes small samples <em>less</em> reliable than shown here.</li>
<li>No trading costs. Costs shift every result down; a 55% win rate at ±1R can turn into a loser once spread and slippage are included.</li>
<li>For strategies with uneven wins and losses, the right check is a t-test or bootstrap on per-trade R (or returns), not a win-rate test. Our <a href="https://forwardproof.pages.dev/sample-checkup">example checkup</a> does exactly that.</li>
<li>"Trades needed" uses an exact binomial test (one-sided, 5% level, 80% power) — a standard but not unique choice.</li>
</ul>
<p>Method: numpy random binomial draws (200,000 per case, seed 20261025) plus exact scipy binomial probabilities. Script and full output are kept on file and available on request.</p>
<h2>Want this check run on your own strategy?</h2>
<p>Send us your rules or your MT4/MT5 trade history. We reply with a plain-English report: sample size vs luck, out-of-sample, what is left after costs, and the worst case. Your strategy stays private unless you opt in.</p>
<ul>
<li><a href="https://forwardproof.pages.dev/checkup">Get a free strategy checkup</a></li>
<li><a href="https://forwardproof.pages.dev/sample-checkup">See a sample report</a></li>
</ul>
<hr />
<p>Research and education only — not investment advice and not a trading signal. Nothing here is a recommendation to use any strategy; any rules discussed were tested to show how backtests mislead, not to suggest trades. Past results do not guarantee future returns. Trading leveraged products such as gold CFDs can lose you more than you deposit. <a href="https://forwardproof.pages.dev/about">Full disclaimer</a> · <a href="https://forwardproof.pages.dev/privacy">Privacy</a> · <a href="https://forwardproof.pages.dev/terms">Terms</a> · <a href="https://x.com/ForwardProof_AI">X @ForwardProof_AI</a></p>
]]></content:encoded></item><item><title><![CDATA[We tested 1,000 random trading rules on gold: how many look great?]]></title><description><![CDATA[Before costs 40 looked significant; after spreads, 4 — none beat holding gold.]]></description><link>https://forwardproof.hashnode.dev/we-tested-1-000-random-trading-rules-on-gold-how-many-look-great</link><guid isPermaLink="true">https://forwardproof.hashnode.dev/we-tested-1-000-random-trading-rules-on-gold-how-many-look-great</guid><category><![CDATA[trading, ]]></category><category><![CDATA[Backtesting]]></category><category><![CDATA[gold]]></category><category><![CDATA[quantitative finance]]></category><category><![CDATA[Overfitting]]></category><category><![CDATA[Xauusd]]></category><category><![CDATA[algorithmic trading]]></category><dc:creator><![CDATA[ForwardProof]]></dc:creator><pubDate>Sun, 25 Oct 2026 13:29:08 GMT</pubDate><content:encoded><![CDATA[<p>This article was first published on <a href="https://forwardproof.pages.dev/research/1000-random-trading-rules-gold">ForwardProof</a>. This Hashnode post is a reprint; the canonical version lives on ForwardProof.</p>
<p>Real hourly XAUUSD prices from 2015 to 2026, real bid/ask spreads, a clean in-sample / out-of-sample split. Before costs, 40 rules looked statistically "significant". After costs, 4 did. None beat simply holding gold.</p>
<p><em>Published 25 Oct 2026 · Data: Dukascopy XAU/USD hourly bid and ask, 2015-01-01 to 2026-10-16 (69,827 bars) · Rules drawn at random with a fixed seed</em></p>
<h2>The short version</h2>
<ul>
<li><strong>Before costs, half the rules made money in-sample (495 of 1,000) — about what chance predicts. After real spreads and slippage, 214 did.</strong></li>
<li><strong>40 rules passed a standard significance test (t ≥ 2) before costs</strong> — if no rule had any edge and the tests were independent, you would expect about 23 by luck. Most were very active rules (median 3,611 position changes in-sample). After costs only 15 of those 40 were still profitable in-sample; their median went from +36.5% to −22.9%.</li>
<li><strong>After costs, just 4 of 1,000 rules were significant in-sample</strong> — all RSI reversal rules with extreme thresholds that were in the market only about 0.5% of the time or less, and made a few percent in total. Out-of-sample, 2 of the 4 stayed positive and 0 stayed significant.</li>
<li><strong>Out-of-sample (2022 to Oct 2026), 350 of 1,000 rules made money after costs; the median rule lost 5.6%. Not one beat buying and holding gold</strong> (+90.5% measured the same way; +127.9% compounded).</li>
<li><strong>No rule was significant after costs in both periods.</strong></li>
</ul>
<h2>The chart</h2>
<p><em>(On the live page: each dot is one rule — its after-cost result in 2015–2021 on the horizontal axis against 2022–2026 on the vertical. Red dots are the busiest rules. See the <a href="https://forwardproof.pages.dev/research/1000-random-trading-rules-gold">canonical article</a> for the interactive/full chart.)</em></p>
<h2>The surprise: in-sample rank did carry over — for the wrong reasons</h2>
<p>The usual overfitting story is "the best backtest collapses out-of-sample". That is not quite what happened here. Ranked by in-sample result, the rules kept much the same order out-of-sample (rank correlation 0.81). Median out-of-sample result by in-sample fifth, worst to best: <strong>−60.6%, −22.1%, −9.1%, 0.0%, +43.1%</strong>. The 20 best in-sample rules had a median of +34.5% in-sample and +59.3% out-of-sample; 18 of 20 stayed positive.</p>
<p>But two boring things explain most of that persistence, and neither is a clever signal:</p>
<ul>
<li><strong>Costs.</strong> Rules that trade a lot lose to the spread in every period. The median rule gave up 19.9 percentage points to costs in-sample; the busiest families gave up far more (table below). A rule that loses to costs in 2015–2021 keeps losing to costs in 2022–2026.</li>
<li><strong>Being long a rising market.</strong> Gold rose in both periods (+54.4% in 2015–2021 and +127.9% in 2022–2026, compounded). Out-of-sample, the rank correlation between a rule's net long exposure and its result was 0.70. The best rules were mostly slow trend-followers (moving-average crossover and breakout rules), many long-only, that simply spent more time long gold. Of the 17 rules that were "significant" out-of-sample, 15 were long-only.</li>
</ul>
<p>Even the single best in-sample rule — a 43/118-hour moving-average crossover, long and short — went +55.3% in-sample (403 position changes, t = 1.52, not significant) and +47.2% out-of-sample, with maximum drawdowns of 29.7 and 26.8 percentage points. Holding gold did better (+90.5% out-of-sample, same arithmetic). Some of it is more than exposure: of the 20 rules that beat an exposure-matched buy-and-hold by the most in 2015–2021 (mostly slow trend rules), 15 also beat it in 2022–2026. That is consistent with gold trending over this decade — but no rule was significant after costs in both periods, and this is one market over one decade.</p>
<h2>By rule family</h2>
<table>
<thead>
<tr>
<th>Family</th>
<th align="right">Rules</th>
<th align="right">Median position changes, 2015–2021</th>
<th align="right">Median cost drag, 2015–2021</th>
<th align="right">Profitable after costs, 2015–2021</th>
<th align="right">Profitable after costs, 2022–2026</th>
</tr>
</thead>
<tbody><tr>
<td>Channel breakout (Donchian)</td>
<td align="right">156</td>
<td align="right">160</td>
<td align="right">4.1 pts</td>
<td align="right">68</td>
<td align="right">88</td>
</tr>
<tr>
<td>Moving-average crossover</td>
<td align="right">132</td>
<td align="right">352</td>
<td align="right">10.2 pts</td>
<td align="right">73</td>
<td align="right">99</td>
</tr>
<tr>
<td>RSI trend</td>
<td align="right">135</td>
<td align="right">752</td>
<td align="right">15.3 pts</td>
<td align="right">1</td>
<td align="right">14</td>
</tr>
<tr>
<td>Momentum (price vs N bars ago)</td>
<td align="right">137</td>
<td align="right">1,067</td>
<td align="right">31.9 pts</td>
<td align="right">28</td>
<td align="right">75</td>
</tr>
<tr>
<td>RSI reversal</td>
<td align="right">161</td>
<td align="right">1,268</td>
<td align="right">24.6 pts</td>
<td align="right">44</td>
<td align="right">50</td>
</tr>
<tr>
<td>Bollinger-band reversal</td>
<td align="right">149</td>
<td align="right">2,130</td>
<td align="right">41.1 pts</td>
<td align="right">0</td>
<td align="right">15</td>
</tr>
<tr>
<td>Time-of-day (hold during set hours)</td>
<td align="right">130</td>
<td align="right">3,612</td>
<td align="right">66.6 pts</td>
<td align="right">0</td>
<td align="right">9</td>
</tr>
</tbody></table>
<p>Cost drag = before-cost result minus after-cost result, in percentage points of summed return.</p>
<h2>What to take from this</h2>
<ul>
<li><strong>Most "great" backtests are made before costs.</strong> Most of the rules that looked significant on a frictionless test were busy rules that costs then wiped out.</li>
<li><strong>If you test many rules, some will pass a significance test by luck.</strong> 1,000 tests at t ≥ 2 should produce around 23 "discoveries" even with no edge anywhere.</li>
<li><strong>A good out-of-sample result is not proof of skill</strong> if the strategy was simply long a market that went up. Always compare with holding the market and with the same average exposure.</li>
<li><strong>Ask what the rule is really betting on</strong> — trend, time of day, mean reversion — and whether that would survive a different market regime.</li>
</ul>
<h2>Method, assumptions and limitations</h2>
<ul>
<li><strong>Data:</strong> Dukascopy XAU/USD 1-hour bid and ask bars, 2015-01-01 to 2026-10-16, 69,827 bars. In-sample: 2015–2021. Out-of-sample: 1 Jan 2022 to 2026-10-16.</li>
<li><strong>Rules:</strong> 1,000 distinct rules drawn at random (fixed seed) from seven families: moving-average crossovers (fast 2–60, slow up to 300 bars), RSI reversal and RSI trend (period 2–30, thresholds 10–40 / 60–90), Bollinger-band reversal (10–100 bars, 1–3 standard deviations), Donchian breakouts (10–300 bars), momentum (3–500 bars) and time-of-day holds (1–8 hours). Each rule was long/short, long-only or short-only at random. Nothing was optimised.</li>
<li><strong>Execution:</strong> signals on the bar close (mid price), position taken at the next bar's open — no look-ahead. One unit, no leverage, no compounding; results are the sum of hourly % returns, the same convention as our <a href="https://forwardproof.pages.dev/sample-checkup">example checkup</a>. Buy-and-hold is shown both the same way (sum of hourly %) and compounded.</li>
<li><strong>Costs:</strong> each change in position pays half the real bid/ask spread at that bar's open (median half-spread $0.17/oz) plus $0.10/oz slippage — the same as buying at the ask and selling at the bid. No commission. <strong>Overnight financing (swap) is not included</strong>; on most gold CFD accounts it would further reduce rules that hold positions for days or weeks.</li>
<li><strong>Significance:</strong> one-sample t-test on daily summed returns (t ≥ 2 ≈ one-sided p &lt; 0.025). No multiple-testing correction is applied in the counts — which is the point of the exercise. Rules in the same family are correlated, so the "~23 by luck" figure is only a rough guide.</li>
<li><strong>Scope:</strong> one market, one timeframe, one split, during a decade in which gold rose strongly. Different markets, periods or rule families could give different results. This is research, not a recommendation of any rule.</li>
</ul>
<p>The script, the full per-rule results and the summary output are kept on file and available on request.</p>
<h2>Want this check run on your own strategy?</h2>
<p>Send us your rules or your MT4/MT5 trade history. We reply with a plain-English report: sample size vs luck, out-of-sample, what is left after costs, and the worst case. Your strategy stays private unless you opt in.</p>
<ul>
<li><a href="https://forwardproof.pages.dev/checkup">Get a free strategy checkup</a></li>
<li><a href="https://forwardproof.pages.dev/sample-checkup">See a sample report</a></li>
</ul>
<hr />
<p>Research and education only — not investment advice and not a trading signal. Nothing here is a recommendation to use any strategy; any rules discussed were tested to show how backtests mislead, not to suggest trades. Past results do not guarantee future returns. Trading leveraged products such as gold CFDs can lose you more than you deposit. <a href="https://forwardproof.pages.dev/about">Full disclaimer</a> · <a href="https://forwardproof.pages.dev/privacy">Privacy</a> · <a href="https://forwardproof.pages.dev/terms">Terms</a> · <a href="https://x.com/ForwardProof_AI">X @ForwardProof_AI</a></p>
]]></content:encoded></item></channel></rss>