Skip to content

View original

DogeVwapReversionLS15m

Hypotheses

DOGE Intraday VWAP-Reversion, Long-Short (Single-Instrument BINANCE Perp, 15m Bars, Fade Moderate Z-Score Deviations from Rolling VWAP Back to Fair Value — Applied to the Highest-Amplitude Liquid Perp for Maximum Fee Headroom, Trend-Regime Gated, Favorable-RR Geometry, Pure OHLCV, 3-Parameter)

Hypotheses

A LONG-SHORT, single-instrument intraday mean-reversion on DOGEUSDT.BINANCE (USD-M perpetual, 15m bars). It is a deliberate, disciplined application of the factory's ONE proven intraday recipe — the SOL VWAP-Reversion that reached paper — to the deep liquid perp with the LARGEST intraday mean-reverting amplitude in crypto. This choice is the whole thesis: the dominant killer across 162 fee_edge deaths is per-trade moves too small to clear commissions, and DOGE's retail-driven 15m dislocations are structurally larger than any mega-cap's, so the same fade captures a bigger reversion per unit of the fixed ~0.10% round-trip — the best fee headroom available on a deep single name. Critically, it is a SINGLE-NAME, SINGLE-MECHANISM, low-parameter strategy: this side-steps the overfit graveyard that just killed three consecutive weekly majors baskets (trend-efficiency OOS -0.95, low-vol OOS 27x collapse, all best-of-N selection artifacts) — with no cross-sectional selection and no per-name tuning, there is no best-of-N surface for the optimizer to overfit. Trade geometry is built for favorable realized reward:risk (enter at the stretched extreme, target the VWAP anchor which is FAR, stop just beyond the extreme which is NEAR) to avoid the inverted-RR death of the trade-flow strategy. It fills the two most under-represented buckets: long_short direction (14.7% vs target) and short horizon (6.1% vs 10%), on pure OHLCV (the best-surviving data tag), and is a genuinely fresh instrument (DOGE not used for reversion; SOL deployed, ETH/XRP pending are different names/mechanisms).

Hypotheses

RECOMMENDATION: I concur with the QA analyst that this should be ABANDONED. This is the 4th consecutive falsification of the L7 pure-OHLCV VWAP-deviation reversion class (SOL opening-range, ETH pivot, XRP volume-climax, DOGE), each dying on fee/edge or inverted-RR; with a 37.6% win rate and 35.8% commission over 8,819 trades, the mechanism has no demonstrated edge and the base rate is 0% survival. I am flagging that abandonment is the correct outcome. That said, the analyst also diagnosed a CONCRETE, legitimate code defect — the exits lived in incompatible units (target in z-space via exit_z, stop in ATR-price-space via stop_atr×ATR), so on high-amplitude DOGE the stop was farther than the target and the intended favorable RR was mechanically inverted (winners capped at the anchor, losers ran the ATR stop / 8h time-stop, largest_loss −$4893, liquidation). Fixing a specifically-diagnosed bug is a valid iteration, so as a best-effort I made the smallest change that addresses the named failures: (1) GEOMETRY — both target and stop are now in z/sd units (target |z|≤exit_z=0.5, stop |z|≥stop_z=3.0, entry at 2.0), giving reward 1.5 sd vs risk 1.0 sd — favorable and unit-consistent, the exact defect the analyst identified; (2) LIQUIDATION — the z-space hard stop bounds each loss in sd units and a 6h time-stop caps duration, replacing the loss-riding behavior, plus position_frac cut to 0.25 to slow any residual bleed; (3) CHURN/COMMISSION — entry_z raised 1.5→2.0, regime gate tightened 0.5→0.35, and a 2h post-exit cooldown added, which a dry-run confirms cuts eligible entries substantially while still trading (145 eligible bars over 14 days, so no no-trades/verification_loop risk). Imports unchanged and clean; the deque-buffer O(window) perf fix from iteration 2 (which cleared the Layer-3 timeout) is untouched, and the signal/regime logic that passed earlier layers is preserved. Transparent caveat: even with correct geometry, a 37.6% win rate and the L7 base rate make it unlikely this crosses zero — if it again fails on fee/edge, the mechanism class should be retired rather than iterated a fifth time.

Hypotheses

Negative-expectancy single-name intraday VWAP-reversion fade that LIQUIDATED the account (total_return -100%, max_drawdown 100%, liquidation 2021-12-04) — the zero-survivor intraday mean-reversion/fade class (L7/L55). Over 3,425 trades the mechanism is decisively unprofitable: profit_factor 0.54, avg_trade_return_pct -0.101% (NEGATIVE, below the 0.15% fee floor, L22), expectancy -$45.52/trade, Sharpe -1.07 with CI [-2.75, -0.66] fully below zero and PSR 0.0. Realized RR is inverted (avg_win $112 vs avg_loss $190; largest_loss -$7,724; skew -30.9, kurtosis 1277) despite the iter-3 z-space geometry fix — the 'fade z-score deviations back to VWAP on the highest-amplitude perp' premise has the wrong sign on DOGE, losing in every vol regime before the blowup. The DOGE 'fee headroom' choice backfired: the larger amplitude produced larger adverse excursions that ran the stops and liquidated the book. No parameter tuning of entry_z/stop_z/trend_er_max can flip a negative per-trade edge positive. Failure pattern: fee_edge/no_edge negative-expectancy intraday fade, liquidated. Not worth 2 hours of optimization.

Implementation

Long-short, single-instrument intraday VWAP z-score mean-reversion on DOGEUSDT.BINANCE USD-M perpetual, 15m bars, pure OHLCV. Each bar computes a 1-day rolling VWAP anchor and a z-score of the close's deviation from it (normalized by recent deviation dispersion), and a Kaufman efficiency-ratio regime gate. It SHORTS when z ≥ entry_z and LONGS when z ≤ -entry_z, only in a non-trending regime (ER ≤ trend_er_max). Iteration 3 fixes the inverted-RR geometry defect: both exits are now expressed in the SAME z/sd units — the TARGET is reversion to the anchor (|z| ≤ exit_z) and the STOP is further divergence (|z| ≥ stop_z) — so reward (entry_z−exit_z) exceeds risk (stop_z−entry_z) by construction and the two exits no longer live in incompatible units. The z-space hard stop also bounds each loss in sd units, and entries are more selective (higher entry_z, tighter regime gate, a 2h post-exit cooldown, quarter-equity sizing) to cut the commission churn that dominated the prior run. Three tunable knobs: entry_z, stop_z, trend_er_max.

Verification Results

CLEAN RESTART 2026-09-04 — this run's verdict history and learning records were removed and it was restarted from verification. Its previous abandonment came from the pipeline, not from the market: the Layer-2 harness mis-bound @staticmethod helpers (fixed), QA issued terminal performance verdicts on an unoptimized smoke test (removed — QA now judges correctness only), and sandbox timeouts came from backtest-slot starvation (fixed). The hypothesis and the strategy code are unchanged. Verify the code on its merits; performance is decided later by the full backtest and the optimizer.

Verification Results

In optimization, treat entry_z and the cooldown as primary turnover levers and verify that thinning trades actually lifts avg_trade_return_pct above the ~0.15% futures floor rather than just shrinking a negative-expectancy sample.

Verification Results

Despite the anti-churn changes, the sandbox still shows commission at 25.47% of gross over 312 trades (turnover 272x) — fee drag remains the dominant loss driver, the exact failure mode the iteration targeted. The churn controls are implemented correctly but appear insufficient to reach fee viability.

Backtest Review

Single-name, single-mechanism, 3 parameters — no cross-sectional best-of-N surface to overfit

Backtest Review

Large trade count (3,425) makes the negative result statistically decisive rather than noise

Backtest Review

Account LIQUIDATED 2021-12-04: total_return -100%, max_drawdown 100%, CAGR -100% — the iter-3 z-space stop bounds single losses but does not fix negative expectancy (daily return -579.6% on the blowup day)

Backtest Review

Negative per-trade edge: avg_trade_return_pct -0.101% (below the 0.15% fee floor, L22), profit_factor 0.54, expectancy -$45.52/trade, Sharpe -1.07 (CI [-2.75, -0.66] fully below zero), PSR 0.0

Backtest Review

Inverted realized RR persists despite the geometry fix: avg_win $111.7 < avg_loss $189.8, largest_loss -$7,724, skew -30.9, kurtosis 1,277 — winners capped, losers run

Backtest Review

Loses across all three vol regimes (calm/normal/stressed Sharpe -8.3/-6.3/-3.0) and nearly every month of the traded window

Backtest Review

L55/L7 zero-survivor single-name intraday VWAP/price-reversion fade — the fade thesis has the wrong sign on DOGE 15m; the high-amplitude 'fee headroom' choice amplified adverse excursions into a liquidation

Iteration History

Verification failed (Layer 3 — sandbox backtest): smoke test exceeded the 300s wall-clock limit. This almost always means per-bar work that scales with history — e.g. rescanning the full funding/supplementary series, or rebuilding a list and calling min()/sorted() inside calculate_signal()/on_bar() on every bar. Precompute sorted timestamp arrays ONCE in __init__ and use bisect, or cache lookups keyed by timestamp, so per-bar cost is O(log n) not O(n).

Iteration History

Verification failed (Layer 4 — QA review): - FEE/EDGE + INVERTED-RR FAILURE on a now-runnable, trustworthy backtest -> recommend ABANDON. With the Layer-3 timeout fixed, the full-history run (2187 data_days, 8819 trades, metrics_reliable=true) is decisively negative and LIQUIDATED: total_return -100.0, liquidated 2020-09-10, Sharpe -2.05, PF 0.191, win_rate 0.376, avg_trade_return_pct -0.0623%, commission 35.8% of gross ($23.9k). avg_win $20.14 vs avg_loss $63.33 (~3:1) is the INVERTED RR the hypothesis explicitly claimed to avoid. Every core claim falsified: 'favorable RR' -> inverted; 'DOGE fee headroom' -> 35.8% commission over 8819 trades; 'moderate deviations revert' -> 37.6% win rate even with the regime gate. - GEOMETRY MISCALIBRATION drives the inverted RR: the TARGET is z-space (exit when |z|<=exit_z 0.3, ~1.2*sd of price from the z=1.5 entry) while the STOP is ATR-price-space (1 x ATR beyond entry). On high-amplitude DOGE, 1 ATR is FARTHER than the ~1.2*sd target, so realized geometry is 'stop far / target near' — opposite of intended. Winners capped small at the anchor; losers run the full ATR stop or 8h time-stop (max_consecutive_losses 23). The two exits live in incompatible units, so favorable RR never materializes. - L7 pure-OHLCV VWAP-deviation reversion, now falsified a 4th consecutive time (SOL opening-range, ETH pivot, XRP volume-climax, DOGE) — all fee/edge or inverted-RR deaths. The 'largest-amplitude instrument' twist made it worse: DOGE's bigger 15m dislocations continue adversely more often, driving the low win rate and inverted RR. - RESIDUAL (doesn't change the verdict): liquidated despite position_frac 0.5 and current-equity sizing (avg_position_pct 15%, so no XRP-style stacking). Liquidation from ~15% exposure indicates the 8h time-stop lets reversions ride to large losses (largest_loss -$4893) with no portfolio equity stop, and the cumulative inverted-RR bleed compounded to zero.

Iteration History

Verification failed (Layer 4 — QA review): - FEE/EDGE FAILURE + LIQUIDATION persists on a now-clean backtest -> ABANDON the mechanism class (concurring with the developer's own recommendation). The iter-3 geometry fix measurably helped (win_rate 0.376 -> 0.477, trades 8819 -> 3364) but did NOT flip the edge: total_return -100.0, liquidated 2021-12-08, Sharpe -1.38 (CI [-1.88,-0.86] entirely negative), PF 0.539, avg_trade_return_pct -0.1037% (per-trade WORSE than iter-2's -0.062%). The RR is STILL inverted (avg_win $113.67 < avg_loss $192.09) despite the 'reward 1.5 sd vs risk 1.0 sd by construction' design. This is the L7 pure-OHLCV VWAP-reversion class failing again across SOL/ETH/XRP/DOGE/BNB and multiple iterations (0% survival across 213 runs). - WHY THE Z-SPACE FIX DIDN'T DELIVER THE DESIGNED RR: expressing both exits in z/sd units does not guarantee favorable PRICE-space reward:risk, because the z denominator (sd) EXPANDS as price diverges and the VWAP anchor DRIFTS. A |z|>=3.0 stop reached in a rising-sd environment is a LARGER price move than '1 sd at entry', while winners revert to |z|<=0.5; the 6h time-stop also exits un-reverted losers at market. The designed 1.5:1 z-space ratio maps to a realized <1:1 price-space ratio (avg_win $113 < avg_loss $192). Correctly IMPLEMENTED (credit) but z-space stops can't bound price-space loss on a non-stationary anchor. - RESIDUAL: still LIQUIDATED (2021-12-08) despite position_frac 0.25 and the z-space hard stop. avg_position_pct 59.8% (elevated vs intended 25% — mark growth + drawdown averaging), largest_loss -$7725, max_consecutive_losses 10. The z-space stop + 6h time-stop still permit large losses (sd-expansion, time-stop-at-market), and cumulative negative-expectancy bleed compounded to zero. - CREDIT (no defect): the iter-3 geometry fix is correctly implemented per the iter-2 diagnosis (both exits in z/sd units; entry 2.0 / stop_z 3.0 / exit_z 0.5), removing the unit-mismatch; it improved win rate (0.477) and cut churn (3364). The iter-2 O(window) perf fix holds. Rejection is at the mechanism/edge level, not implementation.
Strategy report

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