Strategies
Double 7s (Connors/Alvarez via pinkfish, Farrell Aultman) - SPY Daily Close-at-7-Day-Low Buy / Close-at-7-Day-High Sell, SMA200-or-SMA70 Regime Filter, 15% Stop, 2x Reg-T - Faithful Port on USEQ
Outcome: Abandoned
SpyDouble7sPinkfishUseq
Outcome Summary
SpyDouble7sPinkfishUseq attempted a long-only daily SPY mean-reversion approach based on 7-day closing lows and highs, with regime filtering and a stop-loss. It produced no backtest or optimization results because verification failed at Layer 1. After four iterations, the run was abandoned when static analysis identified `_bar_ts` method shadowing; later pipeline stages were not reached.
Hypothesis
Keeps the pre-registered period=7, SMA=70, regime SMA=200, 15% stop, and 2x Reg-T rules unchanged. Iteration 4 only hardens execution: entries are sized from remaining buying power with impact room, and same-bar plus cached open/in-flight guards prevent duplicate entry submissions. The secondary no-stop variant remains separately pre-registered through stop_loss_pct=1.0; no rule variant is mixed into this primary.
verification_loop: Verification failed (Layer 1 — static analysis): - `self._bar_ts = ...` binds a value over framework method `_bar_ts(cls, bar)` — every later call raises "'<type>' object is not callable" (or the framework loses the member). Use a different attribute name. (line 42) - `self._bar_ts = ...` binds a value over framework method `_bar_ts(cls, bar)` — every later call raises "'<type>' object is not callable" (or the framework loses the member). Use a different attribute name. (line 32)
Implementation
Faithful long-only SPY daily Double 7s mean-reversion translation: buy a 7-day closing low when above the 70-day or 200-day regime average, then sell at a 7-day closing high or the 15% anchored stop.
Verification Results
Verification failed (Layer 1 — static analysis): - `self._bar_ts = ...` binds a value over framework method `_bar_ts(cls, bar)` — every later call raises "'<type>' object is not callable" (or the framework loses the member). Use a different attribute name. (line 42) - `self._bar_ts = ...` binds a value over framework method `_bar_ts(cls, bar)` — every later call raises "'<type>' object is not callable" (or the framework loses the member). Use a different attribute name. (line 32)
Leave as-is for a faithful port. The risk reviewer should note that drawdown is dominated by leverage × stop distance.
Position sizing is equity*0.97*2.0 (about 1.94x gross), and the only risk cap is the 15% close-based stop. A stop-out, or a gap through it on daily bars, costs about 29% of equity or more in one trade. This matches the source's margin=2 and is capped at Reg-T 2x with a flat state, so it is not the L148 never-flat compounding pattern. Worst-case gross is 1.94x equity, which is at or below the USEQ max leverage of 2.0.
None required.
Exact float equality c == min/max(window). The window includes today, so this is exact and matches the source. If all 7 closes are identical, both _at_low and _at_high are true. The strategy would then enter and exit on the next bar that is also at the high, which is a harmless degenerate case.
Analysis
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 SPY.USEQ-1-DAY-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
Avoid naming instance attributes after framework methods, and verify generated strategy code against the framework API before backtesting.
It was abandoned after four iterations because Layer 1 static analysis found that the instance attribute `_bar_ts` shadowed the framework method `_bar_ts(cls, bar)`, causing later calls to fail.
A long-only SPY.USEQ daily mean-reversion strategy that buys closes at 7-day lows and sells at 7-day highs, with an SMA regime filter and stop-loss.
No backtest report or performance metrics were produced. The strategy did not progress beyond verification.
Abandon Reason
verification_loop: Verification failed (Layer 1 — static analysis): - `self._bar_ts = ...` binds a value over framework method `_bar_ts(cls, bar)` — every later call raises "'<type>' object is not callable" (or the framework loses the member). Use a different attribute name. (line 42) - `self._bar_ts = ...` binds a value over framework method `_bar_ts(cls, bar)` — every later call raises "'<type>' object is not callable" (or the framework loses the member). Use a different attribute name. (line 32)
Analysis
double-7s
Backtest Review
- Sharpe
- 0.15
- Total return
- 4177.01%
- Max drawdown
- 35.73%
- Trades
- 314
- Win rate
- 73.6%
- Profit factor
- 1.56
Backtest and paper results are hypothetical. Trading involves risk of loss.