VALYNOXSTRATEGY RESEARCH TECHNOLOGY
AlphaPrimeAlphaPrime
ACADEMY / Strategy generation

S&P 500 futures trading strategies: rule types you can backtest

Most ES strategies are trend-following, mean-reversion or breakout rules. Each depends on a different market behaviour, so test them with real costs, a fixed session and out-of-sample data before trusting any result.

By · Published · updated · Editorial policy

Contents
  1. What strategy types do traders use on S&P 500 futures?
  2. Trend-following rules
  3. Mean-reversion rules
  4. Breakout rules
  5. Which session and bar size should an ES strategy use?
  6. How much do costs and slippage take from ES and MES trades?
  7. How do you validate an ES strategy with walk-forward and out-of-sample data?
  8. Why does no strategy type work in every market regime?
  9. Frequently asked questions
  10. References

Most S&P 500 futures trading strategies fall into three rule families: trend-following, mean-reversion and breakout. Each relies on a different market behaviour, so none works in every regime. To test one rigorously on ES or MES, fix the session and bar size, include commission and slippage, and judge it only on out-of-sample and walk-forward results.

What strategy types do traders use on S&P 500 futures?

Almost every rule-based ES strategy belongs to one of three families, and knowing the family tells you what its results should look like. ES is the E-mini S&P 500 futures contract traded at CME Group. MES is the Micro E-mini version, one tenth of the size. Both follow the same index, so the same rules can be tested on either. For contract details and the difference between the two, see S&P 500 futures explained: ES vs MES. Every rule type here is a form of algo trading, and the wider menu is in futures algo trading strategies.

Trend-following rules

A trend-following rule is a rule that buys after prices have risen and sells after they have fallen, betting that the move continues. Typical examples are a close above the highest high of the last N days, or a fast moving average crossing above a slow one. These rules usually run on 60-minute or daily bars. Expect many small losses and a few large winners. The win rate is often below half, and the result depends on not cutting the big trends short.

Mean-reversion rules

A mean-reversion rule is a rule that buys after a sharp drop and sells after a sharp rise, betting that price returns towards a recent average. An example: buy when the close falls well below its 20-bar average, exit when it gets back to that average. These rules often run on intraday bars. Expect the opposite profile: many small wins and occasional large losses when a drop keeps going. A stop or a time exit decides how deep those losses get.

Breakout rules

A breakout rule is a rule that enters when price leaves a defined range, such as the high and low of the first 30 minutes after the US stock market opens at 9:30 a.m. New York time. It sounds close to trend-following, but it works on a shorter time scale and usually closes the trade the same day. Entries often use stop orders, so breakout rules are the most sensitive of the three to slippage. The slippage setting in the backtesting of AlphaPrime (Valynox) lets you raise the cost on those stop-order entries and see whether a breakout rule still holds up.

Rule familyMarket behaviour it needsTypical bar sizeTypical trade profileWhat hurts it most
Trend-followingMoves that continue for days or weeks60-minute to dailyLow win rate, large winnersSideways markets with repeated false starts
Mean-reversionSharp moves that partly reverse5- to 30-minuteHigh win rate, occasional large lossStrong one-way moves, such as a crash
BreakoutFollow-through after a range is broken1- to 15-minuteMixed; depends on the exitSlippage on stop entries and quiet days
Three rule families enter on different price movements: trend-following bets a move continues, mean-reversion bets a sharp move reverses towards the average, and breakout bets on price leaving a range Three rules, three entries What each one bets on Trend-following Bets the move continues Mean-reversion Bets the move reverses Breakout Bets on leaving a range
Each rule family enters on a different kind of price movement, which is why each one does well and badly in different markets.

Which session and bar size should an ES strategy use?

Choose the session that matches when you will trade, then pick the largest bar size that still gives the rule enough trades. ES trades on CME Globex almost around the clock: Sunday to Friday, 6:00 p.m. to 5:00 p.m. New York time, with a one-hour daily break from 5:00 to 6:00 p.m. Many traders also build day-session bars from 9:30 a.m. to 4:00 p.m. New York time, the regular hours of the US stock market. Exchanges can change trading hours and contract specifications, so the CME Group contract page is the final word on both. Use the futures market hours tool to see the hours in your own time zone.

The session changes the data itself. A full-session daily bar includes the overnight move. A day-session bar starts with a gap at 9:30 a.m. A rule tested on one session and traded on the other is a different strategy. The overnight session also has thinner order books, so assume more slippage for trades taken there.

Bar sizeTrades per yearCosts as a share of the average tradeBest suited to
1- to 5-minuteHighLargeBreakouts and short intraday reversals
15- to 60-minuteMediumModerateSlower intraday reversals and short swings
DailyLowSmallTrend-following and multi-day reversals

Smaller bars give more trades, which makes the statistics more reliable. They also shrink the move per trade, so costs take a larger share. Daily bars give few trades per year, so you need a long history to judge them.

Three bar sizes compared: 1- to 5-minute bars give many trades but the same fixed cost takes a large share of a small average move, 15- to 60-minute bars sit in the middle, and daily bars give few trades where the cost is a small share of a large move Small bars pay more cost Same cost per trade, by bar size Cost Avg move Trades 1–5 min High 15–60 min Medium Daily Low Small bars: cost is a bigger share. So: check cost vs average trade.
Smaller bars give more trades per year, but the cost takes a larger share of each trade's move.

How much do costs and slippage take from ES and MES trades?

Costs decide whether a short-term ES strategy survives, and on MES they take more of each point than on ES. Slippage is the gap between the price a backtest assumes and the price you really get. ES moves in ticks of 0.25 index points. One tick is worth $12.50 on ES and $1.25 on MES. The futures contract calculator shows tick and point values and the profit or loss of a trade.

Compare the cost of a trade with the average trade in index points, because points are the same on both contracts:

Round-trip cost in points = C ÷ V + 2 × S × 0.25

Here C is your commission and fees per round trip in dollars, V is the point value ($50 for ES, $5 for MES), S is the slippage you assume in ticks on each side, and 0.25 is the tick size in points.

Hypothetical example

Assume a broker charges $5 per round trip on ES and $1.50 on MES, and you assume one tick of slippage on each side. On ES the cost is 5 ÷ 50 = 0.1 points of commission plus 0.5 points of slippage, so 0.6 points ($30). On MES it is 1.50 ÷ 5 = 0.3 points plus 0.5 points, so 0.8 points ($4). A rule that gains 1.5 points per trade before costs keeps 0.9 points on ES but only 0.7 points on MES. Same signals, same trades, a different result.

Hypothetical round-trip cost in index points: ES pays 0.1 points of commission plus 0.5 points of slippage, 0.6 points in total; MES pays 0.3 points of commission plus the same 0.5 points of slippage, 0.8 points in total MES costs more per point Round trip in points, hypothetical Commission Slippage ES 0.6 pts MES 0.8 pts Commission doesn't shrink tenfold. So: test with your contract's costs.
In the hypothetical example, a round trip costs 0.6 points on ES and 0.8 points on MES, because commission does not shrink as much as the contract.

For market and stop orders during the day session, one tick per side is a common starting assumption on ES. Use more for overnight trades and for entries at the open or around scheduled news. Then rerun the test with double the slippage. More on this in trading costs in backtests.

How do you validate an ES strategy with walk-forward and out-of-sample data?

Judge an ES strategy only on data that was not used to choose it. In-sample data is the part of the history used to choose rules and parameters. Out-of-sample data is the part held back and used only to test the final choice. Walk-forward analysis is a test that repeats this split many times: it optimizes on one window, tests on the next one, moves forward and joins the test windows into one result. The walk-forward analysis guide explains how to choose the window lengths.

Walk-forward timeline of ES history: four staggered windows, each optimized in-sample and then tested on the next out-of-sample window; the test windows join into one result, and the most recent years are held back until the final run Test only on unseen data Walk-forward on ES history Optimize (IS) Test (OOS) Joined test Held back Judge only the joined test windows. So: run held-back years once.
Walk-forward analysis: each window is optimized in-sample, tested on the next out-of-sample window, and the test windows are joined; the most recent years stay held back.

Follow this order:

  1. Write down the rule family, the parameter ranges and the exits before you run anything.
  2. Fix the session, the bar size, commission, slippage and next-bar execution, which means a decision made at a bar's close is filled on the following bar.
  3. Hold back the most recent part of the history, for example the last two or three years, and do not look at it.
  4. Run walk-forward analysis on the rest. Count how many test windows are positive and how large the worst one is.
  5. Check long and short trades separately. The S&P 500 rose over most of the past decades, so a long-only rule can look strong simply by holding through that rise. Compare it with buying and holding the contract.
  6. Run the held-back period once, with nothing changed.

A good result keeps an average trade of several times the cost in the test windows, with gains spread over many windows and similar parameters chosen from one window to the next. A bad result earns most of its money in one or two windows, or disappears when slippage doubles.

The number of variants you tried matters too. Testing a hundred variants and keeping the best is like buying a hundred lottery tickets and calling the winner skill. Researchers have shown that the best of many backtests is inflated by the search itself, and that the more variants you test, the higher the bar a result must clear (Bailey & López de Prado, 2014; Harvey & Liu, 2015). AlphaPrime applies consistent out-of-sample checks through its strategy validation, which offers Basic, Standard and Extensive validation and walk-forward analysis.

Why does no strategy type work in every market regime?

Each rule family needs a specific market behaviour, and the S&P 500 changes between behaviours over time. A regime is a period in which the market behaves in a consistent way, such as a calm uptrend, a choppy range or a fast sell-off. Think of an umbrella and sunglasses: each is useful, but not on the same day. Trend rules need moves that continue. Mean-reversion rules need moves that reverse. In the 2008 financial crisis and the March 2020 sell-off, prices fell fast and far. Rules that bought the dip took large losses, while some trend rules on the short side gained.

Hypothetical yearly results by market regime: in a trending year the trend rule gains and mean-reversion loses a little, in a choppy year mean-reversion gains and trend loses, and in a crash the trend rule gains while mean-reversion takes a large loss The families take turns Hypothetical yearly results Trend Mean-reversion Trending Choppy Crash Each family has its bad regime. So: check results per year.
Hypothetical yearly results: the two rule families take turns, so a single strategy's good and bad years often follow the market regime.

To test this, look at results per year and per volatility level, not only at the total. If a strategy earned everything in one regime, size it for its bad regime. Combining rules from different families can smooth the total, but only if their losing periods do not overlap.

What this means if you use AlphaPrime: you can search all three rule families on ES or MES bar data with the session, costs and next-bar execution fixed from the first run, then keep only the candidates that hold up in walk-forward and out-of-sample tests. The per-year and long-versus-short views show which regime each one depends on.

Frequently asked questions

What is the best strategy for trading S&P 500 futures?

There is no single best strategy, because trend-following, mean-reversion and breakout rules each depend on a different market behaviour. The useful question is which rule holds up after costs and on out-of-sample data. Test each family the same way and compare their results per year.

Should I backtest on ES or MES?

The price data is the same index, so the signals are the same. The difference is costs: commission takes more index points per trade on MES. Run the backtest with the costs of the contract you will actually trade.

What timeframe works for e-mini futures strategies?

It depends on the rule family. Breakouts and short reversals use 1- to 15-minute bars, while trend-following usually uses 60-minute or daily bars. Smaller bars give more trades but let costs take a larger share of each trade.

How much slippage should I assume on ES futures?

One tick per side is a common starting point for market and stop orders during the day session. Assume more for overnight trades and entries at the open or around news. Rerun the test with double the slippage to see whether the strategy still holds.

References

  • Bailey, D. H., & López de Prado, M. (2014). The Deflated Sharpe Ratio: Correcting for Selection Bias, Backtest Overfitting and Non-Normality. The Journal of Portfolio Management, 40(5), 94–107.
  • Harvey, C. R., & Liu, Y. (2015). Backtesting. The Journal of Portfolio Management, 42(1), 13–28.