BtcDailyDoubleTopBottomReversalLS
Hypotheses
BTC Single-Asset Double-Top/Bottom (M-W) Pattern Reversal Long-Short on BINANCE Daily (Edwards-Magee 1948 Two-Peak Structural Reversal, Event-Driven)
Hypotheses
Single-asset Double-Top / Double-Bottom 'M and W' pattern strategy on BTCUSDT.BINANCE — detects two non-consecutive peaks (or troughs) at similar levels with an intervening valley (or rally) between them, followed by failure to break the level on the second test. Classic 'M' shape for top reversal, 'W' shape for bottom reversal. Mechanism: (1) For each bar, scan the last 30 bars for 'peaks' (local highs strictly higher than 3 bars before and 3 bars after) and 'troughs'. (2) BEARISH DOUBLE-TOP TRIGGER: identify the 2 most recent peaks within last 30 bars; check if max(peak_highs) - min(peak_highs) <= double_top_tolerance × min(peak_highs) (default 2.0%, peaks clustered) AND peaks separated by >= min_bar_spacing (default 4 bars) AND there's a clear trough between peaks at least valley_depth_pct (default 3%) below the peaks AND current bar tests the peak cluster level (high reaches within 0.5%) AND closes BELOW the trough's high level. (3) BULLISH DOUBLE-BOTTOM TRIGGER: mirror logic with 2 troughs at similar lows, intervening peak, and current bar testing low then closing above the peak between them (decisive 'neckline' break). (4) FLAT otherwise. This implements Edwards-Magee's 1948 'Technical Analysis of Stock Trends' Double-Top/Double-Bottom — one of the most common reversal patterns. Bulkowski 2005 'Encyclopedia of Chart Patterns' statistical study reports ~55-60% follow-through. Distinct from my 17 in-pipeline event-driven BTC patterns. Triple-Top (in pipeline) requires 3 peaks; Double-Top requires only 2 — MORE FREQUENT signals but lower hit-rate. Distinct from Tweezer (2 CONSECUTIVE bars matching) because Double-Top requires non-consecutive peaks with a valley between. Distinct from Pivot Bounce (formula levels) because Double-Top uses EMERGENT historical peaks. The mechanism is FUNDAMENTALLY EVENT-DRIVEN AND TRANSLATION-ROBUST: peak detection and level matching are scale-invariant. Single-asset scope = no multi-asset translation curse. Helps direction quota (90.6% long-only).
Hypotheses
The analyst's backtest-review verdict was a targeted density pass, not a redesign: 29 trades / 6.5 years is below the walk-forward floor and the PF 1.52 / Sharpe 0.93 was an outlier mirage carried by 1-2 fat-tail days (kurtosis 27.7). Because every tolerance is already parameterized, the minimal fix is exactly the analyst's prescription applied to both the config dict (runtime source of truth) and the in-code defaults: double_top_tolerance 0.02->0.03, valley_depth_pct 0.03->0.02, fractal_k 3->2, scan_lookback 30->40. This admits more valid daily M/W structures (shallower necklines, more confirmed swings, wider scan) to push total_trades comfortably above ~62, while explicitly NOT translating to 4H (which the analyst warns turns double-tops into noise and changes the mechanism). Detection, trigger, sizing, and exit logic are byte-for-byte unchanged, so Layers 1-3 that already passed stay green; venue stays BTCUSDT.BINANCE futures because the strategy is genuinely long-short. This is the one density pass the analyst granted before the abandon/optimize re-evaluation gate.
Hypotheses
Failed deflated Sharpe and an overfit walk-forward; the passing holdout is a spurious holdout-luck artifact. DSR=0.0005 (vs 0.95) with the optimized Sharpe 2.70 far below the 225-trial expected-max luck bar of 7.08 (is_significant=false, sharpe_ci_low -0.29 through 0), PBO=0.630, walk-forward is_overfitted=true (avg IS 5.92 -> avg OOS 1.06; OOS windows [1.22, 0.0, 1.96], one dead), and sensitivity FAILED with 2 cliffs on the pattern-defining parameters (min_bar_spacing, double_top_tolerance). The holdout ratio 3.125 does NOT rescue it: a passing holdout combined with PBO>0.5, an is_overfitted walk-forward, and DSR~0 is the family's recurring holdout-luck signature (one favorable untouched window against a 5.9-IS/1.06-OOS overfit backbone). This confirms the pre-optimization warning exactly: the 57-trade base (below the ~62 floor) with P&L concentrated in 2022 gave the optimizer no real sample, so best-of-225 selection thinned the book to 15 trades and fit noise. FAILURE PATTERN: a rare event-driven chart-pattern reversal (Edwards-Magee double-top/bottom) on BTC daily has too few trades to optimize — the base is market-neutral and non-degenerate but modest, and best-of-225 selection produces a thinned 15-trade config whose selected Sharpe sits far below the luck bar (DSR 0.0005) with cliffs on the structure params and an overfit walk-forward, while a lucky single holdout window masks the failure. Not iterable (no robust region; cliffs on core pattern knobs; already thinned to 15 trades), not revisable (no proven double-top sibling — not a mechanism stranded on a dead target). PSR=0.979 / DSR=0.0005 is the diagnostic tell.
Implementation
Single-asset Double-Top/Double-Bottom (M/W) reversal, long-short, on BTCUSDT.BINANCE DAILY bars. Detects two clustered confirmed swing peaks (or troughs) with a qualifying intervening valley (or rally), and triggers SELL on a fresh close below the double-top neckline / BUY on a fresh close above the double-bottom neckline. calculate_signal returns a continuous signed close-vs-neckline score; exits on stop-loss, take-profit, or a 10-bar timeout. Iteration 2 loosens the four pattern tolerances (per analyst prescription) to raise daily trade count above the ~62 walk-forward floor while keeping the daily-chart-pattern mechanism intact.
Backtest Review
Genuinely market-neutral and differentiated: beta -0.002, benchmark_correlation -0.03, 30 short / 27 long — a real long-short reversal book, rare in a 90%-long portfolio
Backtest Review
Non-degenerate edge signature: profit_factor 1.24 (>1.2 guideline), balanced long/short win rates, positive skew 1.4, low max_drawdown 8.9%, positive alpha
Backtest Review
Trades implement the hypothesis (double-bottom longs, double-top shorts), event-driven and scale-invariant on a safe instrument
Backtest Review
Return concentrated in one regime: essentially all P&L is 2022 (+11.9%); 2023-2026 are flat-to-negligible and 2021 is -7.8% — high risk the edge fails holdout/deflated Sharpe as regime-dependent
Backtest Review
Marginal sample: 57 trades sits just below the ~62 walk-forward floor; splitting into 3 IS/OOS windows leaves each under-powered and prone to noise-fitting
Backtest Review
Not yet significant: sharpe_ci_low -0.83 (CI through 0), Sharpe 0.55, CAGR only 1.22%
Backtest Review
Assessed for optimization-worthiness, not promotion thresholds
Backtest Review
marginal
Analysis
Genuinely market-neutral (beta -0.002, benchmark_correlation -0.07), a real long-short reversal book
Analysis
Base run was non-degenerate (57 trades, PF 1.24, low max_drawdown 8.9%)
Analysis
Holdout point-value looked strong (ratio 3.125) — but see weaknesses: it is a spurious holdout-luck artifact
Analysis
Failed deflated Sharpe catastrophically: DSR=0.0005 (vs 0.95), optimized Sharpe 2.70 FAR below the 225-trial expected-max luck bar of 7.08 (is_significant=false); PSR 0.979 / DSR 0.0005 is the selection-inflation tell
Analysis
Walk-forward is_overfitted=true: avg IS 5.92 -> avg OOS 1.06 (5.6x collapse), OOS windows [1.22, 0.0, 1.96] with one dead window
Analysis
PBO 0.630 (>0.5): parameter selection more likely than not overfit
Analysis
Sensitivity FAILED: 2 cliffs on the pattern-defining params (min_bar_spacing, double_top_tolerance)
Analysis
sharpe_ci_low -0.29 (CI through 0)
Analysis
Optimizer thinned the book to 15 trades (3.68% exposure) — confirms the pre-opt low-sample/2022-concentration risk; the strong holdout is holdout-luck, not edge (PBO>0.5 + is_overfitted + DSR~0)
Analysis
spurious holdout-luck given PBO>0.5 + overfit WF + DSR~0
Analysis
thinned from 57 — low-sample
Analysis
Do NOT optimize -- 29 trades over 6.5 years is far below the ~62-trade walk-forward floor; a 3-window split leaves ~3 trades per OOS window and the optimizer would fit noise. The decent-looking PF 1.52 / Sharpe 0.93 is an OUTLIER MIRAGE: return_kurtosis 27.7, skew 3.33, tail_ratio 0.686, and only 2022 (+3.6%) and 2026 (+4.6%) are positive -- both carried by 1-2 fat-tail days (2026-06-19 +3.95%, 2022-11-09 +2.81%); the other 5 years are flat-to-negative and win_rate 0.48 is below the 55-60% follow-through the hypothesis cites. RAISE TRADE COUNT toward ~60+ while KEEPING the daily-chart-pattern character (do NOT translate to 4H -- 4H 'double tops' are noise and change the mechanism). Loosen the pattern tolerances: double_top_tolerance 0.02 -> 0.03 (admit slightly less-clustered peaks), valley_depth_pct 0.03 -> 0.02 (shallower necklines), fractal_k 3 -> 2 (more confirmed swings), and/or scan_lookback 30 -> 40. Re-backtest and resubmit once total_trades is comfortably above the ~62 floor. CRITICAL re-evaluation gate after densification: check whether the edge survives WITHOUT the fat-tail outliers -- if the densified version still shows kurtosis >> 10, most years flat, and a 0-straddling Sharpe CI, that confirms the double-top/bottom signal has no consistent edge on single-asset BTC daily and should be ABANDONED rather than optimized. Give it this one density pass; the pattern is event-driven and functioning, but the current evidence is a couple of lucky days, not a validated reversal edge.
Outcome Summary
This strategy implemented the classic Edwards-Magee double-top/double-bottom reversal as a market-neutral long-short book on BTC daily bars, and its initial backtest looked respectable and differentiated: 57 balanced long/short trades, profit factor 1.24, beta near zero, and a low 8.9% drawdown, earning an 'optimize' verdict at backtest review despite a trade count just under the ~62 floor and P&L concentrated in 2022. Optimization then exposed the fragility the reviewer had flagged — the parameter search thinned the book to 15 trades, the walk-forward collapsed from 5.92 in-sample to 1.06 out-of-sample Sharpe with one dead window, PBO hit 0.63, and the selected Sharpe of 2.70 fell far short of the 7.08 luck bar (deflated Sharpe 0.0005). The analyst read the single passing holdout as holdout-luck rather than edge and abandoned the strategy after two iterations. The takeaway: a genuinely neutral but rare pattern simply did not trade often enough to survive optimization, and the promotion/paper/live stages were never reached.
Outcome Summary
A rare event-driven chart-pattern reversal that generates only ~57 trades sits below the ~62 walk-forward floor, so best-of-many optimization has no real sample to work with and merely fits noise — such low-frequency patterns need far more signals (or a coarser regime scope) before optimization is meaningful.
Outcome Summary
The post-optimization analyst voted abandon: it failed the deflated-Sharpe test (0.0005 vs 0.95, optimized Sharpe 2.70 far below the 225-trial expected-max luck bar of 7.08), the walk-forward was overfit (avg IS 5.92 -> avg OOS 1.06 with one dead OOS window), PBO was 0.63, and sensitivity failed with 2 cliffs on the pattern-defining parameters (min_bar_spacing, double_top_tolerance); the passing holdout (ratio 3.125) was judged a spurious holdout-luck artifact.
Outcome Summary
A single-asset Edwards-Magee double-top/double-bottom (M/W) chart-pattern reversal on BTCUSDT.BINANCE daily bars, going short on failed second-peak tests and long on failed second-trough tests as an event-driven, market-neutral long-short book.
Outcome Summary
The base daily backtest over ~6.5 years produced 57 trades (27 long / 30 short) with total return 7.98x, Sharpe 0.55 (CI low -0.83), profit factor 1.24, win rate 50.9%, and low max drawdown 8.9%, and was genuinely market-neutral (beta -0.002). After optimization the book thinned to 15 trades with a selected Sharpe of 2.70 but a deflated Sharpe of just 0.0005.
Backtest and paper results are hypothetical. Trading involves risk of loss.