|
| 1 | +--- |
| 2 | +id: psr-gate-baseline-adrs |
| 3 | +source: tradingview-session |
| 4 | +status: active |
| 5 | +captured: 2026-04-27 |
| 6 | +tags: [backtesting, statistics, adr, multiple-testing, deflated-sharpe] |
| 7 | +tested_in: [tradingview] |
| 8 | +incorporated_in: ['3.4.1'] |
| 9 | +--- |
| 10 | + |
| 11 | +# Aplicar PSR(benchmark) > 0.95 como gate antes de declarar baseline en cualquier ADR |
| 12 | + |
| 13 | +## Observation |
| 14 | + |
| 15 | +In the `tradingview` repo, an ADR (2026-04-23) declared "Dual Momentum |
| 16 | +SPY/QQQ/BIL 12m" as the official baseline of the passive-US sleeve based on |
| 17 | +walk-forward OOS Sharpe 1.08 vs QQQ B&H 1.04 (delta = +0.04) and Calmar 2.78 |
| 18 | +vs 1.66. |
| 19 | + |
| 20 | +A look-ahead bug was later found in `app/swing.py::run_dual_momentum_pair`. |
| 21 | +After fixing it, the OOS metrics deflated to Sharpe 1.06 vs 1.04. The |
| 22 | +backtest in-sample (22y) was unaffected. |
| 23 | + |
| 24 | +We then implemented the **Probabilistic Sharpe Ratio** (Bailey & López de |
| 25 | +Prado 2012) and computed `PSR(benchmark = QQQ B&H)` for all 9 strategies |
| 26 | +tested in the repo: |
| 27 | + |
| 28 | +| Strategy | SR_y | PSR(QQQ) | |
| 29 | +|---------------------|-------|----------| |
| 30 | +| Dual Mom 12m (best) | 0.89 | **0.70** | |
| 31 | +| RMA top-3 | 0.75 | 0.48 | |
| 32 | +| Vol target QQQ | 0.72 | 0.42 | |
| 33 | +| QQQ + SMA200 | 0.70 | 0.38 | |
| 34 | + |
| 35 | +**Not a single strategy** in the repo passed `PSR(QQQ) > 0.95`. The "best" |
| 36 | +strategy gave us a 70% probability of having a true Sharpe > QQQ — meaning |
| 37 | +30% probability of being worse than B&H. That's not a baseline; that's a |
| 38 | +coin-flip with extra steps. |
| 39 | + |
| 40 | +## Lesson |
| 41 | + |
| 42 | +Sharpe-ratio deltas of +0.02 to +0.04 (typical "the strategy beats benchmark" |
| 43 | +deltas in retail backtests) are **statistically indistinguishable from noise** |
| 44 | +when n is in the order of thousands of daily observations. The naked eye sees |
| 45 | +a ranking; the math sees a wash. |
| 46 | + |
| 47 | +A baseline ADR is a strong claim — it commits the project to operate the |
| 48 | +strategy with discipline, write rebalancing code, monitor it. Making that |
| 49 | +commitment based on a 70% confidence is bad epistemics. |
| 50 | + |
| 51 | +## Suggested action |
| 52 | + |
| 53 | +Add to the project rule (template-level, applicable to any backtesting |
| 54 | +project): |
| 55 | + |
| 56 | +> Before any ADR declares a strategy "baseline" or "winner" over another |
| 57 | +> strategy, compute `PSR(benchmark)` per Bailey & López de Prado 2012: |
| 58 | +> |
| 59 | +> 1. PSR(benchmark) = Pr(true Sharpe > Sharpe of benchmark) |
| 60 | +> 2. Threshold: PSR(benchmark) > 0.95 to claim significance |
| 61 | +> 3. If PSR < 0.95, the ADR may still document the strategy as an |
| 62 | +> alternative, but cannot call it a "baseline" or claim it "supersedes" |
| 63 | +> another option |
| 64 | +> |
| 65 | +> When testing > 5 strategies in the same project, also report DSR (Deflated |
| 66 | +> Sharpe Ratio) using the empirical variance across the trial Sharpe ratios. |
| 67 | +> DSR > 0.95 is the harder gate when multiple-testing is a concern. |
| 68 | +> |
| 69 | +> Implementation reference: `app/metrics.py` (stdlib-only, no scipy needed |
| 70 | +> via `statistics.NormalDist`). |
| 71 | +
|
| 72 | +## Implementation cost |
| 73 | + |
| 74 | +- Math is ~50 lines (PSR + expected_max_sharpe + DSR), stdlib-only. |
| 75 | +- Tests: ~150 lines covering reference values, monotonicity, edge cases. |
| 76 | +- One report script that takes the strategy equity curves and produces a |
| 77 | + table. |
| 78 | + |
| 79 | +Total: ~3 hours for any new repo. Lifetime savings: avoiding multi-month |
| 80 | +commitments to baselines that were never significant to begin with. |
| 81 | + |
| 82 | +## Generalization |
| 83 | + |
| 84 | +This is a research-quality rule applicable to any quant trading repo, but |
| 85 | +the deeper principle generalizes: |
| 86 | + |
| 87 | +> When ranking N options based on a noisy metric, compute the probability |
| 88 | +> that the top-ranked option is genuinely better than alternatives. If that |
| 89 | +> probability < threshold, the ranking is decoration — don't anchor decisions |
| 90 | +> on it. |
| 91 | +
|
| 92 | +References: |
| 93 | +- Bailey, D. H. & López de Prado, M. (2012). *The Sharpe Ratio Efficient Frontier.* |
| 94 | +- Bailey, D. H. & López de Prado, M. (2014). *The Deflated Sharpe Ratio: |
| 95 | + Correcting for Selection Bias, Backtest Overfitting and Non-Normality.* |
| 96 | +- Lo, A. (2002). *The Statistics of Sharpe Ratios.* |
0 commit comments