Contents

Introduction
Trading signals are sold with someone else's numbers attached: “Sharpe 2.1, +340% a year, 82% of trades profitable.” You have no way to check them, and the price of a mistake is the whole deposit. Here is how to recompute any signal yourself: we take four popular rules, run them over 30 years of S&P 500 history, sweep 460 parameter variants, compare the results against a thousand random sets of entry dates, and then transfer the rules to the Russian market at realistic costs.
Every number below is computed on real price data and can be reproduced: an Excel workbook with live formulas is attached to the article, so you can plug in your own instrument and recompute everything from scratch.
Method: what exactly we compute
Verifying a signal starts with turning it into a rule, not with a chart. “Buy when RSI(2) is below 10, sell on EMA(2)” is testable. “Buy on pullbacks” is not. If a rule cannot be written unambiguously, it cannot be computed, and therefore cannot be verified.
The calculation convention matters next. We evaluate the signal on the close of a bar and enter at the close of the next bar. That way the move on a day when the signal was not yet visible never enters the return. Shifting the timing by one bar in the other direction inflates the result by dozens of percent — on our data that is exactly what the first RSI(2) calculation looked like: +93% instead of +4.4%.
Costs are charged per round trip: 0.05% for a liquid ETF (spread, slippage, commission), 0.30% for the Russian market. No leverage, long positions only.
The metrics we judge a signal by:
Metric | Formula | Red flag |
|---|---|---|
Expectancy | win rate × average win − loss rate × average loss | below round-trip costs — the signal cannot be traded |
Profit factor | total profit ÷ total loss | below 1.2 with 30 or more trades |
Sharpe | mean daily return ÷ standard deviation × √252 | drops below 1 after adjusting for the number of tried variants |
Number of trades | entry counter | fewer than 30 — the estimates mean nothing |
Drawdown | from the equity peak to the lowest point after it | deeper than your risk budget |
p-value vs random entries | share of random entry sets that did at least as well | above 0.2 — the signal is indistinguishable from luck |
Rank on the unseen segment | where the chosen parameter lands among all out-of-sample variants | around the middle — the choice was random |
Data: daily bars of SPY (an S&P 500 ETF) from January 2, 1996 to November 20, 2026 — 7,774 bars, adjusted for dividends (source: Yahoo Finance). For the transfer test: SBER.ME, daily bars from November 21, 2011 to May 24, 2022.
What four classic rules showed
The rules are not random picks: these are the ones most often sold as a “working strategy.” We have covered Bollinger Bands and MACD and the modified relative strength index separately — now we compute them ourselves, with no borrowed promises. We split history in half: 1996–2017 is the development segment (in-sample), 2018–2026 is the segment the rules never see (out-of-sample). Default parameters, no tuning.
Rule | Sharpe IS | Total IS | Sharpe OOS | Total OOS | Trades OOS | Expectancy |
|---|---|---|---|---|---|---|
RSI(2) < 10, exit EMA(2) | 0.18 | +31.5% | 0.10 | +4.4% | 117 | 0.058% |
Bollinger(20, 2), exit at the middle | 0.33 | +105.8% | 0.39 | +48.2% | 40 | 1.062% |
SMA(50)/SMA(200), golden cross | 0.71 | +536.4% | 0.55 | +94.9% | 5 | 16.041% |
MACD(12, 26, 9) | 0.10 | +10.0% | 0.58 | +66.2% | 100 | 0.579% |
Buy and hold (baseline) | 0.53 | +537.7% | 0.73 | +192.9% | 1 | — |
Three conclusions from the table.
First: on the unseen segment of 2018–2026, plain “buy the index and do nothing” returned +192.9% and beat all four rules. Any strategy that loses to the market in a rising stretch only pays for its own risk; it creates no edge.
Second: RSI(2) has an expectancy of 0.058% per trade against round-trip costs of 0.05%. The signal clears the threshold by 0.008 percentage points. That is not a margin of safety, that is a coincidence.
Third: the golden cross shows 16% expectancy per trade — and 5 trades in nine years. The median holding period here is over a year. That is not statistics, it is a handful of observations with a huge variance; a sample like that can support any claim you like.
Parameter search: how many variants are really there
A single parameter set proves nothing. A signal seller tried dozens until a pretty chart showed up. We sweep the same families in full and watch what happens to the “best” variant once it is carried over to the unseen segment.
Family | Variants | Best on IS | Its Sharpe on OOS | Rank on OOS | Median across all | If you knew the future |
|---|---|---|---|---|---|---|
RSI(2): threshold 2–40, exit EMA 2–10 | 80 | threshold 28, EMA 5 | 0.42 | 19 of 80 | 0.33 | 0.52 |
SMA: fast 10–100, slow 100–300 | 209 | 15 and 180 | 0.56 | 104 of 209 | 0.56 | 0.85 |
Bollinger: window 10–40, width 1.5–3.0 | 96 | 12 and 1.5 | 0.23 | 69 of 96 | 0.31 | 0.51 |
MACD: 5×5×3 combinations | 75 | 12/34/12 | 0.51 | 57 of 75 | 0.54 | 0.67 |
The numbers in the “Rank” column are the main result of the experiment. The best in-sample SMA(15/180) cross lands 104th out of 209 on the unseen segment — exactly the middle of the sample. The best in-sample Bollinger lands 69th out of 96, that is, below the median. Picking the “prettiest” parameter on the past produces a result on par with a random variant from the same grid.
The last column is what someone who peeked at the future would get by choosing the parameter on out-of-sample results. The gap between 0.56 and 0.85 for SMA is the price of peeking. That gap is exactly what signal sellers pass off as a “discovered pattern.”
Rank destruction: 10 rolling windows
One split is one example. We test on ten rolling windows: 5 years to develop, the next 2 years to validate, 2-year step. Each time we pick the best parameter on the in-sample again and look at its rank out-of-sample.
The median rank of the “best in-sample” variant on the unseen segment is 74 out of 209, that is the 35th percentile of the sample. It made the top 10 in only one window out of ten. Breakdown by window:
Window | Best on IS | Sharpe on OOS | Rank of 209 | Median in window |
|---|---|---|---|---|
IS 1996–2000 → OOS 2000-12…2003-01 | 15 and 140, Sharpe 0.94 | −1.03 | 194 | −0.24 |
IS 1996-09…2001-09 → OOS 2001-09…2003-09 | 15 and 140, Sharpe 0.76 | 0.14 | 158 | 0.41 |
IS 1998-10…2003-10 → OOS 2003-10…2005-10 | 50 and 240, Sharpe 0.54 | 0.51 | 47 | 0.19 |
IS 2001-08…2006-08 → OOS 2006-08…2008-08 | 50 and 240, Sharpe 0.87 | −0.15 | 59 | −0.33 |
IS 2002-04…2007-04 → OOS 2007-04…2009-04 | 50 and 240, Sharpe 0.86 | 0.00 | 2 | 0.00 |
The first window is telling. Parameters that looked best of all over the five rising years of 1996–2000 (Sharpe 0.94) delivered a Sharpe of −1.03 over the next two years of the crash and landed 194th out of 209 — worse than almost every variant that had been discarded.
This is the mechanism of the trap: the longer and luckier the historical stretch you tuned on, the stronger the overfitting to it.
Test against random entries
The strictest and simplest question you can ask a signal: how is your entry better than a random one? The method: take the same instrument, the same number of trades, the same holding periods — but random entry dates. Run it a thousand times and see where the rule's result sits in that distribution.
Rule | Trades | Total | Sharpe | p (by total) | p (by Sharpe) | 95th percentile of random |
|---|---|---|---|---|---|---|
MACD(12, 26, 9) | 331 | +82.9% | 0.23 | 0.850 | 0.840 | 0.56 |
RSI(2) < 10, exit EMA(2) | 397 | +37.3% | 0.16 | 0.307 | 0.388 | 0.38 |
Bollinger(20, 2) | 144 | +205.0% | 0.35 | 0.028 | 0.215 | 0.48 |
SMA(50)/SMA(200) | 5 | +1149.9% | 0.65 | 0.024 | 0.049 | 0.65 |
MACD: p-value 0.84 by Sharpe. The rule's result sits inside the distribution of random entries — it cannot be told apart from random timing. RSI(2): p-value 0.39 — also indistinguishable.
The golden cross showed a Sharpe of 0.65 — which is exactly the 95th percentile of random entry sets with the same number of trades. Five trades in thirty years produce the same statistics as a lucky pick of random dates.
On Bollinger specifically: the p-value is 0.028 by total return but 0.215 by Sharpe. The gap comes from the total being heavily driven by the two luckiest trades, while Sharpe is spread more evenly. The lesson: looking only at “% return” is useless — look at Sharpe and at the trade count next to it.
Adjusting for the number of tried variants
There is one more layer of statistics that almost nobody applies. Bailey, Borwein, López de Prado and Salehipour, in “Backtest overfitting in financial markets”, derive a rule: with 5 years of daily data you cannot try more than 45 strategy variants — otherwise the best result comes out by chance, and a Sharpe ≥ 1 appears with a probability that cannot be told apart from luck.
We tried from 75 to 209 variants on 22 years of data. So the adjustment is mandatory. We covered the same mechanism from the other side in the financial process, when choosing between a RAG pipeline and fine-tuning a model: there, overfitting looks like a model trained on a single set of documents. We apply the Probabilistic Sharpe Ratio (PSR) — the probability that the true Sharpe is positive, accounting for skew and kurtosis of returns — and the Deflated Sharpe Ratio (DSR), where the benchmark is not zero but the expected best result out of N tried variants.
Rule | Sharpe | PSR vs zero | Variants N | SR* best of N | DSR | Verdict |
|---|---|---|---|---|---|---|
RSI(2) < 10 | 0.10 | 0.6155 | 80 | 0.29 | 0.2846 | not significant |
Bollinger(20, 2) | 0.39 | 0.8761 | 96 | 0.29 | 0.6121 | not significant |
SMA(50)/SMA(200) | 0.55 | 0.9456 | 209 | 0.22 | 0.8290 | borderline |
MACD(12, 26, 9) | 0.58 | 0.9571 | 75 | 0.09 | 0.9250 | borderline |
For MACD and the golden cross, PSR against zero is high — “the rule earns better than zero.” But the permutation test says MACD cannot be told apart from random entries. Both statements are true and they answer different questions: PSR asks “better than the zero benchmark,” the permutation asks “better than random timing.” In a rising market random entries also make money, so for testing someone else's signal it is exactly the permutation that you need. This difference never appears in marketing brochures.
And one more adjustment that has to be applied honestly: if there is a single signal and no parameters were swept, there is no multiple testing. If you tested 200 variants and picked the best, DSR is mandatory. A signal seller is always in the second situation.
Costs and transfer to a harder market
The same RSI(2), the same logic, but on SBER.ME and with costs of 0.30% per round trip instead of 0.05%. On the difference between position size and trade size in lots, see how to size a lot correctly in futures trading.
Rule | Total IS | Total OOS | Trades | Expectancy | Threshold (0.30%) |
|---|---|---|---|---|---|
RSI(2) < 10, exit EMA(2) | −25.9% | −33.6% | 64 | −0.461% | does not pay |
Bollinger(20, 2) | −48.1% | −50.8% | 17 | −3.242% | does not pay |
SMA(50)/SMA(200) | +136.3% | +25.1% | 3 | 10.229% | 3 trades — not statistics |
MACD(12, 26, 9) | −6.5% | +62.1% | 35 | 1.692% | pays |
RSI(2) produced 0.058% per trade on a US ETF and minus 0.461% on a Russian stock. A sixfold difference, and the whole thing is broken by the difference in costs: 5 basis points against 30. The threshold is simple: expectancy per trade has to be above round-trip costs. Not above zero — above costs.
MACD did work on SBER.ME: +62.1% on the unseen segment with an expectancy of 1.692%. But by the dates it is a coincidence with the 2020–2021 rally, and 35 trades in ten years is still a small sample. The transfer worked in one case out of four. Transferability is a separate property of a signal, and it does not follow from the beauty of a chart.
The same signal in different regimes
The last test is market regimes. Same rules, same parameters, same costs, but each computed on its own stretch of history. Annualised return:
Rule | 1996–2000 | 2000–2003 | 2003–2007 | 2007–2009 | 2009–2018 | 2018–2022 | 2023–2026 |
|---|---|---|---|---|---|---|---|
RSI(2) < 10 | +5.7% | −2.6% | +1.3% | −6.8% | +1.3% | −4.5% | +8.4% |
Bollinger(20, 2) | +9.9% | −2.4% | +5.1% | −24.6% | +7.5% | +3.4% | +7.2% |
SMA(50)/SMA(200) | +16.7% | +0.4% | +11.3% | −4.4% | +8.6% | +5.2% | +12.4% |
MACD(12, 26, 9) | +4.5% | −6.9% | −0.2% | −21.5% | +4.5% | +7.9% | +3.4% |
Buy and hold | +25.4% | −9.3% | +12.8% | −43.0% | +16.5% | +9.2% | +19.2% |
In the 2007–2009 crisis Bollinger returned −24.6% a year, MACD −21.5%, RSI(2) −6.8%. In 2018–2022 RSI(2) returned −4.5% a year while MACD returned +7.9%: the same rules, opposite signs. Not one of the four rules worked in every regime.
The practical conclusion: any strategy has to be tested on the stretch where it loses. If your strategy was positive in 2008 or in 2022, it most likely simply matched a rising market and has nothing to do with your idea. If it was negative and it still stayed in the market by the rules, it has a chance of being real.
Testing algorithm: 7 steps
Rewrite the signal as a rule. No “roughly”, no “something like”, no “by eye”. If two people mark different bars from the same description, the signal is untestable. This applies to the material on this site as well: we have trading advisors and market forecasts from traders — and both deserve to be checked against this list.
Fix the costs. Spread, commission, slippage. For a liquid ETF — 0.05% per round trip, for the Russian market — 0.30%. A signal that does not survive the costs cannot be traded at all.
Cut off the out-of-sample before you start. The last 20–30% of history is not touched until the final check. Fix the cut date before the first calculation, not after.
Compute expectancy, not the percentage of winning trades. Plus profit factor, Sharpe, drawdown, exposure and the number of trades. Fewer than 30 trades on a segment — the estimates mean nothing.
Compare against random entries. Same instrument, same number of trades, random dates, 1000 runs. If the rule sits inside the distribution of random results, there is no edge.
Test another market and another regime. Run the same code on a neighbouring instrument and on a stretch where the strategy loses.
Account for the number of variants you tried. On 5 years of daily data — no more than 45 variants. We tried 75–209 on 22 years, so DSR is mandatory.
All seven steps are repeated in the attached Excel file: plug in your own instrument, your own signal and your own costs — and you get the same metrics as in the article.
Upload the file: signal-check-calculator.xlsx
Excel calculator
Every calculation in the article runs on live formulas: 7,774 daily SPY bars, trade logs for four rules, a 460-variant parameter sweep, 1,000 random entry sets, PSR and DSR tables. Plug in your own instrument and your own costs — the metrics recompute themselves.
Download signal-check-calculator.xlsx — 425 KBEvery calculation in the article runs on live formulas: 7,774 daily SPY bars, trade logs for four rules, a 460-variant parameter sweep, 1,000 random entry sets, PSR and DSR tables. Plug in your own instrument and your own costs — the metrics recompute themselves.
How this differs from what already exists
There is plenty written about “how to test a strategy”, and most of it is checklists without arithmetic. Here is what is already out there and how this review differs.
Source | What it has | What it lacks |
|---|---|---|
kvants.ai | A disciplined 10-step checklist: hypothesis, frozen specification, data audit, out-of-sample, stress tests, paper trading. | Not a single computed example and not one number: methodology without arithmetic. |
TradingView “Outofsample” | The indicator compares a signal with random entries on the same instrument and timeframe — the closest analogue to our method. | The calculation is left to the user; there is no parameter transfer and no breakdown by regime. |
Finam broker | Out-of-sample, walk-forward, testing across markets — to the point and without filler. | Words only: how many variants to sweep, where the threshold is, what to do when it fails — none of that is shown. |
backtester.run | An efficiency criterion: OOS Sharpe ÷ IS Sharpe; below 0.3 is a strong sign of overfitting. | One criterion instead of a set; parameter sweeps are not shown. |
Bailey et al. | The academic base: PBO, DSR, minimum backtest length, the “no more than 45 variants in 5 years” rule. | Theory without an applied calculation on concrete rules and without costs. |
What is here on top of that: one end-to-end calculation over 30 years of quotes with four classic rules; a sweep of 460 parameter variants with the rank of the “best” one on the unseen segment; 1,000 random entry sets for each rule; an adjustment for the number of trials through DSR; a breakdown across seven market regimes; a transfer to a Russian instrument at 30 basis points of costs; and a file where all of it recomputes by formula on your own data.
We state the limits: the SPY sample is one instrument and one market, and the SBER.ME period ends in May 2022 because of a gap in the data. We are not claiming these rules are useless — we show how you can check that claim, and we checked it ourselves.
Common mistakes when testing
Mistake 1: testing on one segment and one regime. Our Bollinger returned +9.9% a year over 1996–2000 and minus 24.6% a year over 2007–2009 with the same parameters. A signal tested only on a rising market is not a signal, it is a coincidence with the rise.
Mistake 2: looking at win rate instead of expectancy. The golden cross delivers 60% winning trades — that sounds convincing. Its expectancy is 16% per trade, and there are 5 trades in nine years. The percentage of winners says nothing when the sample is tiny and average wins and losses differ several times over. Compare that with our review of the straddle strategy and strangle strategy: there the rule is written unambiguously, so it can be verified.
Mistake 3: forgetting costs, or charging them on entry only. At 5 basis points RSI(2) barely clears the threshold; at 30 basis points the same strategy on the Russian market returns −0.461% per trade. The threshold is simple: expectancy has to be above round-trip costs, not above zero.
Short conclusion
A signal is verified not by a chart but by three numbers: expectancy after costs, the p-value against random entries, and the rank of the parameter on the unseen segment. On our data RSI(2) cannot be told apart from random entries (p = 0.39), MACD cannot either (p = 0.84), the golden cross landed exactly at the 95th percentile of random results, and not one of the four rules beat simply buying the index over 2018–2026. Before you pay for a signal, compute it yourself — on the file attached to this article.
Comments and reviews 0
Reader perspectives and experience.
Leave a comment or review
Messages are moderated and appear after approval and site publication.
Cancel reply


No comments yet. You can start the discussion.