SPY trim-below-EMAs, rebuy near the 50-day (a cautionary test)
Sell SPY when it loses its 8/21-day EMAs and buy back near the 50-day SMA. The poster found it trailed buy-and-hold.
What they did
Babyfolio backtested trimming SPY when price fell below the 8- and 21-day EMAs, then buying back near the 50-day SMA, with and without also buying EMA recoveries. The test ran 1993–2026 including dividends.
How it went
Babyfolio's claims: the tested versions returned about 7–8% annualized versus about 10.9% for buy-and-hold, with smaller drawdowns. Cash earned 0%, and fees and taxes were excluded.
Sources:
Worth knowing
- This is here as a benchmark lesson: smaller drawdowns, but it lagged simply holding.
- Taxes on frequent trims would widen the gap in a taxable account.
- Ask the agent to compare against buy-and-hold every month, not just total P&L.
The prompt
I hold SPY as a core position of $[amount] in my paper account.
Daily after the close:
- If SPY closes below BOTH its [8]-day and [21]-day EMAs, propose trimming [50]% of the position.
- If I'm trimmed and SPY trades within [1]% of its [50]-day SMA, propose buying back to the full position.
- [Optional] If SPY closes back above both EMAs, propose buying back.
Every month, report my result versus simply holding SPY, with dividends counted.
SAFETY DEFAULTS (keep unless you deliberately change them):
- Use the PAPER trading account only. Never touch a live account.
- Before every order, show me: symbol, side, size, order type, limit price, stop, and the rule that triggered it. Then WAIT for my "approve".
- Hard limits: max [$500] per trade, max [3] open positions, stop all trading for the day after a loss of [$300].
- Log every signal, decision and fill to [a running log / spreadsheet] with timestamps.To go fully autonomous: (1) run on paper for at least [4–8 weeks] or [30+ trades]; (2) delete the 'WAIT for my approve' line and keep the hard limits; (3) switch to live keys or account. On Robinhood, turn off trade approvals in your agent settings, but note that some orders can still require in-app approval or acknowledging a pre-trade alert, so unattended execution isn't guaranteed for every order. IBKR's AI connector always asks for approval; use its regular API for unattended trading. Never remove the daily loss limit.