Hypotheses
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
Faithful translation of the pinkfish 'double-7s' example strategy by Farrell Aultman (MIT licence,…
Strategies
- SpyDouble7sPinkfishUseq Abandoned
Hypothesis
Faithful translation of the pinkfish 'double-7s' example strategy by Farrell Aultman (MIT licence, https://github.com/fja05680/pinkfish/blob/18a0d557ead25e0e82de3ece86bcab6c325a59ed/examples/strategies/double-7s/strategy.py). The strategy comes from Larry Connors & Cesar Alvarez, 'Short Term Strategies that Work'. Credit goes to the author and the book. Instrument: SPY.USEQ (the source's own symbol), DAILY bars, long-only, one position at a time. The venue keeps the source's economics: the ETF it was designed……Show moreShow less
Faithful translation of the pinkfish 'double-7s' example strategy by Farrell Aultman (MIT licence, https://github.com/fja05680/pinkfish/blob/18a0d557ead25e0e82de3ece86bcab6c325a59ed/examples/strategies/double-7s/strategy.py). The strategy comes from Larry Connors & Cesar Alvarez, 'Short Term Strategies that Work'. Credit goes to the author and the book. Instrument: SPY.USEQ (the source's own symbol), DAILY bars, long-only, one position at a time. The venue keeps the source's economics: the ETF it was designed for, commission-free US equity execution (~0.02-0.05% RT spread+impact modelled) and Reg-T 2x margin, which matches the source's margin=2. This makes it an exception to lesson 167: the port does not need to change its cost regime, because USEQ IS the regime it was written for. USEQ is 2.5% of the corpus and the mechanism is short-horizon ETF mean reversion, which is not a crypto re-mine. PARAMETERS, the values in the source's main() and strategy.ipynb (the configuration the author actually runs): period=7, sma=70, stop_loss_pct=0.15, margin=2 (leverage 2.0), use_regime_filter=True, use_adj=False. The module-level default_options differ: stop_loss_pct=1.0 (the stop sits at price 0, so it is effectively no stop), margin=1, sma=200, and everything else is the same. Pre-register the default_options set as a SECONDARY variant scored separately. Do not optimise between the two. INDICATORS, all on the daily CLOSE series only (the source drops open/high/low): (1) regime = pinkfish CROSSOVER(fast=1, slow=200). It is positive while close > SMA(close,200), so regime>0 is equivalent to close > SMA200. (2) sma = SMA(close, sma=70). (3) period_high = rolling max of CLOSE over the last 7 bars INCLUDING today. (4) period_low = rolling min of CLOSE over the last 7 bars INCLUDING today. Warm-up: no trading until all indicators are defined, i.e. at least 200 bars (the source uses dropna=True). Data note: our USEQ prices are split-adjusted and dividends are not in PnL. The source uses use_adj=False on raw closes, which also excludes dividends, so the PnL basis is consistent. Expected flat state: in the market roughly 25-35% of days, flat the rest of the time.
Analysis
double-7s
Backtest and paper results are hypothetical. Trading involves risk of loss.