STRATEGY LIBRARY
Trading strategy backtests
Saved backtests on real past prices, each shown against SPY. Every one was run by the same engine and tools the chat uses. Open one to replay its trades.
Showing 81 of 81 strategies.
ADX trend-strength filterSPY 50 day uptrend, only while ADX(14) > 25. ADX built from basic steps.TREND→ ATR breakout / ATR stopQQQ one-day gain larger than ATR(14); 2 ATR stop and 3 ATR target from entry.VOLATILITY→ 60/40 balanced portfolioSPY 60% / TLT 40%, rebalanced on the first session of each month.ALLOCATION→ Bollinger %B mean reversionSPY %B below 0.05, exit above 0.8.BOLLINGER→ Bollinger band walk (trend)QQQ band walk: enter on a close above the upper band, stay long until a close below the middle band.BOLLINGER→ Bollinger lower-band bounceSPY close below lower Bollinger band, exit at middle band.MEAN REVERSION→ Bollinger lower-band bounce (classic)QQQ buy at the lower band, sell at the upper band.BOLLINGER→ Bollinger + RSI combinationQQQ close below the lower band AND RSI(14) under 35; exit at the middle band.BOLLINGER→ Bollinger squeeze breakoutSPY squeeze: band width near its 6 month low in the last 5 days, then a close above the upper band.VOLATILITY→ Bollinger upper-band breakoutSPY close above the upper Bollinger band, exit below the middle band.BREAKOUT→ Buy-the-dip below the 50-day MASPY buy a close below the 50 day average, exit back above.MEAN REVERSION→ Chandelier ATR trailing exitSPY crosses above its 200 day average; Chandelier exit 3 ATR(22) below the highest high since entry.VOLATILITY→ Classic pairs trading (long/short)KO / PEP pair: two sleeves. Below -2 z: long KO, short PEP. Above +2 z: short KO, long PEP. Exit at z = 0.PAIRS→ Consolidation breakoutSPY breaks above a 20 day range that was under 4% wide; exit on a 10 day low.BREAKOUT→ Cross-sectional momentum factor, long/shortNine sectors: long top 2, short bottom 2 by 12 month return (two sleeves).FACTOR→ Cross-sectional momentum, top decileNine sector ETFs: each month hold the one with the best 12 month return (top decile of a small universe).MOMENTUM→ Defensive sector rotationMonthly: SPY above 200 day average holds SPY; below it, hold XLP, XLU and XLV equally.ROTATION→ Donchian channel breakout (standalone)SPY Donchian: close above prior 20 day high, exit below prior 10 day low.TREND→ TSLA daily dropBuy after a 5 percent daily drop. Use a close-based 2 percent target and 5 percent stop.MEAN REVERSION→ Dual momentum (absolute + relative)Dual momentum: SPY vs EFA by 12 month return; hold the winner only if it beats BIL, else hold BIL.MOMENTUM→ Equal-weight permanent / all-weather-style basket (static)SPY, TLT, GLD and DBC bought once in equal weight and held.ALLOCATION→ 52-week-high momentumMSFT within 2% of its 52 week high; exit when 10% below it.MOMENTUM→ Fixed-resistance breakoutSPY breaks above $300 in 2019 to 2020, 8% close stop.BREAKOUT→ Gap-and-go (intraday)SPY 5 minute bars: open gaps up over 0.5% on the first bar; buy, exit near the close.GAP→ Gap fade / gap fillSPY 5 minute bars: short an opening gap up over 0.5%, cover at the prior close or near the end of the day.GAP→ Golden cross (50/200 MA crossover)SPY 50/200 day cross.TREND→ Ichimoku Cloud trendSPY Ichimoku: spans shifted 26 sessions; long above cloud, exit below cloud.TREND→ January effectIWM held through January each year.CALENDAR→ Keltner channel breakoutSPY close above Keltner upper (20 EMA + 2 ATR10), exit below the EMA.VOLATILITY→ Long-only relative-value pair (ratio cross)Long XLK when the XLK / XLU ratio crosses above its 50 day average.PAIRS→ Low-volatility factor, long/shortNine sectors: long the 2 calmest, short the 2 most volatile by 60 day volatility.FACTOR→ Low-volatility stock selectionNine sector ETFs: each month hold the 3 with the lowest 60 day volatility.VOLATILITY→ MACD divergenceSPY bullish MACD divergence: a new swing low of price (5 bars each side) is lower than the one before, while MACD at that low is higher. Exit after 20% gain or 8% loss.MACD→ MACD histogram momentumSPY MACD histogram turns positive while rising; exit when it turns negative.MACD→ MACD + RSI combinationSPY MACD signal cross confirmed by RSI(14) above 50.MACD→ MACD signal-line crossoverSPY MACD(12,26,9) signal line cross.MACD→ MACD zero-line crossoverSPY MACD zero line cross.MACD→ Momentum + MA filterSPY: 6 month return positive AND price above 200 day average.MOMENTUM→ Momentum threshold crossQQQ 20 day return crosses above +5%, exit when it crosses below 0.MOMENTUM→ Moving-average ribbonSPY ribbon 10/20/30/40/50, all stacked and price above the fastest.TREND→ Moving-average slope trendSPY long while the 50 day average rises.TREND→ Opening-range breakoutSPY 5 minute bars: buy a break above the high of the first 30 minutes; exit near the close.BREAKOUT→ TSLA and SPY ratioTrade the Tesla to SPY ratio against its 20 day average.RELATIVE VALUE→ Pairs ratio mean reversion, long leg onlyKO / PEP ratio z below -2: buy KO only, exit at z = 0.PAIRS→ Price above/below 200-day MASPY price vs 200 day average.TREND→ Rate-of-change (ROC) momentumQQQ 6 month rate of change crosses above zero.MOMENTUM→ Relative strength vs SPYMSFT / SPY ratio above its 50 day average.MOMENTUM→ Risk parity (inverse-volatility / equal risk contribution)SPY, TLT and GLD weighted each month by inverse 60 day volatility, so each holds about the same risk. No leverage.ALLOCATION→ Monthly top two rotationEach month, hold the top two names by 20 day return.ROTATION→ TSLA RSIBuy on an RSI cross below 30. Sell on a cross above 70.MEAN REVERSION→ RSI 50-line trendSPY RSI(14) crosses 50.RSI→ RSI divergenceSPY bullish RSI divergence: a new swing low of price (5 bars each side) is lower than the one before, while RSI at that low is higher. Exit after 20% gain or 8% loss.RSI→ RSI + MA filterQQQ RSI(14) under 35 only above the 200 day average; exit RSI over 55.RSI→ RSI overbought/oversold swing (30/70)QQQ RSI(14) below 30 buy, above 70 sell.RSI→ RSI oversold bounce (RSI < 30)SPY RSI(14) below 30, exit above 50.MEAN REVERSION→ RSI range rules (bull 40–80 / bear 20–60)SPY RSI ranges: above 200 day, buy RSI under 40 and sell over 80; below it, buy under 20 and sell over 60.RSI→ Santa Claus rallySPY bought from December 24, sold from January 3.CALENDAR→ QQQ seasonal strategyHold QQQ from November to May, then stay in cash. Replay its historical signals and fills.CALENDAR→ Sector momentum rotationNine sectors: each month hold the top 3 by 6 month return.ROTATION→ Sector relative-strength rotationNine sectors: each month hold the 3 whose ratio to SPY rose most over 3 months.ROTATION→ Sell in May / Halloween effectSPY held November to April.CALENDAR→ Short-term oversold bounceQQQ 5 day fall below -10%, 5% target, 5% stop on closes.MEAN REVERSION→ Size factor (SMB), long/shortETF proxy: long IWM (small caps), short SPY (large caps), held. Not a ranked market-cap universe.FACTOR→ Static equal-weight sector basketNine sector ETFs bought once in equal weight and held (sleeves).ROTATION→ Statistical arbitrage (multi-pair)Three daily pairs as long/short sleeves (20 day z-score). Real stat arb uses many pairs and intraday speed.PAIRS→ Stochastic oversold bounce (%K < 20)SPY stochastic: %K below 20 crossing above %D, exit above 80.MEAN REVERSION→ Supertrend trend followingSupertrend(10, 3): bands at mid price plus or minus 3 ATR that only move toward price until price closes through them. Long while price is above.TREND→ Tactical trend asset allocationMonthly: hold SPY above its 200 day average, otherwise hold TLT.ALLOCATION→ Trailing-stop trend followingTrailing stop: exit when price falls 8% of the current close below the highest high since entry. The rule says highest close.TREND→ Triple MA crossover (5/20/50)QQQ 5/20/50 stacked averages, AND signal.TREND→ Turn-of-the-month effectSPY bought from the 26th, sold from the 4th of the next month.CALENDAR→ Turtle breakoutBuy a 20 day high breakout. Use range-based sizing, adds, and a stop.BREAKOUT→ Turtle trend following (System 1/2)QQQ Turtle System 1: 20 day high entry, 10 day low exit, 2 ATR stop, ATR risk sizing, adds every 0.5 ATR up to 4 units.TREND→ 12-month momentum (absolute)SPY long while 12 month return is positive.MOMENTUM→ Value factor (HML), long/shortETF proxy: long IWD (value), short IWF (growth), held. Not a book-to-market sort.FACTOR→ VIX-spike mean reversion (buy equities on fear)Buy SPY when VIXY jumps 30% above its 20 day average; hold 10 days via a 3% target or 5% stop.VOLATILITY→ Volatility targetingSPY sized each month to target 15% yearly volatility from 20 day volatility, at most 100%.VOLATILITY→ Volume-confirmed breakoutSPY 20 day breakout only on volume above 1.5x its 50 day average; exit on a 10 day low.BREAKOUT→ VWAP mean reversion (intraday)SPY 5 minute bars: session VWAP from session sums; buy below VWAP, sell back above it or near the close.MEAN REVERSION→ Williams %R oversold bounceSPY Williams %R(14) below -80, exit above -20.MEAN REVERSION→ Z-score mean reversionSPY 20 day z-score below -2, exit at 0.MEAN REVERSION→
Risk warning
Past results do not predict future returns. Not investment advice.