Momentum & trend following
For cTAs, trend followers, growth PMs
Rank leaders, spot fresh highs and test channel breakouts over 15 years with the same function code that runs the live screen, so what you backtest is what you trade.
- Financial markets
- 7 steps
- Runs on live data
How EquationDB answers it
Each step is one query on live data. Run them in order, or open any one and adapt it: change the symbol, the station, the dates or the filter.
Three-month leaders still trending
The top 25 names by three-month return that are still above their 50-day average.
GET top500 SELECT symbol, sector, roc(63) AS m3, rank(m3) AS rk WHERE rk <= 25 AND close > sma(50) SORT rk
Relative-strength ratings
A 1–99 relative-strength rating from weighted 3/6/9/12-month returns for every stock in the top 500.
ANALYZE rel_strength top500
Fresh 52-week highs in large caps
This week's new highs above $20B, ranked by how far the breakout cleared the prior high for that stock.
EVENTS new_high_252 IN top500 LAST 5d WHERE mcap > 20e9 SORT rarity DESC
Daily pullback, weekly uptrend
A multi-timeframe entry: weak on the daily chart, strong on the weekly, in a long-term uptrend.
GET top500 SELECT symbol, close, rsi(14) AS rsi_d, rsi(14)@1w AS rsi_w WHERE rsi(14) < 40 AND rsi(14)@1w > 55 AND close > sma(200) SORT rsi_d
Turtle-style channel breakout
A 55/20-day channel system across the top 500 since 2010, with trade statistics and a portfolio curve against SPY.
BACKTEST IN top500 SINCE 2010-01-01 ENTER WHEN close CROSS ABOVE highest(high, 55)[-1] EXIT WHEN close < lowest(low, 20)[-1]
Trend quality of the leaders
Trend score, R² of the log-price trend, ADX and moving-average alignment: which leaders trend cleanly and which only look strong.
ANALYZE trend (NVDA, AAPL, MSFT, AMZN, META, GOOGL, AVGO, TSLA)
Supertrend flips in large caps
Fresh trend-following buy signals in companies above $50B (takes up to ~5 s).
EVENTS supertrend_flip_up IN top500 LAST 5d WHERE mcap > 50e9
Run it on your own question
Sign in and press Try it on any step, or ask for a short demo on your data.
More financial markets use cases
- Morning briefingPortfolio managers, heads of trading, desk strategists
- Mean reversion & short-term reversalShort-term traders, stat-arb desks
- Event-driven tradingEvent-driven PMs, special-situations traders
- Earnings tradingEarnings traders, fundamental L/S analysts
- Volatility & regime tradingVolatility traders, options desks, risk-premia PMs
- Market timing & breadthMacro PMs, asset allocators, tactical strategists