When To Go Long: S&P Intraday Price Study

In this article I would like to perform an intraday price study to explore the intraday action of the market to determine if we can find an edge. I’m going to be using the S&P E-mini futures market, but the principles here could be applied to any market. In particular, I’m interested how different times of the day affect different trading strategies. The trading day, as defined by the U.S. open and close, for the S&P is six and a half hours. That translates to 390 minutes. We can then break the day up into three 130-minute periods. Let’s also explore the times before and after the regular day session. To do this we can add a 130-minute period before the market open (Pre-Market) and a 130-minute period after the market closes (Post-Market). We have broken a trading day into the following periods:

Five Market Sessions
  1. Pre-Market, 06:20 – 08:30
  2. The Open, 08:30 – 10:40
  3. Midday, 10:40 – 13:50
  4. The Close, 13:50 – 15:00
  5. Post-Market, 15:00 – 17:10
Now that we have these various times defined, I want to create two simple trading strategies to see if I can find an edge.

Trend Following and Mean Reversion

In general terms, we can attempt to trade the market with either a trend following strategy or a mean reverting strategy. Trend following implies the market is moving in a particular direction and we expect it to continue. On the other hand, a mean reverting strategy means we expect the market to reverse soon, thus we position our trade opposite to the current market direction. To determine which type of trading strategy would work better during these time periods, I’m going to create two simple trading strategies. One system will be a mean revering strategy while the other will be a trend following strategy.

The system should be very simple. I’m not looking to create a trading system to trade per se, but I am attempting to locate clues as to what type of trading strategy (mean reversion or trend following) might work during a particular period. To keep this simple, I’m going to explore trades on the long side only and will be looking at the trading days between 1/1/2005 and 12/31/2015.

For the trend following entry rule I will use the 12-period momentum calculation and open a long position if the momentum is above zero. For the mean reversion entry rule I will use a 14-period RSI and enter a long position when the value is below 25.  A single trade is entered and the position is closed at the end of the particular market session as defined above. We are allowing only one trade per day. Slippage and commissions are not deducted and no stops are used.

Trending System Entry = 12-period Momentum is greater than 0
Mean Reversion System Entry = 14-period RSI < 25

Market Regime Filter

I often will make use of a market regime filter when I’m developing a trading system. This filter breaks the market into two distinct regimes: bull or bear. We will use a 200-period simple moving average on a daily chart to determine if we are in a bull or bear market. A bear market is when price is below the 200-period moving average. A bull market is when price is above the moving average. Using this filter will limit our long trades to only be taken when price is trading above the 200-period moving average on a daily chart. In other words, we will be taking trades in the direction of the overall market trend.

Bull Market = price > 200-daily simple moving average

Testing Trend Following Characteristic

BULL MARKET: I created an EasyLanguage strategy to first test the trend following characteristics of the five different periods. Below is a bar graph representing the average profit per trade for each period. Period 1 starts on the left-hand side through period 5 on the far right-hand side. What this shows is during a bull market there is an edge with momentum trading during the Midday period. This seems contradictory to what many may think. According to these results, momentum trades don’t seem to do well during the morning. Instead, they do better during the lunch time.

 Winner: Midday session

BEAR MARKET:  Let’s switch things up a bit. Let’s now only take long signals during a bear market. In other words, we will now only take our long trades when price is trading below the 200-day SMA. This is the opposite of the test we just performed above. It is also a counter to the prevailing major market trend. Below is a bar graph representing the average trade profit for each period. This makes a huge difference. During a bear market there seems to be an edge for momentum trades during the last minutes of the trading day. How many times have you seen price rally into the close during a bear market? I’ve seen it many times and this study shows it.


Both bull and bear markets exhibit late day momentum bias to the up-side. This phenomena is even more pronounced during a bear market. Trying to build an intraday trading system to exploit this edge may be worth investigating.

Winner: Closing session

Testing Mean Reversion Characteristic

BULL MARKET: Now I will test using our mean-reversion trading system rules over the five different periods. Below is a bar graph representing the average profit per trade for each period. The clear winner here is The Close period. Notice the The Close was also positive for the trend following strategy above.

Winner: Closing session

BEAR MARKET: Now I will test using our mean-reversion trading system rules over the five different periods during a bear market. Below is a bar graph representing the average profit per trade for each period. The clear winner here is the Midday Session.


Here we see our best edge can be found in the pre-market hours during a bear market. Below is a graph that combines all our results into a single image.

Winner: Midday session


The graph below may look a little confusing at first. Focus on the bars above the zero line. That’s what we are interested in since they show the most average profit per trade. Ask yourself, which bars are the largest?


Trend Following

If you’re looking to create an intraday trend following system there are two clear choices:


During a bull market look for an entry point during the Midday session.



During a bear market look for an entry point during the Closing session.

Is it not strange that the largest dollars produced for the trend following strategy is during a bear market throughout the Close session? How odd is that! This conclusion seems counter-intuitive but that’s often the nature of the markets.

Mean Reversion

The profits on the mean trades appear to be producing better average profit per trade which makes sense if you believe the S&P is a mean revering market on the shorter timeframes. This appears to back that up. Anyway, for an intraday mean-reversion strategy, the following choices may be a good place to start:


During a bull market the Close session.



During a bear market the Midday sessions.

This is a rather simple study, but such studies can often point you to the right direction when gathering ideas on trading systems. In short we are asking, where might be the low hanging fruit? This type of study can also be applied to any other instrument. Likewise, we only explored longs during this study. Adding a shorting study would also help build a more complete picture. Other ideas could include, using different indicators for our trend following and mean reversion trading systems. Likewise, it would also be important to vary the look-back period for our indicators. By testing a range of values, say between 6-14,  we can demonstrate the robustness of the look-back period.


Intraday Session Test Long Only Strategy Code (TradeStation ELD)
Strategy Code (Text file)
Workspace (TradeStation TWS)

About the Author Jeff Swanson

Jeff is the founder of System Trader Success - a website and mission to empowering the retail trader with the proper knowledge and tools to become a profitable trader the world of quantitative/automated trading.

follow me on:
  • Mark says:

    I know you said you were looking to do a simple test here but I think there’s a wealth of information to be gained by discussing what was missing from this simple test. For example, I would want to see some sort of distribution by time of the results in case the tendencies here are more representative of 2005-7 than 2011-12. The challenge would be in how to operationally define or quantify that but it’s one detail that strikes me as very important.

    • Mark says:

      My thoughts exactly. Displaying it as one bar graph to cover so many years might not be meaningful. I’d like to see how consistent it is. Even though you aren’t trying to develop a system here, if the bulk of the profits came from one month to skew the whole sample then the bar graphs mean very little.

      • Hey Mark. I got some time this weekend to post the equity curves of the best performing sessions. I’ve updated the article with them.

  • steve says:

    Jeff, I am a budding system developer.

    I have to say, without a doubt, that most of what I have learned is from your trading blog.

    1) you don’t over-complicate your systems. They are intuitive and easy to understand.

    2) An earlier analysis of how to look at each variable by itself, and see if there is smooth curve as the variable values change, was specially valuable. I am already using that in my analysis, and hope you actually develop an article around that exact subject.

    Thanks again,
    keep up the GREAT work.

  • Cam says:

    Hi Jeff,

    “Here we see our best edge can be found in the pre-market hours during a bear market. Below is a graph that combines all our results into a single image”.

    Should be period 3, right?

  • >