The short version. Post #22 ended with a question I couldn't answer from the six fill-policy runs: policy C's gain came mostly from seven losing signals it never took — was that the policy, or luck? The placebo is the test. Same script, same exits (2×ATR stop + trailing stop), same 4,089 bars, same $10,000, same 0.1% fee — only the entry changes: 20 seeded random draws, 60 entry bars each, the same count as the RSI's 60 crossover signals. In our testing:
- Random entries: +$1,418.01 mean, +$191.22 median, 10 of 20 positive. Range −$2,317.01 to +$12,154.14.
- The RSI entry (+$937.45) sits at the 55th percentile of that distribution — 0.14 standard deviations from the mean, inside both the IQR and the 1-SD band. The clock entry from #19 (+$706.11) sits at the same 55th percentile.
- The fee doesn't rescue the entry either. Without the fee, the RSI (+$2,530.24) sits at the 65th percentile of the no-fee placebo distribution, 0.26 SD from its mean — still inside both bands.
The entry earns nothing you can distinguish from a dice roll. The exits do the work — and even they only look profitable because a few giant winners carry twenty draws. If you came here for the RSI crossover, I'm sorry: it was never doing the work.
The contract: one question, chosen before I looked
Kamal's question, from #20's comments and sharpened in #22: is the edge in the entry, or in the exits? The placebo answers it the only honest way — replace the entry with noise and see what survives. If the RSI entry has an edge, the RSI run should sit outside the random distribution: above its top, or at least outside its IQR and 1-SD band. If it sits in the middle, the entry is decoration.
The rules, fixed before I ran anything:
- Same number of signals. The RSI script fires 60 crossover signals on this data (counted from the RSI column of the baseline run, including signals that fire while a trade is open). Each placebo seed draws 60 candidate bars — no more, no fewer.
- Same everything else. Exits (2×ATR stop from the entry average price, trailing stop at highest close minus 2×ATR), 100% of equity, market orders, policy A drop, 0.1% round-trip fee, 4,089 bars of CSI 300 daily, $10,000 starting equity, patched PyneCore runtime.
- 20 seeds, not 50. Kamal asked whether 20 or 50; he hasn't answered, so 20 is my decision, stated here, not his. Seeds 1–20, Python's
randommodule,random.Random(seed),random.sample(range(100, 4089), 60), sorted. Anyone can reproduce every bar. - Bars 100–4,088 only. The RSI/ATR warm-up needs roughly the first 100 bars, so placebo candidates start at bar 100. One asymmetry, stated plainly: 6 of the RSI's 60 signals fall before bar 100 (bars 22, 78, 80, 86, 89, 92). The placebo's 60 are all ≥ 100. Probe 2 checks whether that flatters the RSI — it doesn't change the verdict.
The placebo script is the #22 policy-A script with one change — the entry line:
var int[] entries = array.from(108, 137, 191, 204, 216, ...) longSignal = array.includes(entries, bar_index) Everything else is byte-identical, including the if longSignal and not inTrade guard — so a random bar that fires while a trade is open is ignored, exactly the way an RSI signal is ignored while a trade is open. The compiled Python, verbatim from the local compiler (node bin/pine2pyne.mjs, zero diagnostics on all 40 runs — 20 fee, 20 no-fee):
entries: Persistent[float] = [108, 137, 191, 204, 216, 218, 225, ...] longSignal: Series[float] = array.includes(entries, bar_index) A backtest result is a claim about a rule. The placebo is what happens when the rule is noise. If your rule can't beat noise, it isn't a rule — it's a story about noise.
Probe 1: the distribution — twenty dice rolls
Closed trades only (exit Signal != 'Open'), the convention #18–#22 used. Two runs per seed: fee on (0.1% round trip) and fee off.
| Seed | Closed (fee) | Net, fee | PF, fee | Wins | Net, no fee | PF, no fee |
|---|---|---|---|---|---|---|
| 1 | 47 | +$4,031.00 | 1.671 | 18 / 47 | +$4,686.43 | 1.773 |
| 2 | 52 | +$518.86 | 1.080 | 20 / 52 | +$711.79 | 1.111 |
| 3 | 45 | +$1,634.78 | 1.183 | 14 / 45 | +$2,095.72 | 1.243 |
| 4 | 53 | +$6,672.96 | 1.762 | 17 / 53 | +$7,640.32 | 1.886 |
| 5 | 44 | +$939.60 | 1.173 | 15 / 44 | +$1,071.41 | 1.195 |
| 6 | 47 | −$1,108.83 | 0.837 | 15 / 47 | −$796.68 | 0.880 |
| 7 | 45 | −$1,336.93 | 0.792 | 20 / 45 | −$999.51 | 0.840 |
| 8 | 47 | −$624.01 | 0.890 | 15 / 47 | −$327.89 | 0.944 |
| 9 | 48 | −$318.91 | 0.952 | 16 / 48 | +$96.70 | 1.015 |
| 10 | 46 | +$3,967.96 | 1.442 | 15 / 46 | +$4,132.24 | 1.460 |
| 11 | 44 | −$832.77 | 0.859 | 14 / 44 | −$508.50 | 0.911 |
| 12 | 48 | −$2,317.01 | 0.631 | 12 / 48 | −$2,080.89 | 0.661 |
| 13 | 46 | +$3,766.11 | 1.494 | 16 / 46 | +$4,226.18 | 1.576 |
| 14 | 51 | +$2,446.75 | 1.283 | 18 / 51 | +$3,157.11 | 1.379 |
| 15 | 50 | −$136.43 | 0.984 | 15 / 50 | +$211.77 | 1.026 |
| 16 | 45 | −$2,103.54 | 0.695 | 13 / 45 | −$785.15 | 0.898 |
| 17 | 49 | −$1,308.48 | 0.834 | 15 / 49 | −$1,144.71 | 0.854 |
| 18 | 50 | −$867.05 | 0.891 | 15 / 50 | −$836.44 | 0.897 |
| 19 | 48 | +$3,182.00 | 1.295 | 17 / 48 | +$3,660.57 | 1.347 |
| 20 | 45 | +$12,154.14 | 2.167 | 20 / 45 | +$9,796.74 | 2.106 |
| Mean | 47.5 | +$1,418.01 | 1.146 | 33.7% | +$1,700.36 | 1.200 |
| Median | 47.5 | +$191.22 | 1.032 | — | +$461.78 | 1.069 |
| RSI baseline | 47 | +$937.45 | 1.117 | 38.3% | +$2,530.24 | 1.302 |
Three things to notice before the verdict.
First, the trade counts match. Same 60 signals in, mean 47.6 entries fired (range 44–53), mean 12.4 skipped because a trade was already open — against the RSI's 48 entries and 12 skipped. Mean closed trades 47.5 vs the RSI's 47, a difference of half a trade. The "same signals, different trade counts" worry from the design doesn't bite: the counts line up on average, and where they differ per seed (44 to 53), the table shows it rather than hiding it.
Second, the distribution is wide and skewed. Fee-on: standard deviation $3,514.09 — 2.5× the mean. Minimum −$2,317.01, maximum +$12,154.14, a $14,471.15 range from the same exits with different dice. Ten seeds positive, ten negative; ten seeds beat PF 1.0, ten don't. The median random entry roughly breaks even (+$191.22). The mean (+$1,418.01) is pulled up by one seed: seed 20 alone is 42.9% of the summed net of all twenty seeds, and 63.6× the median. Drop seed 20 and the mean falls to +$852.95, the median to −$136.43 — the typical random entry loses a little.
Third, the fee is a small, honest tax — except once. Across the twenty seeds, removing the fee adds a median of +$330.85 (mean ex-seed-20: +$421.28), and 19 of 20 seeds improve. The exception is seed 20, where the fee version nets $2,357.40 more than the no-fee version. That is not a fee being generous. That is the fee, through the equity path, changing which trades exist — the #22 mechanism, wearing a new costume. Probe 4 is the autopsy.
Probe 2: where the RSI and the clock sit
The verdict bands, both of them, from the fee-on placebo distribution:
| Placebo distribution | RSI (+$937.45) | Clock (+$706.11) | |
|---|---|---|---|
| Percentile | — | 55th (11 / 20 seeds below) | 55th (11 / 20 below) |
| Distance from mean | mean $1,418.01, SD $3,514.09 | −0.14 SD | −0.20 SD |
| Inside IQR? | −$927.49 … +$3,328.03 | yes | yes |
| Inside 1-SD band? | −$2,096.08 … +$4,932.10 | yes | yes |
Nine of twenty random seeds beat the RSI entry on net profit. Nine beat the clock entry too. The RSI's PF (1.117) is beaten by 9 of 20 random seeds; its win rate (38.3%) by only 3 of 20 — the RSI does win more often, and it doesn't matter, because the money lives in a few big winners, not in the win rate (Probe 5).
Two robustness checks, because a verdict this flat deserves them:
- Drop the outlier. Without seed 20, the fee distribution's mean is +$852.95, SD $2,508.83, median −$136.43. The RSI sits at the 57th percentile, +0.03 SD from the mean — even closer to dead center.
- Credit the RSI its warm-up trades. The 6 pre-100 signals the placebo couldn't draw produced the RSI's first two trades, both losers (−$77.57 and −$517.59). Give the RSI that $595.16 back, before knock-on effects, and its net is ~+$1,532.61: 60th percentile, +0.03 SD. Still in the middle. The window asymmetry doesn't save the entry.
The standard error of the placebo mean is $785.80 ($3,514.09 / √20), so the mean itself is only 1.8 SE from zero — I can't even claim the average random entry makes money. The honest summary of this distribution is: random entries on these exits produce anything from −$2,317 to +$12,154, and the RSI's +$937 is an ordinary draw from it.
Probe 3: the fee doesn't move the verdict
Same test, no fee. The no-fee placebo distribution: mean +$1,700.36, SD $3,177.63, median +$461.78, Q1 −$788.03, Q3 +$3,778.49, IQR $4,566.52, range −$2,080.89 to +$9,796.74. Twelve of twenty seeds positive.
| Placebo, no fee | RSI, no fee (+$2,530.24) | |
|---|---|---|
| Percentile | — | 65th (13 / 20 seeds below) |
| Distance from mean | mean $1,700.36, SD $3,177.63 | +0.26 SD |
| Inside IQR? | −$788.03 … +$3,778.49 | yes |
| Inside 1-SD band? | −$1,477.27 … +$4,877.99 | yes |
Seven of twenty random seeds beat the RSI without the fee; seven beat its PF of 1.302. The RSI moves from the 55th to the 65th percentile when the fee comes off — a shift of two seeds — and stays inside both bands. The fee changes the numbers; it doesn't change the answer. That is what a control is for, and this one held: #22's warning was that fee-on-only comparisons measure the fee's shadow. Here, both worlds agree.
Probe 4: seed 20 — the fee that made $2,357.40
The one seed where the fee helps: fee-on +$12,154.14 (45 closed, PF 2.167) vs no-fee +$9,796.74 (44 closed, PF 2.106). A $2,357.40 gap, in the wrong direction, from a 0.1% fee. The mechanism is #22's drop, one quantity boundary away:
- Signal bar 1261 (close 3,892.57), fill bar 1262 (open 3,923.08).
- Fee run: equity at the signal $15,485.30. 100% of equity at the signal close sizes 3 contracts ($15,485.30 / 3,892.57 = 3.98 → 3). Three at the fill open cost $11,769.24. It fits. The trade exists: entry 1262, exit 1293 on the trail, +$1,780.55.
- No-fee run: equity at the signal $15,617.34 — $132.04 higher, because it never paid the fee. 100% of equity sizes 4 contracts ($15,617.34 / 3,892.57 = 4.01 → 4). Four at the fill open cost $15,692.32. Equity is $15,617.34. Short $74.98. Policy A drops the order, silently. The trade never exists.
The fee version's extra $2,357.40 is that trade (+$1,780.55) plus quantity knock-ons on six later trades, where the fee run held one more contract than the no-fee run (5 vs 4 at entries 1399, 1786, 1851, 2447 and 3579; 4 vs 3 at 2662 — same entries, same exits, because the equity paths had diverged). The fee didn't make the strategy better. It made the account $132 poorer at exactly the bar where one more contract was the difference between fitting and not fitting — and the poorer sizing fit, while the richer sizing didn't.
This is the same lesson as #22, sharper: under the drop policy, being richer can cost you a trade. The quantity is an integer, the fill is judged at the fill price, and the boundary between 3 and 4 contracts is $132 of equity. Anyone who reports a backtest without stating the fill policy is reporting one draw from this lottery.
Probe 5: what the exits do alone
Strip the entry out and the system keeps its shape. Across the twenty fee seeds:
| Placebo mean | RSI baseline | |
|---|---|---|
| Avg hold | 15.74 bars | 16.15 bars |
| Win rate | 33.7% | 38.3% |
| Trail / stop exit mix | 65.4% trail | 59.6% trail (28 / 47) |
| Top-5 winners' share of gross profit | 67.9% | 67.6% |
| Seeds surviving their biggest winner (net − biggest > 0) | 5 / 20 | no (−$936.86) |
| Median net − biggest winner | −$1,224.87 | −$936.86 |
The exits produce the same animal regardless of what triggers them: ~16-bar holds, one-third wins, two-thirds of the gross profit in the top five trades, a headline that usually doesn't survive its biggest winner. The RSI's numbers sit inside that shape on every row. The entry doesn't change the system; it only picks which lottery tickets the system holds — and on this sample, the RSI picked an average ticket.
Note what the placebo mean being positive does not mean. It is not evidence that "random entries work." The mean is +$1,418.01 with a standard error of $785.80, and it is carried by one seed. The median random entry makes +$191.22. The system with random entries is a breakeven machine with a fat right tail — the trail lets a few trades run a long way on a market that rose across 2010–2026, and everything else pays for it. That is a description of the exits, not an edge, and it is the same description the RSI run has always had.
How I checked the numbers
Seed 1, three trades, by hand against the trade file and the raw feed — the method, so anyone can repeat it:
- Trade 1 (entry bar 109, exit 116, stop): signal bar 108 is in seed 1's candidate list; entry price 2,739.03 equals the feed open of bar 109; exit price 2,617.62 equals the resting stop set at bar 115's close (entry average 2,739.03 − 2×ATR 60.71), breached intrabar on bar 116 (low 2,591.69); profit −$372.25 recomputed from the two prices, 3 contracts, and 0.05% per side — exact to the cent.
- Trade 2 (entry 138, exit 158, trail): entry price equals the feed open of bar 138; recomputing the trailing level from closes and Wilder ATR(14), the first close below the trail falls on bar 157 — exit bar minus one, exactly as a close-triggered exit filling at the next open should; profit −$49.59, exact.
- Trade 3 (entry 192, exit 207, trail): same checks, trigger bar 206, profit −$182.91, exact.
Across seed 1, all 47 entries trace to candidate bars (signal bar = entry bar − 1), all 47 fill prices equal the feed open of the entry bar, and 13 of the 60 candidates were skipped because a trade was already open (bars 204, 218, 225, 518, 1037, 1661, 1893, 1941, 2130, 2768, 3222, 3228, 3386). One adjacent pair (2129, 2130): 2129 fired, 2130 was ignored because 2129's trade had just opened — the same pattern in seed 20's three adjacent pairs (2446/2447, 3805/3806, 3808/3809). Random bars landing inside a trade are ignored, as designed, and recorded here rather than smoothed over.
What I couldn't verify
- One market, one script, one exit pair. CSI 300 daily, one RSI mean-reversion script, one stop-and-trail exit. A trend-following exit or a different market could give the entry something to do — the placebo only clears this entry on these exits.
- 20 seeds, not 50. Twenty draws pin the RSI to the middle of the distribution, but the tails are thin: the 55th percentile of 20 seeds is a coarse estimate. Fifty seeds would tighten it; the verdict (inside both bands) would need a large move to change.
- Uniform random bars are not a realistic null. Real entries cluster — RSI signals cluster on selloff days. The placebo draws uniformly, so it doesn't test "entry timing within selloffs" — only "entry timing, period." A clustered placebo (random bars drawn only from down days) is a sharper null and isn't run yet.
- The exits are untested as an edge. The placebo says the entry adds nothing given these exits. It doesn't say the exits have an edge — the mean random entry is 1.8 standard errors from zero, and the median one breaks even.
- One fee level, one sizing rule. All fee-on runs carry the same 0.1% round trip and 100%-of-equity sizing. The seed-20 quantity-boundary drop is a property of that sizing rule; a fixed fractional size would move the boundary.
Bottom line
The RSI entry is worth nothing you can measure. Twenty random replacements, same exits, same data: the RSI's +$937.45 lands at the 55th percentile, 0.14 standard deviations from the random mean — and without the fee it lands at the 65th, 0.26 SD. Nine random seeds beat it with the fee on; seven beat it without. The entry that this whole series was built around — crossover through 30, the mean-reversion trigger — is, on this evidence, a random-number generator with a story attached.
What survives is the exit pair: a 2×ATR stop and a trailing stop turn any entry — RSI, clock, dice — into the same animal, ~16-bar holds, one-third wins, two-thirds of the money in five trades. That shape is real, in our testing, and it is the only thing in this series that has survived every test thrown at it. The next question is whether the shape itself is an edge or a property of a rising market with a fat tail — and that question needs a second market, because one market can't answer it.
Next post (#24): the second market — same script, same exits, new data. If the shape holds there, it's the exits. If it doesn't, it was the market all along.
Disclosure: I built Pine2Py (pine2py.com), the Pine Script → Python converter this series runs on. The strategy in this post is a test script, not a recommendation; nothing here is investment advice, and past backtest results don't predict anything. Free accounts get 3 conversions total; Pro is $12/month via Paddle. The runs above used the patched PyneCore runtime build provided on the site (stock PyPI PyneCore is not supported). All numbers are from local runs on 2026-11-29, in our testing: 1,909 real-world scripts compile at 99.7% and fully translate at 98.4%.
