Skip to content
All hypotheses

Hypotheses

pinkfish Follow-Trend (Farrell Aultman), faithful port: buy when the daily close is above its 200-day SMA while the S&P 500 (^GSPC) closes above its own 200-day SMA; sell on a close below the SMA or when the S&P regime turns negative. Applied separately to 8 US index/asset ETFs, equal 1/8 sleeves, next-open fills (USEQ 1-DAY, long-only)

Faithful port of the open-source pinkfish example 'follow-trend' by Farrell Aultman (MIT, github.com/fja05680/pinkfish, examples/strategies/follow-trend/strategy.py). Credit goes to the author. Any performance the…

Hypothesis

Faithful port of the open-source pinkfish example 'follow-trend' by Farrell Aultman (MIT, github.com/fja05680/pinkfish, examples/strategies/follow-trend/strategy.py). Credit goes to the author. Any performance the source claims is unverified; our backtest with real costs decides. SOURCE RULES (kept exactly): per security, on each daily bar: sma = SMA(close, sma_period=200); upper_band = sma*(1+percent_band/100); lower_band = sma*(1-percent_band/100), with percent_band=0 so both bands equal the SMA. regime =……Show moreShow less

Faithful port of the open-source pinkfish example 'follow-trend' by Farrell Aultman (MIT, github.com/fja05680/pinkfish, examples/strategies/follow-trend/strategy.py). Credit goes to the author. Any performance the source claims is unverified; our backtest with real costs decides. SOURCE RULES (kept exactly): per security, on each daily bar: sma = SMA(close, sma_period=200); upper_band = sma*(1+percent_band/100); lower_band = sma*(1-percent_band/100), with percent_band=0 so both bands equal the SMA. regime = pinkfish CROSSOVER(^GSPC, fast=1, slow=200): positive when the S&P 500 index close is above its 200-day SMA, negative when it is below. SELL first: if long and ((use_regime_filter and regime<0) or close<lower_band or last bar of data), sell the whole position. Otherwise, if flat: BUY if (regime>0 or not use_regime_filter) and close>upper_band. The source runs one symbol per Strategy instance, each instance putting all of its own capital in that symbol ('applied separately to several securities'); balances are recorded after each bar. Bars with NaN indicators (the first 200 days) are dropped, so no trading happens before both SMAs exist. PLATFORM ADAPTATIONS (only venue, instrument, sizing, fees, execution): (1) Execution: pinkfish fills at the signal bar's close. Our session venue cannot fill at the deciding bar's close (registry: same_close_fill unsupported); every decision made on a daily close fills as a market order at the NEXT session's OPEN (next_open_fill, supported). This is the documented substitution and is the only change to the timing. The edge claimed is a multi-month trend, not an overnight return, so the test is still meaningful. (2) Universe: 'several securities' is a free choice in the source. We use 8 long-history, survivorship-free ETFs, each run as an independent sleeve: SPY, QQQ, DIA, IWM, EFA, EEM, TLT, GLD (all .USEQ). (3) Regime source: the source fetches ^GSPC; we read ^GSPC.USEQ 1-DAY bars as a signal-only extra instrument (never traded). Regime is evaluated on the same session date as the traded bar; if the ^GSPC bar for that date is missing, keep the previous regime value. (4) Sizing: each sleeve stands for the source's separate account: at entry, buy whole shares worth 1/8 (12.5%) of current account equity at the decision close price; no leverage (gross at most 100%), no pyramiding, one position per symbol. (5) Prices: our USEQ bars are split-adjusted and dividends are not in PnL; the source default use_adj=False uses unadjusted prices. Split-adjustment is a needed change (unadjusted splits would fake crossings); the missing dividends are a known understatement for TLT/SPY and the like. (6) Costs: USEQ zero commission plus modeled spread/impact (~0.02-0.05% RT). (7) The 'end of data' sell becomes: close every open position on the final bar of the backtest window (the platform's window-end flattening is equivalent). Risk control is route (b): signal exits (close below SMA, S&P regime turns negative) plus capped sizing (12.5% per position, at most 100% gross); the source has no stop and none is added.

Analysis

follow-trend

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