Skip to content
All strategies

Strategies

OKX Alt Volatility-Compression Release, Long-Short Panel (LINK/ADA/DOT/ATOM/BCH USDT Swaps, 4H Bars: Trade the Break of a Low-Percentile Range Squeeze, ATR Intrabar Trail, 3-Parameter)

Outcome: Abandoned

OkxAltSqueezeReleasePanelLS

Outcome Summary

OkxAltSqueezeReleasePanelLS traded breakouts from low-percentile range compressions across five OKX alt perpetuals on 4H bars, with risk-parity sizing and ATR trailing stops. Its single full-history backtest made +18.0% over 825 trades, but Sharpe was only 0.30 with a confidence interval spanning zero, and per-trade return was 0.086%, under the 0.15% fee floor. Losing years in 2020, 2022 and 2023, a negative signal IC, and an edge concentrated in shorts led the backtest reviewer to abandon it on iteration 1 without optimization. The verdict rejects only this operationalization, not squeeze-release ideas in general.

Hypothesis

A long-short panel on five long-history OKX USDT perpetual swaps (LINKUSDT.OKX, ADAUSDT.OKX, DOTUSDT.OKX, ATOMUSDT.OKX, BCHUSDT.OKX; 4H bars, history from 2019-2020). OKX is 2.4% of the corpus against a 5% quota, long-short is 18% against a 45%+ target, and none of these five series has been used on OKX. The mechanism is volatility clustering plus range release, not momentum ranking. On each 4H close, for each instrument, compute the box width over the last box_bars bars, defined as (highest high - lowest low) /……Show moreShow less

A long-short panel on five long-history OKX USDT perpetual swaps (LINKUSDT.OKX, ADAUSDT.OKX, DOTUSDT.OKX, ATOMUSDT.OKX, BCHUSDT.OKX; 4H bars, history from 2019-2020). OKX is 2.4% of the corpus against a 5% quota, long-short is 18% against a 45%+ target, and none of these five series has been used on OKX. The mechanism is volatility clustering plus range release, not momentum ranking. On each 4H close, for each instrument, compute the box width over the last box_bars bars, defined as (highest high - lowest low) / close. A COMPRESSION state holds when that width's percentile rank within its trailing 180 values is at or below squeeze_pct. A position opens only when the bar after a compression state CLOSES outside the box: long on a close above the box high, short on a close below the box low. Orders are market orders at the signal bar's close, which on a 24/7 venue is the next bar's open (the registry's use_equivalent for next_bar_open_fill). Each position gets an intrabar protective stop: a reduce-only stop-market at the opposite side of the box at entry, then trailing at trail_atr x ATR(14) from the best close. It triggers inside the bar in the simulated venue, which is supported natively, and nothing is hosted on the exchange. A failed-break time stop applies: exit if the position has not gained at least 1 ATR within 6 bars (24h). Sizing is risk-parity per leg: risk 1% of equity per trade at the initial stop distance, notional capped at 25% of equity per instrument, at most 3 legs open at once (about 75% gross), leverage 1-2x. The family is a TradingView-style 'squeeze' breakout without the Bollinger/Keltner dressing, here the plain box-width percentile. No supplementary feed is used (L189). Funding is paid or received through the backtest ledger.

This fills the most under-represented buckets the venue allows: OKX (2.4% vs a 5% target), long-short (18%), and multi-instrument rather than single-symbol. It avoids BTC, which is over-concentrated, and ETH/SOL. The mechanism (squeeze release) is not among the live survivors (momentum confluence, skew reversal, plain Donchian, ratio trend), nor among the recent failures (weekend carry, SMA cross, funding carry, 1h impulse range-break on SOL). The SOL 1h impulse failure came from 740 trades at 1h with no squeeze filter. This uses 4H, requires prior compression, and has a fee-clearing capture estimate.

no_edge: negative_expectancy. Fee-floor check: avg_trade_return_pct is 0.086% against the OKX futures floor of 0.15%. Commission is about 5% of gross, while impact is 34% and funding -$4.6k; together these costs absorb about half of gross. On 825 closed trades the result is PF 1.10, Sharpe 0.30 (95% CI -0.53 to 1.05) and win rate 0.355, which is the lesson-142 shape. The executed-signal IC is -0.098 (t=-1.45). The thin edge comes from shorts (+$16.7k); longs are flat and BCH loses $10k. 49% of trades die at the……Show moreShow less

no_edge: negative_expectancy. Fee-floor check: avg_trade_return_pct is 0.086% against the OKX futures floor of 0.15%. Commission is about 5% of gross, while impact is 34% and funding -$4.6k; together these costs absorb about half of gross. On 825 closed trades the result is PF 1.10, Sharpe 0.30 (95% CI -0.53 to 1.05) and win rate 0.355, which is the lesson-142 shape. The executed-signal IC is -0.098 (t=-1.45). The thin edge comes from shorts (+$16.7k); longs are flat and BCH loses $10k. 49% of trades die at the frozen 6-bar failed-break stop, and 2020, 2022 and 2023 are losing years. QA's concern is borne out on the full history: per-trade return improves from 0.014% in the sandbox to 0.086%, but stays below the floor. QA's funding concern does not hold: funding is credited in the full run. Optimization would tune only squeeze_pct, box_bars and trail_atr; the failed-break exit that dominates outcomes is frozen, and a zero/negative IC is not something a 3-parameter search can reverse without fitting noise. Scope: this rejects only this operationalization (5-alt OKX 4H panel, box-width percentile at or below squeeze_pct over 180 bars, 6-bar/1-ATR failed-break stop, ATR trail). It does not test squeeze-release with a longer follow-through window, or a short-only/ex-BCH variant; those would be new hypotheses.

Implementation

A long-short panel of five OKX USDT swaps (LINK, ADA, DOT, ATOM, BCH) on 4H bars. For each leg on every aligned 4H close it computes the box width, (highest high - lowest low over box_bars) / close, and that width's percentile rank within its trailing 180 values. A rank at or below squeeze_pct marks a COMPRESSION bar. The next bar opens a market position when it closes above the prior box high (long) or below the prior box low (short). When more breaks fire than there are free slots, the strongest breaks by distance in ATRs are taken first, with at most 3 legs open. Each position gets a reduce-only STOP_MARKET at the opposite side of the box. The stop is ratcheted every bar to best_close -/+ trail_atr x ATR(14) and triggers inside the bar. Two exits are checked at the bar close: a failed-break exit if no close reaches +1 entry-ATR within 6 bars, and a 60-bar maximum hold. Sizing risks 1% of equity at the initial stop distance, with notional capped at max_leg_notional_pct x equity x leverage. No supplementary data is used.

This implements the hypothesis's box-width-percentile squeeze-release mechanism with the exact parameter names from optimization plan v2. The tunables are box_bars, trail_atr and squeeze_pct; all fixed values are kept. The primary leg (LINK) is entered and exited through the base should_enter/should_exit/position_size path. The four extra legs are managed in the same aligned pass with _submit_entry_instrument and _submit_exit_position, and every leg is its own position. Alignment: an extra leg contributes only a……Show moreShow less

This implements the hypothesis's box-width-percentile squeeze-release mechanism with the exact parameter names from optimization plan v2. The tunables are box_bars, trail_atr and squeeze_pct; all fixed values are kept. The primary leg (LINK) is entered and exited through the base should_enter/should_exit/position_size path. The four extra legs are managed in the same aligned pass with _submit_entry_instrument and _submit_exit_position, and every leg is its own position. Alignment: an extra leg contributes only a bar whose close timestamp equals the primary bar's, so a later-closing bar is never read. One interpretation to flag: with the fixed leverage at 1.5, a hard 25%-of-equity cap would leave gross at most 75% and the leverage field would do nothing. The leverage gate would also reject that. So max_leg_notional_pct is applied to equity x leverage: 37.5% of equity per leg and at most 112.5% gross across 3 legs, which stays under the 1.5x margin. In practice the 1% risk sizing at a compressed box's stop distance (roughly 3-8%) usually binds first, so the cap rarely applies. The failed-break threshold (1 ATR) is the unlisted fixed parameter failed_break_gain_atr. Per-position state (side, entry ATR, best close, stop level, entry timestamp) is kept in a persisted dict of scalars. Holding time comes from bar timestamps, not counters.

Verification Results

Either apply the cap to equity alone (0.25 x equity) to match the hypothesis literally, or record the 37.5% interpretation in the hypothesis/optimization plan so the risk review sees the real gross ceiling.

The per-leg notional cap is max_leg_notional_pct x equity x leverage, which is 37.5% of equity per leg and 112.5% gross at leverage 1.5. The hypothesis states a cap of 25% of equity per instrument and about 75% gross. The developer flagged this reinterpretation openly. The cap is still structurally present and bounded: worst-case gross is 3 x 0.375 = 1.125x equity, under the 1.5x leverage, and per-trade risk stays capped at 1% of equity at the stop distance. So this is a magnitude deviation, not a missing control.

Skip the trail/failed-break evaluation for a leg whose bar is absent from _aligned_bars on that timestamp, and keep only the max-hold check.

_manage_open_leg runs for every leg with an open book, even when that leg had no aligned bar this timestamp. In that case it reads the leg's stale close and ATR and advances 'held' from the primary timestamp. The base alignment barrier normally guarantees all same-timeframe legs are present, so this only matters if a leg has a data gap. The effect is a stop ratchet or time-stop evaluated on a stale price, not a look-ahead.

None required; keep it documented in the plan.

There is an added 60-bar maximum hold (max_hold_bars) that the hypothesis text does not name. It is listed as a fixed value in optimization plan v2, so it is sanctioned, but it is an extra exit relative to the hypothesis description.

Sandbox (one unoptimized draw, ~2026 days): 768 closed positions, PF 0.997, Sharpe 0.04, avg_trade_return_pct 0.0138% net. That is far below the OKX ~0.10% round-trip plus the 0.15% viability floor. Impact cost is reported at 105% of the measured figure, with modelled capacity of about $90k. The release edge per break looks thin against costs. Check first whether higher squeeze selectivity (lower squeeze_pct, longer box_bars) lifts the per-trade return above about 0.15%, and whether the 6-bar failed-break exit is cutting winners. Separately, the sandbox reports funding_events_available=0 and funding_folded=false, although the hypothesis says funding is paid through the ledger. Confirm OKX funding is attached in the full backtest. Shorts held for days on alts usually pay funding, so net results would be overstated without it.

Backtest Review

Sharpe
0.30
Total return
18.01%
Max drawdown
23.25%
Trades
825
Win rate
35.5%
Profit factor
1.10

The code implements the stated mechanism: entries come after a compression state and a close outside the box. The panel is long-short (443 long, 382 short), entries are risk-parity sized at about 13% of equity per leg, and no more than 3 legs are open at once.

Accounting is valid, end_unrealized_pct is 0, and nothing was liquidated. Funding IS credited in the full run (funding_folded=true, 4709 events, -$4,637 net across trades), so QA's funding concern applied only to the sandbox.

The sample is reliable: 825 closed trades over 6 years on 5 instruments.

FEE-FLOOR CHECK: avg_trade_return_pct is 0.086% against the OKX futures floor of 0.15% (round trip is about 0.10%). The sample is reliable, so this cannot be optimized.

PF is 1.10, Sharpe 0.30 (CI -0.53 to 1.05) and win rate 0.355. That is the lesson-142 shape: win rate below 0.40 and PF below 1.2 on a trailing-stop breakout. Modelled impact takes 34% of gross and commission takes another 5%.

The executed-signal IC is -0.098 (t=-1.45, n=219), so the signal has no positive information over the 60-bar horizon.

Results are unstable by year. 2020, 2022 and 2023 lose money and the drawdown lasted 1,204 days. Max DD is 23.3%, against the 25% the hypothesis set for itself. 2026 alone made +15% (Aug 2026 +15%).

Results split by leg: BCH loses -$9,973 at -0.53% per trade, and longs net about $0 (-0.02% per trade). Shorts made +$16.7k of the +$18.0k total, so the 'release' edge is not symmetric as the hypothesis claims.

408 of 825 trades (49%) exit at exactly 24h, which is the frozen 6-bar failed-break stop. Most breaks never follow through by 1 ATR, and that exit rule is frozen in the contract.

Outcome Summary

Box-width squeeze breakouts on these alts mostly failed to follow through by 1 ATR within 24h, and the thin edge came only from shorts (BCH lost about $10k, longs were flat). A future variant would need a longer follow-through window or a short-only/ex-BCH design, tested as a new hypothesis.

At backtest review the analyst abandoned it before optimization for no_edge. Average per-trade return was 0.086%, below the 0.15% OKX futures fee floor, and impact (34% of gross), commission and funding absorbed about half of gross. The signal IC was not positive, and the 6-bar failed-break exit, which ended 49% of trades, was frozen and so could not be tuned.

A long-short 4H panel on five OKX alt USDT swaps (LINK, ADA, DOT, ATOM, BCH) that entered when a bar closed outside a range box after the box width fell to a low trailing percentile (a volatility-compression release). Exits were an ATR trailing stop and a 6-bar/1-ATR failed-break time stop.

Over about 6 years (2020-10 to 2026-10) the initial backtest returned +18.0% on 825 trades. Sharpe was 0.30 (95% CI -0.53 to 1.05), PF 1.10, win rate 35.5%, max drawdown 23.3% and avg_trade_return_pct 0.086%. The executed-signal IC was -0.098 (t=-1.45).

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