BtcFourHourVwapDistanceMeanReversionLongDailyRegime
Hypotheses
BTC 4H VWAP-Distance Mean-Reversion Long with Daily Bull Regime Filter
Hypotheses
A long-only single-instrument MICROSTRUCTURE-BASED mean-reversion strategy on BTCUSDT perpetual futures using 4-hour bars and OHLCV-only data, with a daily-bar bull regime filter. This is the THIRD orthogonal mean-reversion mechanism for the portfolio: SolFourHourBbOversoldMeanReversionLong fires on STATISTICAL distance (std-dev from SMA), BnbFourHourRsi2OversoldMeanReversionLong fires on VELOCITY (rate of recent decline), and this proposal fires on MICROSTRUCTURE positioning (distance from volume-weighted average price). VWAP is the canonical institutional execution benchmark — large players actively work orders against VWAP, creating real defensive flow when price gaps materially below it. The three triggers fire on different bar conditions: BB triggers when price has drifted FAR below the simple-mean over many bars; RSI(2) triggers when price has dropped FAST over 2-3 bars; VWAP-distance triggers when price has moved AWAY from where most recent volume traded (a different statistical property — VWAP is volume-weighted, so it's anchored to where institutions executed). BTC is chosen specifically because (a) BTC has the most reliable data path in the system (proven by Sharpe 3.74 BtcFourHourVolumeBreakoutLong already in paper trading), (b) BTC has only momentum/breakout coverage (4H Vol Breakout + Spot Drawdown) — it's missing a 4H mean-reversion mechanism, (c) BTC has the deepest institutional flow of any crypto, making VWAP a meaningful microstructure reference rather than retail noise, (d) BTC's lower volatility produces cleaner VWAP-distance signals than higher-volatility alts where VWAP gets blown out by retail panics. The strategy uses 4H timeframe specifically because daily-bar fetches have proven unreliable (10+ Layer 3 infrastructure failures). 4H bars on BTCUSDT.BINANCE are empirically reliable. Only 4 parameters total (VWAP rolling window in 4H bars, distance threshold pct, regime EMA period, stop-loss pct), all economically meaningful, low overfitting surface.
Hypotheses
Iteration-2 minimal fix for the Layer-3 'No trades produced' failure. Root cause: the bull-regime gate (self._regime_ok) read from self._daily_close, populated only by on_extra_bar from a separate DAILY extra-bar feed that never populated in the sandbox, so _regime_on() was permanently False and should_enter (which requires distance<=-threshold AND regime_ok) never returned a side across all 13,997 bars. The VWAP-distance trigger already worked, so I changed ONLY the regime computation: _regime_on() now computes the identical 50-day EMA bull filter from the existing 4H close buffer (regime_ema_period * bars_per_day = 300-bar EMA), and the daily feed / on_extra_bar override is removed. Config drops extra_instruments/extra_bar_types (single feed). min_bars_required and the buffer cap were raised so the 300-bar regime EMA is available before trading. Imports, the VWAP/typical-price/distance signal, the continuous-signal scaffolding, and the exit/sizing logic are unchanged, so Layers 1 and 2 stay green while the strategy now enters whenever BTC is >=2% below VWAP within a 4H-derived bull regime. Venue remains BINANCE USD-M futures, leverage 1.0 (unused in amplification, so the leverage_set_but_unused gate does not trigger).
Hypotheses
VWAP-distance mean-reversion shows NO edge on BTC at the base config: profit_factor 0.92, Sharpe -0.28, total_return -4.56% over ~6.4 years, and negative per-trade expectancy (-$66/trade, ~-0.13%) which is below trading costs. The strategy is implemented correctly and trades as specified (142 signals, 0 dropped, ITER-2 fix worked), so this is a hypothesis-level no-edge result, not a code bug to iterate on, and the defaults (2% distance, 42-bar VWAP, 50-day regime) are economically sensible. The annual series alternates positive/negative with no stable regime, so optimizing 4 params via best-of-225 selection on a net-losing base would only fit an in-sample pocket that fails deflated Sharpe and the recent holdout. Not worth 2 hours of optimization. This is also the third mean-reversion mechanism (BB-oversold and RSI2 siblings already cover the family), so portfolio value is marginal even if rescued. FAILURE PATTERN: single-asset OHLCV VWAP-distance mean-reversion long with a self-derived regime filter produces a net-negative base (PF 0.92, negative Sharpe and expectancy below costs) on BTC 4H — a no-edge mechanism that optimization cannot rescue without overfitting; mean-reversion-to-VWAP on a major does not generate a fee-surviving edge at sensible thresholds.
Implementation
Long-only single-instrument VWAP-distance mean-reversion on BTCUSDT.BINANCE USD-M futures, 4H bars, pure OHLCV single feed. Computes a rolling volume-weighted VWAP over 42 4H bars and enters LONG when price is >=2% below VWAP AND the bull regime is on (latest 4H close above the 300-bar EMA, i.e. the 50-day EMA expressed in 4H bars). Exits on VWAP revert (close >= VWAP), a 5% hard stop, regime-off, or an 18-bar time stop. The signal is the continuous VWAP distance recomputed every bar; should_enter thresholds it together with the cached regime flag. leverage 1.0.
Verification Results
Verification failed (Layer 3 — sandbox backtest): No trades produced
Bar type used: BTCUSDT.BINANCE-4-HOUR-LAST-EXTERNAL, Bars processed: 14040
Diagnostics: should_enter() returned a side 0 times over 13997 evaluated bars -> your ENTRY CONDITION never triggered. Loosen the entry logic / thresholds.
Ensure your strategy produces trades with the given data and parameters.
Backtest Review
Implemented correctly: ITER-2 cross-feed fix worked, 142 signals -> 142 submitted, 0 dropped; all long, exposure 9.3%, trades exactly as the VWAP-distance mean-reversion hypothesis specifies
Backtest Review
Healthy sample (142 trades over ~6.4 years) and well-reasoned microstructure rationale — the data path and code are not the problem
Backtest Review
No edge at base config: total_return -4.56% over ~6.4 years, profit_factor 0.92 (<1), Sharpe -0.28, Sortino -0.36, omega 0.93 — net losing
Backtest Review
Negative per-trade economics: expectancy -$66/trade (~-0.13% on ~$50k positions), BELOW trading costs (commission_pct_of_gross 6.4%) — the analyst rule (avg_trade_return < 0.10%) is breached and here it is negative
Backtest Review
No stable regime to optimize toward: annual returns alternate +4.6/-12.4/-2.7/+11.1/-5.1/-5.7/+2.1 with rolling Sharpe oscillating around 0; max_drawdown_duration ~1950 days
Backtest Review
Redundant: third mean-reversion mechanism (BB-oversold and RSI2 siblings already cover the family) — marginal portfolio value even if rescued
Backtest Review
Optimizing 4 params via best-of-225 selection on a no-edge base would overfit an in-sample pocket and fail deflated-Sharpe / the recent holdout
Outcome Summary
This strategy added a microstructure angle to the portfolio's mean-reversion family, buying BTC when it traded materially below a volume-weighted VWAP in a bull regime, on the thesis that institutions defend VWAP. The iter-2 fix that derived the regime from the 4H buffer made it trade cleanly (142 entries), but it had no edge — profit factor 0.92, Sharpe -0.28, -4.56% over 6.4 years, with per-trade expectancy negative and below costs and annual returns oscillating around zero. The analyst abandoned it at the backtest-review gate on its second iteration as a no-edge, fee-losing hypothesis with no stable regime to optimize and only marginal portfolio value as a redundant third mean-reversion mechanism, so it never advanced to optimization or risk review.
Outcome Summary
Mean-reversion to VWAP on a crypto major does not generate a fee-surviving edge at sensible thresholds — a net-negative base with expectancy below trading costs is a hypothesis-level failure that optimization can only overfit, and adding a third orthogonal mean-reversion mechanism brings marginal portfolio value even if rescued.
Outcome Summary
The backtest-review analyst issued an 'abandon' verdict: the iter-2 cross-feed fix worked and the code traded exactly as specified (142 signals, none dropped), so this is a hypothesis-level no-edge result — the per-trade economics are negative and below costs, there is no stable regime to optimize toward, optimizing 4 params on a net-losing base would overfit and fail deflation/holdout, and it is a redundant third mean-reversion mechanism.
Outcome Summary
A long-only microstructure mean-reversion strategy on BTCUSDT 4H Binance futures (1.0x leverage, 0.50 position) — buying when price moved ≥2% below a 42-bar rolling VWAP while a 4H-derived 50-day EMA bull regime held, exiting on VWAP reversion, a 5% stop, regime-off, or an 18-bar time stop — pitched as a third orthogonal mean-reversion mechanism (VWAP-distance) alongside BB-oversold and RSI(2) siblings.
Outcome Summary
Across 142 trades over ~6.4 years it had no edge: -4.56% total return, profit factor 0.92, Sharpe -0.28, Sortino -0.36, win rate 46.5%, a 20.8% max drawdown, and negative per-trade expectancy of -$66 (~-0.13%, below the 6.4%-of-gross trading costs), with annual returns alternating positive/negative around a near-zero rolling Sharpe.
Backtest and paper results are hypothetical. Trading involves risk of loss.