Skip to content
All strategies

Strategies

LINK Bybit 4H Donchian Channel Breakout with Midline Exit, Long-Short, Ungated, 1 Core Parameter (LINKUSDT.BYBIT 4H, pure OHLCV, flat ~55% of the time)

Outcome: Abandoned

LinkBybitDonchianMidlineExitLS

Outcome Summary

LinkBybitDonchianMidlineExitLS applied the FMZ Donchian channel rules (break the 50-bar range to enter, exit at the midline) to LINK perpetuals on Bybit, long and short, flat about half the time. The mechanism ran as specified (50% exposure, 89 long and 78 short trades, beta 0.01), but the full-history backtest showed negative expectancy: -0.446% per trade, PF 0.886, Sharpe -0.21 and a -15.6% total return. After 3 iterations, the backtest-review analyst abandoned it as no_edge/negative_expectancy, confirming QA's earlier smoke-test concern, so optimization, analysis and risk review were never reached. A possible end-of-backtest marking artifact was flagged for the engine but did not affect the decision.

Hypothesis

Distilled from the FMZ digest article by 善, 'Analysing the Donchian Channel strategy in the research environment' (fmz.com/digest-topic/4385, section '买卖条件'). The article gives a complete rule set: upper band = highest high of the last N bars, lower band = lowest low of the last N bars, midline = their average. With no position, go long when the close is above the upper band and short when the close is below the lower band. Close a long when the close drops below the midline, and close a short when the close……Show moreShow less

Distilled from the FMZ digest article by 善, 'Analysing the Donchian Channel strategy in the research environment' (fmz.com/digest-topic/4385, section '买卖条件'). The article gives a complete rule set: upper band = highest high of the last N bars, lower band = lowest low of the last N bars, midline = their average. With no position, go long when the close is above the upper band and short when the close is below the lower band. Close a long when the close drops below the midline, and close a short when the close rises above it. None of the article's performance claims are used; our fee-inclusive backtest decides. Per L167 this is not a faithful port. It is the mechanism, restated. Stripped of instrument and timeframe, the mechanism is: 'enter in the direction of a close outside the N-bar high/low range; stay in until price gives back to the middle of that range'. It is a slow, flat-capable trend breakout, not mean reversion. It is also not an event-plus-fixed-clock trade (L166), because the exit follows the price state. Instrument choice: LINKUSDT.BYBIT perpetual on 4H bars. Bybit is at 1.4% of the corpus against a >=5% target, and its bar history goes back to 2021-03, about 5.5 years, unlike Hyperliquid (L168). The mechanism needs no supplementary feed, so the L160 ban on Bybit supplementary triggers does not apply. LINK is a liquid, high-trend-persistence alt that is outside the BTC concentration. The prior LINK death was a taker-flow contrarian signal, which is a different mechanism. The trade is single leg with no signal-on-A / trade-B (L143), no regime gate (L130) and no hand-typed universe (L151). There is one core parameter, the channel length N = 50 bars (about 8.3 days, as in the article's example), and the exit midline uses the same N. The declared flat state is the time between a midline exit and the next opposite-side close outside the channel; we expect to be flat about 50-60% of the time. Sizing: risk 2% of equity against the distance from entry to the midline at entry (the initial stop), notional = 0.02*equity / (|entry - midline| / entry), capped at 1.0x equity. Leverage is 1x, so there is no margin amplification. A long position is never flipped straight to a short. The position must exit at the midline first, which avoids the double-notional flip cost L150 describes.

Preserved the passing rolling Donchian and midline signal logic. Added a 0.15% breakout buffer above Bybit’s approximately 0.11% taker round-trip cost to reduce sub-cost one-tick entries. Quantity is rounded down using the resolved instrument size precision, rejected below $5 notional, and checked again against the normalized equity cap.

Failure code: no_edge/negative_expectancy, from the first measured report. The per-trade return of -0.446% is below the 0.15% Bybit futures single-leg floor and has the wrong sign, so this is not a thin fee_edge. There are 167 trades with PF 0.886, Sharpe -0.21 (bootstrap CI -1.03 to 0.63), win rate 35.3%, max drawdown 25.4%, and 2 of 7 years positive. The stressed-vol tercile, where a Donchian breakout should earn, lost 35% at Sharpe -1.39. This is a falsified payoff shape under L142/L141: a negative Sharpe on……Show moreShow less

Failure code: no_edge/negative_expectancy, from the first measured report. The per-trade return of -0.446% is below the 0.15% Bybit futures single-leg floor and has the wrong sign, so this is not a thin fee_edge. There are 167 trades with PF 0.886, Sharpe -0.21 (bootstrap CI -1.03 to 0.63), win rate 35.3%, max drawdown 25.4%, and 2 of 7 years positive. The stressed-vol tercile, where a Donchian breakout should earn, lost 35% at Sharpe -1.39. This is a falsified payoff shape under L142/L141: a negative Sharpe on more than 100 trades is a completed measurement. Changing the channel length or the exit only slides the win rate against the payoff along the same curve. It is not beta (beta 0.01). QA's smoke-test concern (PF 0.956, avg -0.446%) is confirmed on full history. The mechanism itself runs as specified: exposure is 50%, the book is balanced long and short, and exits happen at the midline. The single-name 4H Donchian breakout with a midline exit on LINK has no edge after costs. For engine review (unverified): the final bar 2026-04-13 shows a -15.44% daily return while flat (last exit 2026-04-09, end_unrealized 0), which looks like an end-of-backtest marking artifact. There is also a paired -13.5%/+16.3% on 2023-06-06/07. Neither changes the verdict: the return excluding the final bar is about -0.2%.

Implementation

A 50-bar LINKUSDT Bybit 4-hour Donchian breakout strategy with a fee-aware breakout buffer, midline exits, equity-relative sizing, instrument-precision quantity normalization, and minimum-notional enforcement.

Verification Results

Verify framework warm-up dispatch or use the supported configuration hook.

min_bars_required() shadows a framework method; confirm the override is dispatched.

Keep it only as an explicitly intended fee-aware variant.

The 0.15% breakout buffer adds a threshold beyond the literal hypothesis rule.

Smoke test is materially negative: 167 trades, profit factor 0.956, and average trade return -0.446%. The analyst should verify the Donchian edge in the full backtest.

Backtest Review

Sharpe
-0.21
Total return
-15.60%
Max drawdown
25.45%
Trades
167
Win rate
35.3%
Profit factor
0.89

The mechanism is implemented faithfully. Entries are closes outside the 50-bar channel with a 0.15% buffer, exits are at the midline, long and short are balanced (89L/78S), exposure is 50% (the hypothesis predicted 40-50%), and no position is flipped directly from long to short.

The sample is adequate: 167 trades over 2001 days (about 5.5 years), with no dropped entries.

It is not beta: beta is 0.01 and benchmark correlation 0.07.

Negative expectancy. avg_trade_return_pct is -0.446% against a Bybit USD-M single-leg floor of 0.15% (0.11% round trip). PF is 0.886, Sharpe -0.21 (CI -1.03 to 0.63), PSR 0.35.

The payoff structure is falsified (L142). Win rate is 0.353 and PF 0.886; avg win $2052 vs avg loss $1265 gives a payoff of about 1.6x, which is not enough for a 35% hit rate.

Only 2 of 7 calendar years were positive. The stressed-vol tercile lost 35% (Sharpe -1.39), which is the regime where a breakout should earn its money.

Suspected artifact, mechanism not verified: the final bar (2026-04-13) prints -15.44% while the strategy is flat. The last trade exited on 2026-04-09 and end_unrealized_pct is 0. There is also a paired -13.5%/+16.3% swing on 2023-06-06/07. Even with the final-bar print removed, the total return is about -0.2% over 5.5 years, so the verdict does not depend on it.

QA's edge concern was borne out. The smoke test showed PF 0.956 and avg -0.446%; the full history confirms it.

Iteration History

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

Verification failed (Layer 4 — QA review) [class=code_defect]: - [edge_concern] Sandbox performance is advisory only, but entries can occur on one-tick breakouts below Bybit trading costs. - [critical] The strategy enters on any close above the prior upper band or below the prior lower band, with no minimum breakout distance. A one-tick breakout can have expected movement below round-trip fees and impact. (line 69) — fix: Add and enforce a fee-aware breakout buffer materially above venue round-trip cost and expected impact on both long and short entries. - [warning] Quantity is hardcoded to one decimal place without using instrument size precision, checking the $5 minimum notional, or verifying the normalized quantity remains within the notional cap. (line 103) — fix: Normalize using the resolved instrument precision, reject zero-sized orders, enforce the $5 minimum, and recheck the cap after normalization.

Outcome Summary

A plain single-name 4H Donchian breakout with a midline exit on LINK had no edge after costs and lost most in high volatility, the regime where it should earn; changing the channel length or exit would only trade win rate against payoff along the same curve.

At backtest review the analyst abandoned it before optimization with failure code no_edge/negative_expectancy: the per-trade return was negative and below the 0.15% Bybit floor, and its 1.6x payoff could not carry a 35% win rate. A suspected final-bar marking artifact (-15.44% while flat) was flagged for engine review, but with that bar excluded the return was still about -0.2%, so the verdict did not change.

A long-short 50-bar Donchian channel breakout on LINKUSDT.BYBIT 4H bars: it entered on a close outside the N-bar high/low range, exited when price returned to the channel midline, and sized positions at 2% equity risk against the distance to the midline at 1x leverage.

Over about 5.5 years (2001 days, 167 trades) it returned -15.6% with Sharpe -0.21 (CI -1.03 to 0.63), profit factor 0.886, win rate 35.3%, avg_trade_return_pct -0.446% and max drawdown 25.4%. Only 2 of 7 years were positive, and the stressed-vol tercile lost 35% (Sharpe -1.39).

Analysis

在研究环境中分析唐奇安通道策略

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