Skip to content
All strategies

Strategies

LINK Hyperliquid 4H Frozen-Level Breakout Retest with Persistent Risk State

Outcome: Abandoned

LinkHyperliquidBreakoutRetest

Outcome Summary

This strategy put the MintEval Section-4 breakout-retest idea into practice on LINK perpetuals on Hyperliquid, using 4-hour bars, a frozen breakout level, retest confirmation and layered persistent stop management. The code ran as designed: all 55 signals were executed, losses were sized at about 0.5% of equity, and the accounting reconciled. Even so, it lost 8.34% (Sharpe -1.11, -1.99% per trade), mainly because most retest entries reversed into their initial stop while the winners were no bigger than the losers. The analyst abandoned it at backtest review before any optimization, which rejects only this LINK 4H version and not breakout-retest trading in general. It went through 1 iteration.

Hypothesis

Derived by the Research Lead from Wang et al., MintEval: operationalize the breakout-then-retest state machine and interacting persistent risk layers described in Section 4. This is a Research Lead-designed trading experiment, not a reproduced benchmark task or an author-endorsed profitable strategy. Trade LINKUSD.HYPERLIQUID on completed 4-HOUR bars, long and short, using frozen breakout levels, bounded retest windows, entry-anchored protection, breakeven activation and subsequent trailing protection. The supplied paper does not provide an individual reference program or its parameter values. All signal choices below are therefore registered for optimization; risk budgets and execution conventions are fixed. Market entries execute at the confirming bar's close. Protective stops trigger intrabar through platform matching. No exchange-hosted protection, independent opposing positions or selectable same-bar stop/target ordering is required.

Hyperliquid represents 11.0% of experiments against a 20% target, and long-short strategies represent only 20.2%. LINK avoids another BTC experiment. The supplied corpus_concentration is empty, so LINK-specific historical concentration cannot be established. Four-hour bars avoid Hyperliquid's short sub-hourly history. This experiment tests retest confirmation and persistent risk transitions rather than another SMA crossover or cross-sectional MAX ranking. The paper's benchmark results are not evidence of trading profitability.

negative_expectancy: decline optimization of this Research Lead version of the MintEval Section-4 breakout-retest state machine on LINKUSD.HYPERLIQUID 4H. Across 55 closed positions it loses after costs. avg_trade_return_pct is -1.99% against the +0.15% HYPERLIQUID floor, PF 0.52, win rate 34.5% and Sharpe -1.11. QA's concern is confirmed. About 62% of entries (34/55) appear to have hit the initial ~1R stop, inferred from duration and price P&L because there is no exit-reason field. In other words, the retest……Show moreShow less

negative_expectancy: decline optimization of this Research Lead version of the MintEval Section-4 breakout-retest state machine on LINKUSD.HYPERLIQUID 4H. Across 55 closed positions it loses after costs. avg_trade_return_pct is -1.99% against the +0.15% HYPERLIQUID floor, PF 0.52, win rate 34.5% and Sharpe -1.11. QA's concern is confirmed. About 62% of entries (34/55) appear to have hit the initial ~1R stop, inferred from duration and price P&L because there is no exit-reason field. In other words, the retest entries are mostly failed breakouts, and winners average the same size as losers ($481 vs $486), which cannot cover a 34.5% hit rate. Losses are spread across calm, normal and stressed regimes, and the signal IC is noise (t=-1.3). Fees and funding are immaterial: commissions are 5% of gross and funding is -$135. A per-trade edge of -2% is far below costs, so tuning thresholds cannot lift it. This rejects only this operationalization (Donchian-level freeze, ATR retest tolerance, entry-anchored stop, breakeven then trail) on LINK 4H. It does not reject the MintEval authors' work, which supplied no reference program or parameters, or breakout-retest trading generally. No parameter sweep has been evaluated.

Implementation

LINKUSD.HYPERLIQUID 4H long/short breakout-retest state machine. A close beyond the prior channel_bars high/low by breakout_buffer_atr*ATR freezes that channel level and the ATR at that bar. For up to retest_bars bars, a bar whose wick returns to within retest_tolerance_atr*frozen-ATR of the level and closes back on the breakout side confirms the entry, a market order at that close. A close beyond the tolerance on the wrong side, or the window running out, disarms. An opposite breakout replaces the armed side. Protection: a reduce-only STOP_MARKET placed on fill at entry -/+ max(stop_atr*ATR, min_stop_fraction*price), which fills intrabar through platform matching. When the favourable extreme reaches breakeven_r*R the stop moves to entry. After that it trails extreme -/+ trail_atr*entry-ATR and only ever ratchets in the protective direction. Positions also close after max_hold_bars, and no new arming happens for cooldown_bars bars after an exit. Size = equity*risk_fraction/stop distance, capped at max_notional_fraction*equity*leverage/price (leverage 1).

Implements the Research Lead operationalization exactly, using the optimization_plan parameter names and baselines. The fixed values (risk_fraction 0.005, max_notional_fraction 0.3, leverage 1, one position, no pyramiding, $10 minimum notional) are wired directly. All state (frozen level, armed ATR/timestamp, entry price/ATR/R, stop level, extreme, breakeven flag, last-exit timestamp) is scalar attributes, so it persists across restarts. Retest window, hold and cooldown are counted from bar timestamps, not process counters. Two design choices: (1) the trail distance uses the ATR frozen at entry, so protection stays entry-anchored. (2) If a ratcheted stop level is already through the bar's close, the position exits at market on that bar instead of submitting a stop on the wrong side of the market. No parameter is clamped, so _param_bounds is omitted. Expected frequency: a 42-bar channel break on 4H LINK occurs roughly 2-4 times a month across both sides, and perhaps a third to a half retest within 6 bars, which gives about 15-30 trades a year over ~2.7 years of HL data.

Verification Results

Set last_exit_ts = cur_ts (and reset the position state) when should_exit returns True, or in on_position_closed using the event timestamp.

Cooldown anchoring is uneven. After a venue stop fill, last_exit_ts is the bar on which the stop filled. After a should_exit market close (time stop or exit_now), pos_side is cleared only on the NEXT bar, so last_exit_ts lands one bar later. The cooldown is therefore one bar longer after signal exits than after stop exits.

Optional: leave min_bars_required low (the strategy guards readiness itself), or seed the deques from self._bars.

Overriding min_bars_required = channel_bars+2 means the base calls calculate_signal only after that many bars are buffered. The channel deque then needs another channel_bars of processed bars before it is ready. The effective warm-up is about 2*channel_bars, up to ~182 bars at channel_bars=90. The fixed warmup_bars of 180 covers almost all of the tunable range, so this is harmless, but it is not the intended warm-up.

On start, rebuild the entry state from position.avg_px_open and position.ts_opened, and stop_level from the resting stop's trigger price.

Position state (pos_side, entry_ts, risk_dist, stop_level) is set only in on_order_filled, and only when no reduce-only stop is already resting. A paper restart with a carried position and a carried stop would leave pos_side = 0. The ratchet and the max_hold time stop would then be inactive for that position. This concerns paper/live only; the backtest never restarts.

Sandbox (unoptimized baseline, 791 days): 55 closed positions, PF 0.53, win rate 35%, avg_trade_return_pct -1.96%, Sharpe -1.09. Longs did much worse than shorts (22% vs 46% win rate). The losses are spread evenly across the calm, normal and stressed regimes, which points at the mechanism rather than one market episode. The baseline stop is at least 2xATR, about 4-6% on 4H LINK, so the 0.09% Hyperliquid round trip is not the issue; the losses are directional. Check first whether retest entries are mostly failed breakouts that hit the initial stop, by looking at the distribution of exit reasons: initial stop, breakeven stop, trailing stop and time stop.

Backtest Review

Sharpe
-1.11
Total return
-8.34%
Max drawdown
9.44%
Trades
55
Win rate
34.5%
Profit factor
0.52

The implementation works as specified: 55 entries were signaled and all 55 were submitted, with no drops for size, cash or minimum notional.

Risk sizing works: losing trades cluster tightly at about -$480 to -$560, which is about 0.5% of equity, matching risk_fraction 0.005. Accounting reconciles, end_unrealized_pct is 0 and the trades are balanced (27 long, 28 short), as the hypothesis requires.

Fees are not the cause: commissions are 5.2% of gross and funding is -$135 net, against a total P&L of -$8,338.

Net expectancy is negative. avg_trade_return_pct is -1.99% against the +0.15% HYPERLIQUID floor. PF is 0.52, win rate 34.5% and Sharpe -1.11 (CI -2.47 to 0.27). Total return is -8.34%.

Exit-reason breakdown from the detail file (QA's suggested check). This is inferred from trade duration and price P&L, because the trade records have no exit-reason field. 34 of 55 trades (62%) lost about 3.6-12% on price at roughly 1R, which points to the initial stop. Another 16 closed with gains (likely breakeven or trailing exits), 4 hit the 7-day time stop and 1 exited at about breakeven. So most confirmed retests are failed breakouts that reverse through the frozen level, and the winners do not pay for them: average win $481 vs average loss $486, at a 34.5% hit rate.

Longs are worse than shorts: 22% win rate vs 46%. Even so, the short side is roughly flat to negative, so neither direction carries an edge.

Losses are spread across all three volatility regimes: Sharpe -1.43 calm, -0.59 normal, -1.24 stressed. The drawdown lasts 748 of 791 days, so no regime or period rescues the mechanism.

The executed signal's information coefficient is -0.16 (t=-1.3), indistinguishable from noise or slightly wrong-signed.

Context: LINK is roughly benchmark-uncorrelated here (beta -0.004). The drawdown of 9.4% is far smaller than buy-and-hold LINK's, so this is not a beta problem; the strategy simply has no directional edge.

Outcome Summary

Confirmed retests of frozen Donchian levels on LINK 4H mostly turned out to be failed breakouts, so a breakout-retest variant needs a filter that tells real breakouts from false ones, or a payoff where wins are well above 1R, before it is worth tuning.

At the backtest-review gate the analyst voted to abandon for negative expectancy, so optimization never ran. About 62% of entries appeared to hit the initial ~1R stop (failed breakouts), average wins ($481) matched average losses ($486), losses showed up in every volatility regime, and the signal IC (-0.16, t=-1.3) was noise. Fees and funding were not the cause.

A long/short breakout-then-retest state machine on LINKUSD.HYPERLIQUID 4H bars, adapted by the Research Lead from MintEval Section 4: it freezes a Donchian breakout level, waits a limited number of bars for a confirmed ATR-tolerance retest, and then manages each trade with an entry-anchored stop, a move to breakeven and a ratcheting trail.

Over 55 closed trades (27 long, 28 short) from Feb 2024 to Apr 2026 it returned -8.34%, with Sharpe -1.11 (CI -2.47 to 0.27), profit factor 0.52, win rate 34.5% and avg_trade_return_pct -1.99%, against the +0.15% Hyperliquid floor; max drawdown was 9.44%.

Analysis

MintEval: Do LLMs Implement the Trading Strategy You Asked For? A Behavioural-Equivalence Benchmark for Natural-Language-to-Strategy Code

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