Skip to content
All strategies

Strategies

ETH Spot Trailing-Anchored Long-Only Limit Grid with Per-Lot +2% Take-Profit and a Hard Grid-Floor Stop (restated from FMZ 'Python Simple Grid'; ETHUSDT.BINANCE_SPOT, 1H fill resolution, no leverage)

Outcome: Abandoned

EthSpotTrailingAnchorLotGrid1H

Outcome Summary

The strategy restated an FMZ fixed-ladder grid as an ETH spot grid with a point-in-time anchor, 2% geometric spacing (about 10x the 0.20% spot round trip), per-lot take-profits, and a floor stop to cap losses on a breakout. It never got past verification. Across 3 iterations the Layer-3 sandbox backtest kept going over the 300s limit on an 833-day 1-hour window. The developer's iteration-3 notes say per-bar cost was already O(n_nodes) and put same-day timeouts down to the runner's ParquetDataCatalog glob on a heavily loaded host. The run was abandoned with no backtest metrics, and no later stage ran.

Hypothesis

This restates the author's grid from first principles; it is not a faithful port (L167). The FMZ script builds a FIXED absolute ladder (BTC 5000-8000, $20 spacing). It rests a limit BUY at the node just below the market. When that buy fills it rests a limit SELL at node + $50, and when the sell fills the node goes back to idle. It has no stop, and orders are never cancelled. Three things in the source cannot be used as written. (1) The fixed 5000-8000 range was picked with hindsight, which is look-ahead. (2) The……Show moreShow less

This restates the author's grid from first principles; it is not a faithful port (L167). The FMZ script builds a FIXED absolute ladder (BTC 5000-8000, $20 spacing). It rests a limit BUY at the node just below the market. When that buy fills it rests a limit SELL at node + $50, and when the sell fills the node goes back to idle. It has no stop, and orders are never cancelled. Three things in the source cannot be used as written. (1) The fixed 5000-8000 range was picked with hindsight, which is look-ahead. (2) The $20/$50 spacing (~0.25%/0.7%) is below or near today's 0.20% spot round trip. (3) With no stop, a downward breakout leaves the book holding the whole ladder at a loss indefinitely. The restatement keeps the mechanism (independent node lots, each with its own take-profit, re-arming after it closes) and fixes all three. The ladder is anchored POINT-IN-TIME to the close at anchor time. Spacing is geometric at 2.0%, which is 10x the round trip. A hard floor stop liquidates the book on a breakdown. Venue choice: long-only with no leverage belongs on BINANCE_SPOT (10.8% vs the >=15% target). Spot also has no funding drag on inventory, where a long-perp grid would pay ~10%/yr. ETH is the most liquid non-BTC spot book (L136), and the spot drawdown floor is the binding risk constraint. Mechanism in one sentence, with instrument and timeframe removed: 'hold independent fixed-size limit-buy lots at geometric steps below a trailing anchor, and close each lot at its own fixed take-profit one step above its fill'. This is NOT the abandoned DOGE constant-value rebalancer. That design (a) entered only after a >=35% drawdown, (b) traded a single pooled position back to a fixed dollar value, and (c) had no floor stop. Here the grid is always armed near the market, each lot is closed individually, and losses on a breakout are capped.

Iteration 3 fixes the Layer-3 sandbox_timeout with a performance-only change; the trading logic is identical to v2. Per-bar work was already O(n_nodes<=10), with no history buffers, no supplementary data and O(1) order lookups. Other O(1) strategies timed out the same day (LtcMomentumMeanReversionRegression_v3, ConnorsRsi2IndexEtfPullbackUseq_v3), and profiling of those runs put the time in the runner's ParquetDataCatalog glob over ~126k bar dirs; the host load average is ~33. The per-bar path is still trimmed: attribute names are precomputed instead of per-field f-strings, and account equity is read only when an idle node needs arming. Under lesson L155(c), per-bar cost that grows with the span is ruled out here, so if this times out again it is a sandbox or catalog problem, not a code defect.

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

Long-only ETH spot geometric limit grid on 1H bars. The anchor is the close at anchor time. It trails up only while the book is flat and never moves while lots are held. Nodes k=1..5 rest GTC limit BUYs at anchor*(1-2%)^k, each for 18% of equity. Each filled lot gets its own limit SELL at fill*(1+2%). The node re-arms once that sell fills. If a bar closes below the grid floor (the last node minus one step), the strategy cancels all orders, market-sells the inventory and pauses for 24h before re-anchoring.

Verification Results

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

Trimming a strategy's per-bar code does not fix a sandbox timeout whose likely cause is outside that code (the iteration-3 notes blame the runner's catalog glob on an overloaded host), so an infrastructure-caused timeout should be confirmed and escalated before iterations are spent on code changes.

After 3 iterations it was abandoned in the verification loop, because the Layer-3 sandbox backtest went over the 300s wall-clock limit on a ~20,000-bar (833-day) ETHUSDT.BINANCE_SPOT 1-hour window. Backtest review, analyst, and risk review were never reached.

A long-only, unleveraged ETHUSDT spot limit grid on BINANCE_SPOT (1H fill resolution): independent fixed-size limit-buy lots at geometric 2% steps below a point-in-time trailing anchor, each closed at its own +1-step take-profit, with a hard grid-floor stop that liquidates the book on a breakdown. It restates the FMZ 'Python Simple Grid' without that script's hindsight-picked range, sub-fee spacing, and missing stop.

No performance numbers exist: the backtest report is empty and there is no optimization report, so the strategy never produced a return, Sharpe, or trade count.

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