Skip to content

View original

BtcDailyZScoreDipBuyUptrendLong

Hypotheses

BTC Daily Z-Score Dip Buy in Uptrend

Hypotheses

A simple long-only mean-reversion strategy on BTCUSDT perpetual futures using daily bars. The strategy buys oversold dips ONLY when the broader trend is up (price above 200-day SMA). Edge is simple and well-documented: in established uptrends, sharp short-term selloffs in BTC tend to revert as dip-buyers and trend-followers reload positions. The 200-day filter avoids the failure mode of catching falling knives in bear markets, which is when mean-reversion strategies typically blow up. Designed deliberately as a low-frequency, low-parameter strategy (only 4 parameters total) to avoid the verification timeouts and overfitting failures seen in recent complex pairs/funding/seasonality strategies. Holds 3-10 days per trade, ~2-4 trades per month, with per-trade target moves of 3-5% which dwarfs the 0.10% round-trip futures fee.

Hypotheses

Iteration 2 addresses the backtest_review feedback that the strategy fired ~10x too rarely (20 trades / 6 years). The reported failure was purely entry sparsity — the edge itself was genuine (PF 1.80, 65% win). Per the feedback's primary lever, I made the smallest change: loosened entry_z from 2.0 to 1.4 and shortened z_lookback from 20 to 12 (both in code defaults and the config parameters dict), leaving every already-passing component untouched — imports, class structure, the raw continuous z-score signal, the uptrend gate, exit logic, and capital-relative sizing. A -1.4 z on a 12-day window registers oversold readings far more frequently than -2.0 on a 20-day window, targeting the intended ~24-48 trades/year (~40-80 over 6 years) so the strategy carries a walk-forward- and holdout-viable sample. The shorter window also makes each z reading more responsive to sharp multi-day selloffs, the exact dips the hypothesis targets, while the unchanged 200-day trend filter still screens out bear-market falling knives to preserve the win rate and profit factor.

Hypotheses

Failed deflated Sharpe: DSR=0.0 (vs 0.95 bar), with the optimized Sharpe 1.2265 FAR BELOW the 225-trial expected-max luck bar of 5.393 (is_significant=false, sharpe_ci_low -0.5473 straddling 0, PBO 0.869) — the selected config is statistically indistinguishable from best-of-N noise. Every forward gate concurs: the walk-forward is is_overfitted=TRUE with avg IS 4.48 collapsing to avg OOS 0.0 across ALL THREE windows (zero OOS trades, because the low-frequency signal — only 46 trades in 6.5 years — structurally starves the walk-forward windows), and the time-ordered HOLDOUT FAILED (ratio 0, holdout_sharpe 0.0). Sensitivity FAILED with 4 cliffs on the CORE signal parameters (entry_z, trend_sma, z_lookback, max_hold_bars), so the edge exists only at fragile cliff-edge values with no robust plateau. The base was already a weak, negative-alpha edge (Sharpe 0.31, alpha -0.0048, IR -0.71, PF 1.09), so optimization could only inflate in-sample Sharpe while OOS went to zero. Not iterate (attempt 1 of 2): OOS is uniformly zero, all four core knobs are cliffs, and the trade count is too low to optimize without fitting noise — a second best-of-225 sweep re-finds the same overfit/degenerate config. Not revise_hypothesis: BTC daily is not a dead target and this dip-buy mechanism has no promoted sibling stranded elsewhere; it is simply too thin and too low-frequency to survive deflation. FAILURE PATTERN: a simple, low-parameter, well-motivated oversold-dip-buy-in-uptrend on BTC daily produces a marginal base (Sharpe 0.31, negative alpha) whose only high-IS-Sharpe optimization region is best-of-225 selection on noise — DSR 0.0, PBO 0.869, is_overfitted walk-forward with zero-trade OOS windows, a zero holdout, and 4 cliffs on the signal-defining parameters. The PSR=0.886 / DSR=0.0 split is the diagnostic tell that the in-sample number is pure selection inflation; deliberately-simple + fee-viable does not rescue an edge too rare and too weak to be distinguished from luck.

Implementation

Long-only daily mean-reversion on BTCUSDT USD-M futures. Buys oversold dips (z-score of close vs its 12-day mean/stdev <= -1.4) ONLY when price is above the 200-day SMA (uptrend filter). Exits when z reverts to >= 0, on an 8% hard stop, or a 10-bar time stop. Sized at 50% of equity notional, leverage 1.0.

Backtest Review

Trades faithfully implement the hypothesis: 46 long-only dip-buys (z<=-1.4) in confirmed uptrends (>200-SMA), 63% win rate, ~5-day holds — no mechanism mismatch

Backtest Review

Clean low-parameter design (4 core knobs) minimizes overfitting surface

Backtest Review

Fee-viable: commissions only 3.62% of gross profit, so the edge is not being eaten by trading costs

Backtest Review

Sound risk control: 15.4% max drawdown, 14.7% exposure, 200-SMA filter correctly avoids bear-market falling knives

Backtest Review

Thin raw edge: profit_factor 1.09, Sharpe 0.31, sharpe_ci_low -1.45 straddles zero

Backtest Review

Return concentrated in 2023 (+12.6%); 2024 (+0.8%) and 2025 (+0.6%) nearly flat, hinting at decay or regime-dependence

Backtest Review

Only 46 trades over 6.5 years (~15 per walk-forward window) — marginal sample for meaningful IS/OOS optimization; overfitting/deflation risk is high downstream

Backtest Review

Actual frequency (~0.6 trades/month) far below the hypothesized 2-4/month

Analysis

Simple, low-parameter, well-motivated mean-reversion premise with a sensible 200-day trend filter

Analysis

Clean implementation with no leverage abuse (avg_position_pct ~50%, leverage 1.0) and modest drawdown (base 15.4%, optimized 10.3%)

Analysis

avg_trade_return comfortably exceeds fees (per-trade edge dwarfs 0.10% RT; commission only 3.6-4.2% of gross)

Analysis

Deflated Sharpe 0.0: optimized Sharpe 1.2265 far below the 225-trial expected-max luck bar of 5.39 — indistinguishable from best-of-N noise

Analysis

PBO 0.869 and sharpe_ci_low -0.5473 (CI straddles 0); is_significant=false

Analysis

Walk-forward is_overfitted=TRUE: avg IS 4.48 -> avg OOS 0.0 across all three windows (zero OOS trades — low frequency starves the windows)

Analysis

Holdout FAILED (ratio 0, holdout_sharpe 0.0)

Analysis

Sensitivity FAILED with 4 cliffs on the core signal parameters (entry_z, trend_sma, z_lookback, max_hold_bars)

Analysis

Base is a weak, negative-alpha edge (Sharpe 0.31, alpha -0.0048, IR -0.71, PF 1.09) and only 46 trades in 6.5 years — too few to optimize without fitting noise

Analysis

Do NOT optimize yet — the edge looks genuine (PF 1.80, 65% win) but the strategy fires ~10x too rarely (20 trades over 6 years, ~3/year) versus the hypothesized 2-4/month, so it cannot survive walk-forward and a 15-day holdout would likely have ZERO trades. Increase trade frequency toward the intended ~24-48/year before optimization: 1. ENTRY THRESHOLD (primary): the z <= -2.0 + (close > 200-SMA) conjunction is far too strict on BTC daily. Loosen entry_z from 2.0 to ~1.3-1.5 and/or shorten z_lookback from 20 to ~10-14 so oversold readings register more often. Re-run and confirm the trade count rises to ~40-80 over the 6-year period (a walk-forward-viable sample). 2. PRESERVE THE EDGE: after loosening, verify profit_factor stays > 1.4 and win rate > 0.55 — if the denser entries dilute the edge to breakeven, the deep-dip reading was the source of the edge and the mechanism is intrinsically too sparse (abandon then). Report the new trade count, PF, and per-year distribution. 3. HOLDOUT VIABILITY: confirm the recent ~6-12 months contain multiple trades at the new frequency, so the holdout phase is not a zero-trade window. Resubmit once the entry fires at a frequency that supports walk-forward/holdout with the edge intact. If even at a realistic frequency the sample stays < ~40 trades or the edge collapses, this mechanism is too sparse on BTC daily and should be abandoned.

Outcome Summary

BtcDailyZScoreDipBuyUptrendLong was a deliberately minimal, four-parameter mean-reversion strategy that bought oversold daily dips in BTC futures only during 200-day uptrends. Its initial backtest was clean and fee-viable but thin — Sharpe 0.31, profit factor 1.09, negative alpha across just 46 trades — so the analyst passed it to optimization rather than abandoning outright. Optimization raised in-sample Sharpe to 1.2265, but every forward gate rejected it: deflated Sharpe 0.0, PBO 0.869, an overfitted walk-forward whose out-of-sample Sharpe collapsed to zero, a failed holdout, and four cliffs on the signal-defining parameters. After two iterations the strategy was abandoned as too rare and too weak to be distinguished from best-of-N selection noise.

Outcome Summary

A deliberately simple, fee-viable premise cannot survive deflation when the base edge is weak and low-frequency; ~46 trades in 6.5 years structurally starves walk-forward windows so optimization only inflates in-sample Sharpe on best-of-N noise while OOS goes to zero.

Outcome Summary

The analyst abandoned it after optimization: deflated Sharpe was 0.0 (vs 0.95 bar) with the optimized 1.2265 far below the 225-trial expected-max luck bar of 5.39, PBO 0.869, an is_overfitted walk-forward collapsing from avg IS 4.48 to OOS 0.0 (zero OOS trades), a failed holdout, and 4 sensitivity cliffs on the core signal parameters.

Outcome Summary

A simple, low-parameter long-only mean-reversion strategy that bought oversold daily z-score dips (z <= -1.4) in BTCUSDT futures only when price was above its 200-day SMA, betting that sharp selloffs revert within established uptrends while the trend filter avoids catching falling knives in bear markets.

Outcome Summary

The base backtest produced a thin edge over 6.5 years and 46 trades: Sharpe 0.31, total return 8.16, 63% win rate, profit factor 1.09, negative alpha (-0.0048), and 15.4% max drawdown. Optimization lifted in-sample Sharpe to 1.2265 (24.99 total return, PF 1.65, 41 trades) but that number failed every out-of-sample gate.
Strategy report

Backtest and paper results are hypothetical. Trading involves risk of loss.