Skip to content
All strategies

Strategies

Hyperliquid XLM–ALGO Failed Range-Break Auctions

Outcome: Abandoned

HlXlmAlgoFailedRangeBreak

Outcome Summary

HlXlmAlgoFailedRangeBreak tested whether failed range breakouts on Hyperliquid XLM and ALGO 4-hour perpetuals revert toward the range interior. Over 3 iterations the code never passed verification. The final iteration mainly reworked range tracking for speed after a sandbox timeout. The Layer 4 QA review then found two critical logic defects: confirmation ignored the opposite range boundary, and it accepted reclaims outside the fail window. QA also noted that the sandbox's 31 trades averaged only 0.0435% net. The run was abandoned as a code defect before backtest review, optimization, analyst review or risk review.

Hypothesis

Test independent long and short failed-breakout trades on XLM and ALGO perpetuals using 4-HOUR OHLCV. A completed breakout that promptly closes back inside its prior range may trap breakout participants and induce an unwind toward the range interior. HyperliquidCollector supplies perpetual OHLCV for both exact instruments. Catalog filenames indicate overlapping coverage from 2024-06-21 through 2026-10-02; validate actual timestamps, gaps and duplicates before development. Implement as a FactoryStrategy subclass with bounded rolling buffers and execution after the confirming close. No calendar, funding, news or tick signal is required.

Hyperliquid is 7.2% versus its 20% target, the largest venue shortfall. This two-instrument, bidirectional experiment also addresses excessive single-symbol and long-only concentration. Corpus concentration is unavailable, so instrument-level novelty remains unverified. The mechanism is failed price discovery across a multi-day boundary, rather than pair-spread reversion, single-hour capitulation or supplementary-gated momentum. The supplied indicator recipes do not establish a suitable structural edge and were not adopted. Negative-Sharpe paper-stage examples are not treated as evidence of profitability.

verification_loop: Verification failed (Layer 4 — QA review) [class=code_defect]: - [edge_concern] The sandbox's 31 closed positions averaged 0.0435% net return, with substantial modeled impact. Assess execution costs over full history; these smoke-test results do not determine this verdict. - [critical] Confirmation checks only the breached boundary. Following an upward breakout, a close below the entire original range still triggers a short; following a downward breakout, a close above the entire range triggers……Show moreShow less

verification_loop: Verification failed (Layer 4 — QA review) [class=code_defect]: - [edge_concern] The sandbox's 31 closed positions averaged 0.0435% net return, with substantial modeled impact. Assess execution costs over full history; these smoke-test results do not determine this verdict. - [critical] Confirmation checks only the breached boundary. Following an upward breakout, a close below the entire original range still triggers a short; following a downward breakout, a close above the entire range triggers a long. Neither is the hypothesis's confirming close back inside the prior range. (line 117) — fix: Require the confirming close to be inside both stored range boundaries, alongside the directional reclaim buffer. Cancel or explicitly invalidate setups that cross the opposite boundary. - [critical] Confirmation is evaluated before expiry. With fail_window_bars=3, a reclaim on subsequent bar 4 triggers an entry because the age > fail_window_bars check runs only when confirmation fails. Both directions therefore accept failures outside the configured window. (line 117) — fix: Expire pending setups before evaluating confirmation whenever age exceeds fail_window_bars, or require age <= fail_window_bars in each confirmation condition. - [warning] The base class waits for 64 primary bars before calling calculate_signal(), after which _step requires another 64 updates. ALGO updates immediately through on_extra_bar(). This produces unequal effective warmup periods and leaves XLM indicators largely unprimed after a 64-bar replay. (line 68) — fix: Prime both legs consistently from their historical bars and distinguish framework buffering requirements from incremental indicator readiness. - [warning] Stops and targets are evaluated only at four-hour closes. Intrabar breaches do not cause exits, so stop-distance sizing does not enforce a maximum realized loss. (line 163) — fix: Document these as close-based exits, or submit protective stop orders if an intrabar risk limit is intended.

Implementation

Trades independent long and short failed range breaks on XLM and ALGO Hyperliquid perpetuals after a confirming 4-hour close. Retains entry-ATR stop and target, holding limit, cooldown and capital-relative sizing.

Iteration 3 changes only rolling-extrema computation: bounded monotonic queues preserve the prior-bar range while reducing its update cost from O(lookback) to amortized O(1). Imports, signal logic, execution hooks, instruments, timeframe and research parameter permissions are preserved. The previous buffers were already bounded, so this change does not establish the timeout's cause or guarantee resolution; a repeated timeout requires engineering profiling of loading, engine execution and reporting. No verification runs or catalog reads were performed, including no reads of the locked final-exam period. The requested outbox file could not be written because this session permits read-only filesystem access; the complete task-bound JSON is returned here.

Verification Results

Verification failed (Layer 4 — QA review) [class=code_defect]: - [edge_concern] The sandbox's 31 closed positions averaged 0.0435% net return, with substantial modeled impact. Assess execution costs over full history; these smoke-test results do not determine this verdict. - [critical] Confirmation checks only the breached boundary. Following an upward breakout, a close below the entire original range still triggers a short; following a downward breakout, a close above the entire range triggers a long. Neither is……Show moreShow less

Verification failed (Layer 4 — QA review) [class=code_defect]: - [edge_concern] The sandbox's 31 closed positions averaged 0.0435% net return, with substantial modeled impact. Assess execution costs over full history; these smoke-test results do not determine this verdict. - [critical] Confirmation checks only the breached boundary. Following an upward breakout, a close below the entire original range still triggers a short; following a downward breakout, a close above the entire range triggers a long. Neither is the hypothesis's confirming close back inside the prior range. (line 117) — fix: Require the confirming close to be inside both stored range boundaries, alongside the directional reclaim buffer. Cancel or explicitly invalidate setups that cross the opposite boundary. - [critical] Confirmation is evaluated before expiry. With fail_window_bars=3, a reclaim on subsequent bar 4 triggers an entry because the age > fail_window_bars check runs only when confirmation fails. Both directions therefore accept failures outside the configured window. (line 117) — fix: Expire pending setups before evaluating confirmation whenever age exceeds fail_window_bars, or require age <= fail_window_bars in each confirmation condition. - [warning] The base class waits for 64 primary bars before calling calculate_signal(), after which _step requires another 64 updates. ALGO updates immediately through on_extra_bar(). This produces unequal effective warmup periods and leaves XLM indicators largely unprimed after a 64-bar replay. (line 68) — fix: Prime both legs consistently from their historical bars and distinguish framework buffering requirements from incremental indicator readiness. - [warning] Stops and targets are evaluated only at four-hour closes. Intrabar breaches do not cause exits, so stop-distance sizing does not enforce a maximum realized loss. (line 163) — fix: Document these as close-based exits, or submit protective stop orders if an intrabar risk limit is intended.

Iteration History

Verification failed (Layer 1.5 — hypothesis/config consistency) [class=hypothesis_mismatch]: - optimization_plan fixes leverage at 2.0

sandbox_timeout: Verification failed (Layer 3 — sandbox backtest): smoke test exceeded the 300s wall-clock limit on a ~20000-bar window (2400 days of XLMUSD.HYPERLIQUID-4-HOUR-LAST-EXTERNAL). 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).

Outcome Summary

Failed-breakout logic should expire a pending setup before checking confirmation and should require the confirming close to sit inside both stored range boundaries. Each leg's indicators should be primed the same way so the hypothesis is implemented exactly.

After 3 iterations the run was abandoned in the verification loop when the Layer 4 QA review classified it as a code defect. QA raised two critical bugs: entry confirmation checked only the breached boundary, so a close beyond the opposite side of the range still triggered a trade, and confirmation was evaluated before the fail-window expiry, so reclaims after the configured window were accepted. QA also gave warnings about unequal warmup between the two legs and stops and targets that are checked only at bar closes.

Trade independent long and short failed-breakout reversals on Hyperliquid XLM and ALGO perpetuals using 4-hour bars. The idea was that a breakout which quickly closes back inside its prior range traps breakout traders, and their unwinding pushes price back toward the middle of the range.

No full backtest or optimization was produced. The only figures come from the verification sandbox smoke test: 31 closed positions averaging 0.0435% net return with substantial modeled impact. That is well below the 0.15% per-trade viability floor, though QA said these smoke-test numbers did not decide its verdict.

Abandon Reason

verification_loop: Verification failed (Layer 4 — QA review) [class=code_defect]: - [edge_concern] The sandbox's 31 closed positions averaged 0.0435% net return, with substantial modeled impact. Assess execution costs over full history; these smoke-test results do not determine this verdict. - [critical] Confirmation checks only the breached boundary. Following an upward breakout, a close below the entire original range still triggers a short; following a downward breakout, a close above the entire range triggers……Show moreShow less

verification_loop: Verification failed (Layer 4 — QA review) [class=code_defect]: - [edge_concern] The sandbox's 31 closed positions averaged 0.0435% net return, with substantial modeled impact. Assess execution costs over full history; these smoke-test results do not determine this verdict. - [critical] Confirmation checks only the breached boundary. Following an upward breakout, a close below the entire original range still triggers a short; following a downward breakout, a close above the entire range triggers a long. Neither is the hypothesis's confirming close back inside the prior range. (line 117) — fix: Require the confirming close to be inside both stored range boundaries, alongside the directional reclaim buffer. Cancel or explicitly invalidate setups that cross the opposite boundary. - [critical] Confirmation is evaluated before expiry. With fail_window_bars=3, a reclaim on subsequent bar 4 triggers an entry because the age > fail_window_bars check runs only when confirmation fails. Both directions therefore accept failures outside the configured window. (line 117) — fix: Expire pending setups before evaluating confirmation whenever age exceeds fail_window_bars, or require age <= fail_window_bars in each confirmation condition. - [warning] The base class waits for 64 primary bars before calling calculate_signal(), after which _step requires another 64 updates. ALGO updates immediately through on_extra_bar(). This produces unequal effective warmup periods and leaves XLM indicators largely unprimed after a 64-bar replay. (line 68) — fix: Prime both legs consistently from their historical bars and distinguish framework buffering requirements from incremental indicator readiness. - [warning] Stops and targets are evaluated only at four-hour closes. Intrabar breaches do not cause exits, so stop-distance sizing does not enforce a maximum realized loss. (line 163) — fix: Document these as close-based exits, or submit protective stop orders if an intrabar risk limit is intended.

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