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
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.
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.