Strategies
King Keltner (Raschke) Channel Breakout, Slope-Confirmed, Long-Short, Exit on Midline Recross, restated on a 4H clock (ETHUSDT.BYBIT 4H, pure OHLCV, author's 20/50 defaults)
Outcome: Abandoned
EthBybitKingKeltnerBreakout4H
Outcome Summary
EthBybitKingKeltnerBreakout4H restated the FMZ King Keltner breakout (a slope-confirmed EMA midline with ATR bands, long and short, exiting on a midline recross) on ETHUSDT.BYBIT 4H. The 4H clock was chosen after a pre-study showed the 1H version could not cover fees. The code never passed Layer 3 sandbox verification: the smoke test repeatedly ran past the 300s limit on a ~20,000-bar window. After 3 iterations, including a rewrite of the ATR as an O(1) rolling sum, the run was abandoned before backtest review, optimization, analysis or risk review, so the edge was never measured inside the factory.
Hypothesis
Iteration 3 fixes the Layer-3 sandbox_timeout. The only per-bar loop under the strategy's control was the 50-bar true-range sum used to rebuild the ATR on every bar. It is now a rolling scalar sum: add the newest TR and subtract the TR leaving the window, with a one-time O(atr_len) re-seed on the first bar or after a gap. That makes per-bar cost O(1). The EMA midline was already incremental, so there are no history rescans and no supplementary feeds. Entry, exit, signal and sizing logic are byte-for-byte unchanged, so Layers 1 and 2 stay green. The code was already about 50 float ops per bar on ~12k bars, so if the timeout recurs the likely cause is harness or engine load rather than strategy compute.
verification_loop: sandbox_timeout: Verification failed (Layer 3 — sandbox backtest): smoke test exceeded the 300s wall-clock limit on a ~20000-bar window (2400 days of ETHUSDT.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).
Implementation
King Keltner (Raschke) channel breakout on ETHUSDT.BYBIT 4H. Midline = EMA(typical price, 20); band = +/-1.0 x SMA(TrueRange, 50). Long when the midline is rising and the close is above the upper band; short when the midline is falling and the close is below the lower band. Exit on a close back across the midline. The signal is the close's distance from the midline in ATR units. Sizing is 0.9 x equity notional at 1x.
Verification Results
sandbox_timeout: Verification failed (Layer 3 — sandbox backtest): smoke test exceeded the 300s wall-clock limit on a ~20000-bar window (2400 days of ETHUSDT.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).
Outcome Summary
Any per-bar cost that grows with history makes the sandbox time out before the signal is ever tested, so every indicator should be written as O(1) incremental state from the first iteration, and any base-class history handling (such as the self._bars buffer) should be checked as a possible remaining bottleneck.
After 3 iterations the strategy was abandoned in a verification loop. Layer 3 (sandbox backtest) failed with sandbox_timeout: the smoke test ran past the 300s wall-clock limit on a ~20,000-bar window (2400 days of ETHUSDT.BYBIT 4H). This happened even though iteration 3 had replaced the per-bar ATR loop with an O(1) rolling sum.
A King Keltner (Raschke) channel breakout on ETHUSDT.BYBIT 4H, pure OHLCV: long when the EMA(typical price, 20) midline is rising and the close is above mid + 1.0x SMA(TrueRange, 50), short on the mirror condition, and exit when the close recrosses the midline; the clock moved from 1H to 4H because the researcher's own pre-study found the 1H version fee-dead.
No factory performance numbers exist, because the backtest report is empty and no optimization ran. The only figures come from the hypothesis's own pre-study, which reported net +0.38% per trade on longs and +0.39% on shorts for ETHUSDT 4H, and -0.14% to 0.00% net per trade (PF 0.82-1.00) for the 1H version.
Backtest and paper results are hypothetical. Trading involves risk of loss.