Saturday, October 27, 2007

Opening Price Gaps and Reversions to Average Trading Prices: More Intraday Stock Market Patterns

In my recent post, we looked at intraday price patterns in the S&P 500 Index (SPY) and found a few patterns of interest, including the frequency with which markets trade out of the range defined by the previous day's high and low price but then fall back into that range by the close. We also saw that markets that close strong are more likely to trade above their previous day's highs and markets that finish weak are more likely to pierce their prior day's lows.

In this post, we will examine reversion tendencies at an intraday level. Specifically, we'll look at how often the S&P 500 Index (SPY) closes its opening gap and how often it trades back to the average price of the previous trading day.

Going back to 2004 (N = 962 trading days), we find that SPY has closed its opening gap each day on 696 of those occasions, or about 70% of the time. We can thus see why traders commonly believe that "gaps tend to be filled". Interestingly, however, the median gap size (to the upside or downside) for the days in which gaps were ultimately filled was .14%. The median gap size for days in which gaps were not filled was .31%.

Let's look at this another way: When the opening gap up or down was greater than .35% (N = 211), the gap was filled on 97 of those occasions, or less than half the time. When the opening gap up or down was less than .35% (N = 751), the gap was filled on 599 of those occasions, or about 80% of the time.

This certainly makes sense: A large opening gap will tend to occur when a news event, economic report, or overseas market development has a significant impact upon the outlooks of traders and investors. When the market opens far from its prior day's close, there is a greater likelihood that market participants are repricing stocks in a way that will persist through the day. We should thus amend the slogan "opening gaps tend to fill" to "relatively small opening gaps tend to fill". When opening gaps are modest, fundamental events are not repricing U.S. equities and thus price will tend to drift back toward the prior day's close.

Now let's look at another price benchmark: the pivot price defined by the average of the prior day's high, low, and closing price. How often does SPY trade back to this pivot, which is one measure of the previous day's average trading price?

Note that this question is not entirely independent of the issue of opening gaps. Perhaps markets with small opening gaps (those not being repriced) are more likely to be range bound and hence trade back to the prior day's average price.

When the opening gap has been greater than .35% (N = 211), we've hit the prior day's pivot (average price) on 107 of those occasions or about half the time. When the opening gap has been less than .35% (N = 751), SPY has traded back to its pivot on 550 of those occasions, or about 70% of the time. It thus appears that markets that open with small opening gaps are more likely to trade well within the prior day's range, hitting the previous day's average trading price.

This is particularly obvious when opening gaps are very small. When SPY has opened within .10% of its prior day's close (N = 269), the gap has filled on 251 of those occasions, well over 90% of the time. On those occasions, SPY has also hit its pivot level 203 times, or about 80% of the time. A very small opening gap, particularly on days where there are no major economic reports due out and no major news stories, suggests that equities have little reason to be repriced.

Overall, going back to 2004 (N = 962 trading days), SPY has traded back to its pivot level (prior day's average price) on 657 occasions, or about 2/3 of the time. For those occasions in which SPY has returned to its pivot, it had closed the prior day a median of .31% from that pivot level. For occasions in which SPY did not return to its pivot, it closed a median of .73% from the pivot. In other words, late day strength or weakness that took the market far from its average trading price for that day--most likely an intraday breakout move--does not tend to be retraced the following day.

Another way of looking at this is that, when we close more than .40% from the prior day's pivot level (N = 508), we retouch that pivot the following day on 262 occasions, or a little more than half the time. When we close less than .40% from the prior day's average price (N = 454), we return to that pivot the next day on 395 occasions--almost 90% of the time.

If you combine the prior post with this one, you can see that we've established several price benchmarks for a daily trading session. We can calculate the odds of hitting the prior day's high price, low price, and average trading price. We can also calculate the odds of filling the opening gap. That just leaves us with one remaining set of price benchmarks: the odds of hitting prices outside the prior day's range. That will be the topic of the next post in this series. Then we will look at variables that improve the odds of hitting these price benchmarks.


Do Opening Gaps Tend to Fill?

Opening Gaps in the S&P 500 Index - Part One

Opening Gaps in the S&P 500 Index - Part Two


dan said...

Hi Dr. Brett --

Do these results translate well to the S&P Futures (ES)? If so, then I can apply the percentages to the futures value (e.g. 1500 x 0.4% = 6 ES points), do determine the whether the odds favor a return to yesterday's pivot.

Excellent series, keep up the fresh ideas.


Alexandria, VA

Globetrader said...

Hi Brett,

your series is becoming extremly interesting. As I've tried to develop some trading systems myself, I would like to add a few thoughts, which you might find worth following up.

First a question: "How many trades do you need to make per day, if you are not employed by a trading firm but trading for your own account only?" Actually the answer is obvious. You don't need to make a trade at all. You have the option to wait for the pattern, which gives you your trading edge.

Now according to your numbers you have identified patterns, which give you 70% or even 80% winning trades. And you ultimately want to look for variables, which will improve the odds of hitting these price benchmarks.

I don't think that's necessary at all. It doesn't matter. You will end up with filters, which will led to less and less trades, while improving the odds by 1 or 2 percentage points, but not more. Actually any filter you add, will leave you standing aside from winning trades as often as from losing trades. At least that's my experience with filters.

On the other hand searching for rules to apply within the trade, which allow you to identify losers as fast as possible and thereby keep your losses down, while letting winners run, is something often forgotten. It's part money management, part trade management.

I've written a Money Management tool, which let me simulate doing 1200 trades at a given Win%/Loss% rate and certain Win$/Loss$ settings.

(Download from You need to allow for iterations in Excel or it will give you only warnings. If there are questions I'm available at

Let's assume we have a Gap-up day and the odds tell us, that the chance the Gap will be closed is 80%. According to your numbers the average Gap is then something around .14% or 2 ES points. So the win$ on our average trade would be 100$/contract.
But when do we know the Gap won't be closed?
Ultimatly only at the end of the day of course.
So as an aspiring trader you start with an account size of 25,000$ and want to know, what will become of your capital if you trade with a winning chance of 80%.

Let's assume your average loss on these 20% losing trades is 400$ or 8 ES points. I have no idea what the chances are, that the close is 8 points away from the open on the ES. That's something only you can answer. What I can tell you is, that if you trade 2 contracts with these 25,000$ initial capital, your chance to go bankrupt is about 14% and that the chance to have lost money after 1200 trades is 59%.

It looks a lot better if your average loss is 300$ or 6 ES points. Then the chances to go bankrupt trading 2 contract are actually nil. And you will most likely make at least a bit of money. The minimum ending balance over 1200 trades was 27,600$ (from the initial 25,000$), the maximum was 248,200$.

Now we know, that our average losing trade shouldn't cost us more than 300$/contract, if we want to keep our edge. An if we get the average loss down the profit potential of the system goes up expentionally.

If your average loss is 200$, then your max profit should be 541,000$. (My system assumes, that with increasing account size you will increase the number of contracts traded as well, applying a margin of 10,000$/contract. So for every 10,000$ added to your account you will trade 1 contract more. After 300,000$ I apply a margin of 20,000$ for each additional contract)

But how can we tell, what our chances are, if the trade first goes against us, before it starts to close the gap?
I don't have the means to answer this. But it might be worthwhile to ask what the chances are that the Gap closes, if ES after the open goes 1 point, 2 points, 3 points and so on against us before turning and closing the Gap.

Having a 83% winning chance by finding some arcane filters or rules might look great, but won't change a lot at the net result numbers.

On the other hand finding a rule, which will allow us to trade with a 4 point ES stop, even if it's achieved only by adding contracts to a losing trade while keeping the whole trade risk at 4 points compared to a 6 point stop can mean the difference between 100,000$ and 250,000$ after 4 years of trading or doing 1200 trades.


Brett Steenbarger, Ph.D. said...

Hi Dan,

There should be a good, though not perfect, correlation between SPY and ES findings. It would be easy to replicate this study for any instrument or stock. Thanks for the note!


Brett Steenbarger, Ph.D. said...

Hi Chris,

Thanks for the thoughtful comments and the link to your work.

My research has found a few filters that make a meaningful difference in handicapping the odds of hitting benchmark prices.

Many of these filters actually consist of a Bayesian process that enables traders to update the odds of hitting price levels, given the most recent trading events.

Your points about money management are very sound. If you have a genuine edge, it makes sense to take as many of those trades (with good risk mgt) as possible.

Thanks again for making your work available to readers!


Ryan M said...

Fyi - The downloaded file referenced above ( has installed what my virus scanning software (NAV) believes to be a trojan horse virus (icq-ts.exe). This may be asociated from the data feed the spreadsheet users but just to make others aware.

Globetrader said...

Hi Ryan,
thanks for the information. You never know, if a file skips detection.
So I just downloaded the file from my server and let my virusscanner NOD32 (current database Ver 2621 20071028) check the file.
It found no infection. ( sorry it's a german output, but that's the way my virusscanner is setup)
I then ran Spybot Search and Destroy, which also found nothing to report.
As the file is an Excel datafile it is also unlikly that it might contain an executable file, as the file is just opened within Excel.
But of course better safe than sorry.
I can only say, that I posted the same file on my server which I worked with on my computer minutes before.


Jeff said...

Thank you for this most interesting post (and thanks to the readers for the interesting comments as well). I was wondering if you take into consideration other indices - the NYSE Advance-Decline, specifically - in addition to your research on gaps per se? I tend to think that (other things being equal) a very high/low A-D increases the likelihood of a gap not closing, but I have not done the kind of research you do to back it up...

Brett Steenbarger, Ph.D. said...

Hi Jeff,

In general, I've found AD line pretty well correlated with price and cumulative TICK, so generally have not used it as a separate variable for these purposes.