Skip to content

View original

SolBinanceFifteenMinDailyVwapExcursionMeanReversionLongShort

Hypotheses

SOL BINANCE USD-M Futures 15-Minute Daily-Anchored VWAP Excursion Long/Short Mean-Reversion (Single-Venue, Single-Instrument, 3-Parameter, Z-Relative Volatility Stop)

Hypotheses

A LONG/SHORT, single-instrument, single-venue, SHORT-HORIZON intraday mean-reversion strategy on SOLUSDT.BINANCE perpetual futures using 15-MINUTE bars and OHLCV-only data. This is deliberately targeted at the TWO worst-violated quota dimensions that are ALSO reliably testable: the short_1m_15m horizon bucket (2.2% actual vs 10% target — the single worst horizon gap, and one that can ONLY be filled on Binance/Binance_spot because every sub-hourly Hyperliquid dataset is data-span-blocked, e.g. the SOL-USD.HYPERLIQUID 15m abandon had only 38 days), and the long_short direction bucket (12.7% vs the 55% long-only ceiling). It transplants the ONE mechanism class that cleared every optimization gate this session — daily-anchored VWAP excursion mean-reversion (the ETH 1H BINANCE sibling was PROMOTED; range-MR and funding-MR both failed) — to a higher-resolution timeframe and a more-volatile asset (SOL), exactly as the analyst recommended when abandoning the SOL-HL-15m variant: 'the VWAP MR mechanism is genuinely good but needs a transplant target with multi-year history — e.g., SOLUSDT.BINANCE rather than SOL-USD.HYPERLIQUID.' SOLUSDT.BINANCE has ~5 years of continuous 15m history (>150,000 bars), so the 3-phase optimization (sensitivity + 3-window walk-forward + 15-day holdout) has ample sample, eliminating the data-insufficiency failure mode. It AVOIDS every architectural tooling trap documented this session: single-instrument directional PnL (no funding-cash-flow accounting, no cross-venue MTM netting, no multi-leg options, no COIN-M InstrumentId parsing). Critically it FIXES the specific defect that sank the SOL-HL-15m variant — a fixed -1.5% stop that was tighter than the reversion target, producing an inverted avg_loss/avg_win (2.05x) despite a 62% win rate: this version sizes the stop relative to ATR (and thus implicitly to the entry z-magnitude), guaranteeing the stop is never tighter than the expected reversion path. Three tunable parameters only: z_entry, vwap_std_lookback, stop_atr_mult.

Hypotheses

Iteration 2 fix for the Layer-3 wall-clock timeout (>300s smoke test). The signal logic, thresholds, entry/exit gates, and ATR-scaled stop are all UNCHANGED from the previous iteration (which passed Layers 1 and 2). The ONLY change is replacing the per-bar numpy array reconstructions with O(1) incremental accumulators: (1) VWAP now uses running sum(close*vol), sum(vol), sum(close) reset daily instead of rebuilding np.asarray(day_closes/day_vols) each bar; (2) the rolling deviation std uses a fixed-length deque with running sum and sum-of-squares (variance = E[x^2] - E[x]^2) instead of np.std over a re-sliced window; (3) ATR uses a rolling true-range deque with a running sum computed from _prev_close instead of _compute_atr rebuilding three numpy arrays from self._bars via list comprehensions each bar. numpy is dropped from the hot path in favor of stdlib math/collections. Per-bar cost is now constant over the ~150k-bar SOL 15m history, eliminating the timeout while producing byte-identical statistics.

Hypotheses

Asset/cadence-transfer failure, not a data problem (full 202,628-bar SOL 15m history loaded; the prior 38-day SOL-HL-15m insufficiency IS fixed here). The VWAP-excursion MR mechanism promoted on the ETH 1H BINANCE sibling does NOT port to SOL's higher-volatility 15m cadence: it loses every single year and worsens (2021 -44% -> 2023 -65% -> 2024 -79%), then LIQUIDATES the account on 2025-03-01 (total_return -100%, Sharpe -1.51, profit_factor 0.78). Two decisive points make this un-optimizable rather than iterable: (1) profit_factor 0.78 means gross losses exceed gross wins across 8,504 trades — the mechanism has genuinely negative expectancy on this asset/timeframe, so no parameter region rescues it; (2) the ATR-scaled stop that was the entire premise of this iteration (to cure the SOL-HL-15m inverted avg_loss/avg_win of 2.05x) FAILED — the profile is still inverted at 1.79x (avg_win $79 vs avg_loss $140) AND the account now blows up entirely (skew -17.6, kurtosis 489, single-day returns of -115%/-110%). There is also a probable position-stacking/over-leverage bug (avg_position_pct 40.7% vs configured 10%; should_enter never checks for an existing position before re-entering), which drove the impossible >100% daily losses and the liquidation — but fixing sizing only rescales a PF<1 loser, it cannot flip the sign. FAILURE PATTERN: transplanting a promoted intraday VWAP-mean-reversion (ETH 1H) to a more-volatile asset at a faster cadence (SOL 15m) does NOT inherit the edge — the reversion is overwhelmed by SOL's 15m noise/trend and adverse fee drag (commission 11.6% of gross), producing an every-year loser with an inverted win/loss geometry that an ATR stop does not fix and that liquidates the account. The promoted ETH-1H instance remains the configuration where this mechanism works; SOL 15m is a dead transplant target for it. If the VWAP-MR family is still wanted on SOL, only a lower-frequency (>=1H) cadence with strict single-position sizing should be considered as a fresh hypothesis — not a re-optimization of this liquidating 15m variant.

Implementation

SOLUSDT.BINANCE USD-M perpetual futures, 15-minute daily-anchored VWAP excursion mean-reversion, symmetric long+short. Each bar computes session-anchored VWAP (reset at UTC midnight), a rolling std of (close - VWAP), and z = (close - VWAP)/std. z <= -z_entry goes long (below fair value), z >= z_entry goes short (above fair value), betting on reversion to VWAP. Exits on reversion to VWAP (z crosses 0), an ATR-scaled stop (stop_atr_mult * ATR from entry), or forced end-of-day flat at >= 23:30 UTC. Three tunable params: z_entry, vwap_std_lookback, stop_atr_mult. Leverage 1.0, OHLCV-only, single-leg directional PnL.

Verification Results

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).

Backtest Review

Data insufficiency is genuinely fixed: full SOL 15m history (202,628 bars, ~5.7 yr) with 8,504 trades — ample sample for optimization, unlike the prior 38-day SOL-HL-15m attempt.

Backtest Review

Efficient O(1) incremental implementation (no per-bar timeout), correct VWAP-excursion mechanism, single-instrument directional PnL avoiding the cross-venue/funding accounting traps.

Backtest Review

CATASTROPHIC LOSER: total_return -100% with the account LIQUIDATED on 2025-03-01; Sharpe -1.51, profit_factor 0.78 (gross losses exceed gross wins), negative EVERY year and worsening (2021 -44% -> 2024 -79% -> 2025 -521% before blowup).

Backtest Review

The ATR-stop 'fix' failed: win rate 57.9% but avg_win $79 << avg_loss $140 (1.79x) — the same inverted small-win/big-loss profile it was designed to cure (prior 2.05x).

Backtest Review

Blowup tail: skew -17.6, kurtosis 489, single-day returns of -115% / -110% — mathematically impossible without over-leverage, which caused the liquidation.

Backtest Review

Likely position-stacking/over-leverage bug: avg_position_pct 40.7% vs configured 10% (should_enter never checks for an existing position before re-entering). But PF 0.78 means even a 4x sizing fix leaves a losing strategy — the edge is absent, not mis-sized.

Outcome Summary

This strategy set out to fill the short-horizon and long/short quota gaps by transplanting the promoted ETH-1H daily-anchored VWAP mean-reversion mechanism onto SOLUSDT.BINANCE 15m bars, explicitly fixing the prior SOL-HL-15m failures of data insufficiency and a too-tight fixed stop via full 5.7-year history and an ATR-scaled stop. The data problem was genuinely solved (202,628 bars, 8,504 trades), but the mechanism did not port: it lost every year, worsened over time, kept the same inverted small-win/big-loss geometry (avg win $79 vs avg loss $140), and liquidated the account on 2025-03-01 for a -100% total return with Sharpe -1.51 and profit factor 0.78. At the backtest-review gate the analyst abandoned it as un-optimizable — negative expectancy across 8,504 trades cannot be tuned away, and a likely position-stacking/over-leverage bug (40.7% avg position vs 10% configured) drove the impossible >100% daily losses. The conclusion was that SOL 15m is a dead transplant target for this VWAP-MR family; only a lower-frequency (≥1H) cadence with strict single-position sizing would merit a fresh hypothesis.

Outcome Summary

A VWAP mean-reversion edge promoted on ETH 1H does not inherit to SOL's higher-volatility 15m cadence — the reversion is overwhelmed by intraday noise/trend and fee drag, and an ATR-scaled stop cannot flip a negative-expectancy (PF<1) mechanism; also, should_enter must check for an existing position before re-entering to avoid position stacking.

Outcome Summary

The analyst issued an 'abandon' verdict at the pre-optimization backtest-review gate: with profit factor 0.78 the mechanism has genuinely negative expectancy on this asset/timeframe (no parameter region rescues a PF<1 loser), the ATR-stop fix failed to correct the inverted win/loss profile, and a probable position-stacking/over-leverage bug (avg position 40.7% vs configured 10%, no existing-position check before re-entry) drove the liquidation — so no optimization or later stage was run.

Outcome Summary

A symmetric long/short intraday mean-reversion strategy on SOLUSDT.BINANCE 15-minute futures that entered when price deviated far (z-score) from a daily-anchored VWAP and bet on reversion to VWAP, transplanting a VWAP-excursion mechanism promoted on the ETH 1H sibling to a faster cadence and more-volatile asset, with an ATR-scaled stop meant to cure the inverted avg_loss/avg_win that sank the prior SOL-HL-15m variant.

Outcome Summary

Across ~5.7 years and 8,504 trades on full history (202,628 bars) it was a catastrophic loser: total return -100% with the account liquidated on 2025-03-01, Sharpe -1.51, profit factor 0.78, and expectancy -$13/trade; despite a 57.9% win rate the loss geometry stayed inverted (avg win $79 vs avg loss $140), commissions ran 11.6% of gross, and blowup tails appeared (skew -17.6, kurtosis 489).
Strategy report

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