Skip to content

View translation

SolFourHourVolExpansionGatedTrendLS

Hypotheses

SOL 4H Trend, Volatility-Expansion Gated, Long-Short (SOLUSDT.BINANCE USD-M — Take Directional Trend ONLY When Realized Volatility Is EXPANDING, Sit Flat in Contracting/Chop Regimes, ATR-Trailing Exit, 3-Parameter)

Hypotheses

A LONG-SHORT, single-instrument, pure-OHLCV, regime-aware trend follower on SOLUSDT.BINANCE (USD-M perpetual), 4H bars. It belongs to the ONLY mechanism family that has ever reached paper-stage in this factory (single-instrument 4H long-short directional momentum with a confirmation GATE — BTC/ETH/ADA all survived), but it uses a DELIBERATELY DIFFERENT gate from the volume-confirmed and dual-timeframe siblings already in the pipeline, so it is not a duplicate. Core insight: 4H crypto trend-following bleeds to death in low-volatility CHOP (whipsaw round-trips whose moves are smaller than fees — the exact grave that killed DOT vol-compression-squeeze and every intraday reversion variant), and makes its money almost entirely during volatility-EXPANSION phases when a genuine directional move is underway. So instead of trying to detect a coil and predict the breakout direction (the DOT squeeze approach that died), this strategy is agnostic about compression and only ever engages once volatility is DEMONSTRABLY expanding AND price already has an established trend sign — it rides the move that has already begun rather than guessing. Sign of trend = sign of the N-bar rate-of-change (a single trend lookback). Volatility-expansion gate = ATR(fast) / ATR(slow) above a threshold, i.e. short-window realized range is running hot relative to its own baseline (a real move, not drift). When the gate is OFF (vol contracting / ranging), the strategy is FLAT — this is the whole edge: it structurally refuses to trade the fee-graveyard chop regime that killed the failures. Exactly 3 parameters: trend_lookback, vol_ratio_threshold, atr_trail_mult. Single instrument (no basket — avoids the multi_instrument 0/127 backtest_failed crashes), single venue (no cross-venue basis to drift). This is regime-aware, long-short (an under-represented direction at 14.2% of the portfolio), and low-parameter (overfit-resistant).

Hypotheses

Iteration 2. Feedback: the backtest gate flagged incoherent metrics with the equity curve at -22.31% and told me to judge on the equity curve, i.e. the implementation ran but bled. The smallest structural fix that also matches the hypothesis literally ('when the gate is OFF the strategy is FLAT') is that the gate previously only blocked NEW entries -- open positions were carried straight through the volatility contraction back into chop, where the wide 3xATR trail slowly gave the trend profits back and the sign-flip exit arrived many bars late. That carry-through is exactly the fee-graveyard regime the hypothesis refuses to trade. Changes, all confined to the exit/threshold layer (imports, class structure and the continuous signal that passed Layers 1-3 are untouched): (1) should_exit now closes the position when the vol-expansion ratio decays below vol_ratio_threshold*gate_exit_frac (0.90 hysteresis so it does not flicker on the entry boundary), guarded by a 3-bar minimum hold so an entry cannot be unwound on the next bar; (2) selectivity tightened -- vol_ratio_threshold 1.10 -> 1.15 and trend_min_strength 0.35 -> 0.50 -- so the strategy takes fewer, genuinely expanding, established trends instead of many marginal ones whose per-trade move barely clears the ~0.10% round trip; (3) atr_trail_mult 3.0 -> 2.5 so a reversal gives back less of the move. Shorter, gate-bounded holds also shrink the open-position mark-to-market that made the Sharpe (mtm series) and total_return (equity curve) disagree in sign. Still exactly 3 optimizable parameters, single instrument, single venue, no leverage, long-short.

Hypotheses

Fee/impact-fragile, edge-below-cost signal on a decisive 1019-trade / 6-year sample: profit_factor 1.022 (near break-even, below the 1.05 viability floor and in the fee_edge band), Sharpe 0.18 with CI [-0.61, 1.02] straddling zero, information_ratio -1.04. Modeled market impact eats 66.5% of gross PnL at a tiny $226K capacity, so the nominal 0.236% per-trade return is not a durable edge. The vol-expansion gate does not deliver its premise — it still loses -25.95% in the calm regime it is meant to sit out. This is a single-name 4H trend/momentum LS clone far below the only survivable tier (Sharpe>=1.5 & PF>=2.0, L90), and the SOL momentum family is already 0/N (fee_edge / high-PBO deaths). Optimization cannot lift a PF-1.022 signal whose gross edge is consumed by fees and impact above trading costs. Failure pattern: fee_edge / edge-below-cost.

Implementation

SOLUSDT.BINANCE USD-M perpetual, 4H bars, long-short trend follower that only engages while realized volatility is EXPANDING. Trend score = N-bar rate of change normalized by ATR(50)*sqrt(N) (continuous every bar). Gate = ATR(10)/ATR(50) >= vol_ratio_threshold. Entry when the gate is on and |trend score| >= trend_min_strength (BUY if positive, SELL if negative). Exits: trend-sign flip, the vol-expansion gate switching OFF (ratio falls below threshold*0.90, after a 3-bar minimum hold), or an ATR trailing stop of atr_trail_mult*ATR(50) from the best close since entry. Sizing risks 2% of equity over the trailing-stop distance, capped at 1x equity notional; unleveraged.

Verification Results

No functional change required; if the base method name collision ever causes confusion, rename to e.g. _min_bars() and call it from calculate_signal directly.

Verification Results

min_bars_required() overrides a framework method (static analyzer base_shadow warning). Here the override appears deliberate and sensible (max of trend_lookback+2, atr_slow_period+2, 20) and gates calculate_signal via `len(self._bars) < self.min_bars_required()`, so warmup is respected. Confirm the base template actually consults this override for its own warmup gating; if the base uses a private warmup counter instead, the extra-leg/warmup semantics still hold because the strategy self-guards.

Verification Results

Optionally initialize the trailing state at order submission time (in _submit_entry hook) so the anchor is exact from the entry bar; acceptable as-is.

Verification Results

ATR trailing anchors (_trail_best/_trail_worst) and _entry_bar_i are (re)initialized inside should_exit on first detection of a new position id. If should_exit is not invoked on the exact bar the position opens (entry and exit are typically mutually exclusive per bar in the base flow), the trail effectively starts tracking from the bar AFTER entry. This is a minor off-by-one in the trailing anchor / hold counter, not a correctness break — it is conservative (min_hold effectively counted from the bar after entry) and matches the developer's stated intent.

Verification Results

Sandbox smoke test raises three profitability flags for the analyst to weigh at full backtest: (1) impact_cost_pct 50.91% with capacity_usd only ~$386K and turnover 130.8 — avg_position_pct 32.6% of equity on a single 4H SOL book generates heavy modeled impact that consumes roughly half of gross PnL (avg_position_pct/max_notional_frac=1.0 sizing is the lever if capacity binds); (2) the strategy LOSES in the calm-vol regime (-25.92%, Sharpe 0.036) and only profits in normal/stressed — consistent with the hypothesis's own premise that chop is the graveyard, but the calm-regime bleed is large; (3) headline Sharpe 0.18 with CI [-0.61, 1.02] straddling zero and information_ratio -1.04 vs buy-hold. None of these block correctness; the code faithfully implements the hypothesis and the optimizer has not run. Real full-history backtest and the analyst decide edge.

Backtest Review

Reliable 1019-trade / 6-year sample (metrics_reliable=true); code faithfully implements the vol-expansion-gated LS mechanism (1019 signaled = 1019 submitted, balanced 630 long / 389 short).

Backtest Review

avg_trade_return_pct 0.236% nominally clears the 0.15% Binance USD-M floor, and max_drawdown 22.2% is not extreme.

Backtest Review

profit_factor 1.022 — essentially break-even after costs, below the review guard's 1.05 viability floor and squarely in the fee_edge band [0.85,1.10] with >300 trades (L18). The gross edge sits inside trading costs.

Backtest Review

Sharpe 0.18 with bootstrap CI [-0.61, 1.02] straddling zero and information_ratio -1.04 vs buy-hold — no distinguishable edge; total_return only ~15% over 6 years with alpha -0.005.

Backtest Review

impact_cost_pct 66.5% of gross PnL at capacity_usd only ~$226K — modeled market impact consumes two-thirds of the gross edge; the strategy is real only at toy scale.

Backtest Review

The vol-expansion GATE fails at its own stated purpose: it still bleeds heavily in the calm regime (-25.95%, Sharpe 0.035) — the exact chop it claims to structurally refuse — and profits only in normal/stressed. QA's calm-regime concern borne out.

Backtest Review

Single-name 4H trend/momentum LS clone far below the only tier that has ever survived this class (ADA winner: Sharpe>=1.5, PF>=2.0; here 0.18 / 1.02 — L90). The base backtest is the ceiling; deflation/holdout only lower it.

Backtest Review

SOL single-name momentum family is 0/N: SOL volume-confirmed momentum (fee_edge), SOL 4H momentum (PBO 0.63, DSR 0.14), SOL HL dual-TF (PBO 0.75) all recently died.

Analysis

Backtest gate: - metrics unreliable: Incoherent: Sharpe 0.13 disagrees in sign with total_return -22.31% — the Sharpe is computed from the mtm_equity_curve series while the return comes from the equity curve. Judge on the equity curve.

Outcome Summary

SolFourHourVolExpansionGatedTrendLS-9bec93a5fe

Outcome Summary

SolFourHourVolExpansionGatedTrendLS tried to make 4H SOL trend-following viable by only trading when realized volatility was demonstrably expanding, refusing the low-vol chop that had killed prior variants. On a robust 6-year, 1019-trade backtest it came out essentially break-even after costs: ~15% total return, Sharpe 0.18 with a CI straddling zero, profit factor 1.022, and information ratio -1.04 versus buy-and-hold, with modeled impact eating two-thirds of gross PnL at only ~$226K capacity. Worse, the volatility gate failed at its own thesis, still bleeding -25.95% in the calm regime it claimed to avoid. After 2 iterations the analyst abandoned it at backtest-review before optimization, judging the fee-edge signal below trading costs and unliftable — another death in the already 0/N SOL single-name momentum family.

Outcome Summary

A volatility-expansion gate did not deliver its premise — the strategy still lost -25.95% in the calm regime it was meant to sit out — and single-name 4H SOL momentum remains 0/N, near break-even after fees and impact.

Outcome Summary

The analyst abandoned it at backtest-review (pre-optimization): a decisive 1019-trade sample showed an edge-below-cost, fee/impact-fragile signal with profit factor 1.022 in the fee_edge band and a Sharpe CI straddling zero, so optimization was judged unable to lift it.

Outcome Summary

A 3-parameter, long-short 4H trend follower on SOLUSDT.BINANCE USD-M perps that only engaged when realized volatility was expanding (ATR-fast/ATR-slow above threshold) and sat flat in contracting/chop regimes, aiming to ride established directional moves while structurally avoiding the fee-graveyard chop.

Outcome Summary

Over a 6-year, 1019-trade sample it returned ~15% total with Sharpe 0.18 (bootstrap CI [-0.61, 1.02]), profit factor 1.022, 45.6% win rate, max drawdown 22.2%, and information ratio -1.04 vs buy-and-hold. Its avg_trade_return_pct of 0.236% nominally cleared the 0.15% floor, but modeled market impact consumed 66.5% of gross PnL at a tiny ~$226K capacity.
Strategy report

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