Gap Trading Strategy

Gap Trading Strategy (Trade a Gap Fill With Backtested Examples)

Gap trading strategies have been a popular tool for many decades. Gaps vary in size, variations, and volume depending on the asset you are looking at. Gaps can be traded in any instrument, and certain asset classes have substantial daily gaps.

This article looks at gap trading strategies in the stock market. We provide you with some backtested examples of how to trade gap fills, but unfortunately, the low-hanging fruit has been “arbed” away.  Gap trading is not nearly as profitable as it used to be, both in individual stocks and stock indices.

What is a gap in trading?

Gap Trading

Before we continue, let’s briefly explain what a gap is:

A gap is price levels that are not traded (or at least have very little trading) between the close and the open the next day.

For example, if the close yesterday was 100 and today the stock opens at 95, there is a gap between those two points.

This chart shows the gaps in the ETF with the ticker code EWA during March 2020 when the Covid-19 mess struck:

Gap Trading Strategy

As you can see, EWA closes around 19 and opens the next day at below 17 – a pretty big gap down. In the trading language, this is called a “gap down”.

Gaps can occur in any time frame there is. The above is a daily chart, but gaps happen in all time frames – even intraday charts when news is published. However, they are most frequent on daily charts.

Overnight gaps

The chart above is an overnight gap and is the most frequent. Gaps happen because news and imbalances accrue between the close and the open, and the price opens higher or lower the next day.

This can also lead to very profitable trading strategies overnight (from the close to the open), something we have covered in a previous article:

In the stock market, almost all gains over the last 30 years have come from owning stocks from the close to the next open (please read more in the article linked above).

Common gaps

Most of the overnight gaps are “common gaps”. This means that they happen frequently and have no or very little significance. Most of the action in the market is just noise and randomness, and this obviously makes the overnight gaps random: they are “common”.

Exhaustion gaps

One group of gaps are often labeled “exhaustion gaps“. Typically, these happen after extended moves either up or down.

For example, a stock might have fallen many days in a row, and on day number x the company publishes an earnings report that is weak and gaps down substantially at the open. However, the market had anticipated a weak report, and the price goes straight up from the open after it has gapped down.

Why does this happen? It happens because most of the sellers are gone (or finished selling) and the marginal amount of sellers dries up. Buyers take control and the “vacuum” forces the buyers to pay more to tempt sellers to sell.

Vice versa for extended moves up.

Runaway gaps

Opposite to exhaustion gaps, we have runaway gaps that happen when we have a sudden or sharp move from a base or consolidation. If a company releases an unexpected positive news bulletin, this might not only lead to a gap up but also an extended move up that lasts for several days. Ultimately, this might climax in an exhaustion gap.

Breakaway gaps

Are you wondering what a breakaway gap is in the stock market and how to identify one? A breakaway gap is a move that traders pay close attention to for its strength and implications on market direction. This article will guide you through understanding breakaway gaps, how to spot them, and their importance in your trading approach, laying the foundation for detailed strategies and considerations in the following sections.

Other gaps

The above are the three most used labels for gaps, but there are, of course, many others. Only your imagination prevents you from finding and labeling gaps.

Is gap trading profitable?

Gap trades can be both profitable and unprofitable, of course. All trading strategies are static, while the market is dynamic, so the profitability varies. Some gap trading strategies work for a long period of time, then take a breather, before they resume working again.

Other gap trading strategies go into oblivion and never work again. Read more here:

Gaps are not as profitable as before

As computer power and the number of traders have grown, the profitability of gap trading is diminished, unfortunately.

What worked nicely before doesn’t work nearly as well anymore. In order to find something to work, you need to use more criteria and filters or accept fewer trades. Obviously, this increases the risk of curve-fitting.

How to develop and build a gap day trading strategy: how to play and trade the gap successfully

Below are some very simple ways of how to look for day trading strategies based on gaps. These are in many ways naive and we are not using them ourselves in our trading. However, we believe they can be useful as examples.

As we wrote earlier in the article, gap trading strategies are not as good as before and you need to tweak them to make them work.

A gap can either be faded or followed. If you fade a gap, you buy a gap down and vice versa. If you follow a gap, you sell a gap down and buy a gap up. Both can work, but not at the same time.

In general, stocks tend to be better to fade the gap, while other asset classes are less inclined to revert to the mean.

Does a gap gets filled?

A good starting point is to check whether a gap is more likely to get filled or not. A gap gets filled if the price moves back to the pre-level. Sometimes the gaps get filled by intraday moves (gap trading is not suitable for intraday trading), but sometimes the gap needs many days to get filled. This is, of course, dependent on the size of the gap: small gaps are more likely to get filled.

Of course, even though the gap has a high chance of getting filled on the same day it doesn’t mean it’s a profitable trading strategy if it’s negatively skewed:

It’s all about probabilities and expectancies! Big losers can erase many small winners.

Is a gap up or down likely to get filled in the S&P 500?

Fill rate of gaps in the S&P 500: facts

Let’s test if most fills in the S&P 500 get filled or not on the same day as the gap. Are gaps always filled? We divided the gaps into three different levels:

  1. Gaps that are bigger than 0,1%.
  2. Gaps that are bigger than 0,5%
  3. Gaps that are bigger than 1%

We looked at data going back 25 years and used continuous futures data for the E-mini contract. A filled gap means it was filled the same day as the gap. The gaps are divided into self-explanatory bullish and bearish gaps. The results indicate that some gaps fill more frequently than others:

Gap limit of 0.1%:

Bullish Gaps: 59% filled (2155 instances)

Bearish Gaps: 61% filled (1809 instances)

As you see there really is not a big difference between the two.

Gap limit of 0.5%:

Bullish Gaps: 43% filled (702 instances)

Bearish Gaps: 42% filled (650 instances)

Gap limit of 1%:

The largest gaps are, as expected, much less prone to fill.

Bullish Gaps: 28% filled (204 instances)

Bearish Gaps: 33% filled (202 cases)

Bearish gaps (gaps down) are most likely easier filled because of the upward bias in the stock market.

Gap trading backtests require good data

If you want to backtest gap trading strategies, you must pay attention to the data you are testing on. If it’s garbage in, it’s also garbage out. Please make sure you use a reliable data source.

If you are using free data from yahoo!finance (for example) you can only trust the opening and the closing prices. Always assume the high and low are erroneous prices that happen because of OTC trade reports (or trades done days ago being reported late).

A gap trading strategy in the S&P 500: How to build a gap fill day trading strategy

Let’s test some simple ideas on continuous 5-minute futures data from 2011 until July 2021 (it serves only as examples):

Trading Rules

The trading strategy is like this in plain English:

THIS SECTION IS FOR MEMBERS ONLY. _________________ BECOME A MEBER TO GET ACCESS TO TRADING RULES IN ALL ARTICLES CLICK HERE TO SEE ALL 350 ARTICLES WITH TRADING RULES

This strategy returns this equity curve:

Gap fill Trading Strategy
Gap fill Trading Strategy

It’s 777 trades and has a negative return. It turns out the very big gaps, lower than -0.7%, have an expectancy of -0.11% per trade.

Let’s set the criteria to an open below 0.15% but to a max of -0.7%:

how to trade gaps successfully
how to trade gaps successfully

It’s better but still not far from tradeable.

Let’s throw in another criterion: today’s open must be higher than yesterday’s moving average of the last 25 closing prices. This is the result (gap and go):

gap and go strategy
gap and go strategy

It improves to 0.06% per trade but is still far from profitable.

If we flip the criteria to trade short it gets even worse, as you could imagine and it’s not profitable at all (because short is always more difficult than long due to the upward bias in the stock market).

Gap trading strategies are hard to find, but some work

As the example above shows, finding gap trading strategies is no walk in the park. We used to trade quite a few of them, but as of today we only trade very few. Below is an equity curve of one of the day trading strategies we currently trade (test done in Tradestation and in futures mode):

Gap trading strategy
Gap trading strategy

Of course, this is a twist and has other criteria than we used above. So far so good.

If we manage to find profitable gap trading strategies we believe are robust and less likely to be a result of chance, we might publish them as a Monthly Trading Edge.

Gap trading in swing trading

Of course, you don’t have to trade gaps by day trading. Swing trading strategies can also be used for gap trading.

Let’s test another strategy that holds trades overnights (and sometimes exits at the close the same day). The rules are like this:

  1. The S&P 500 must gap down at least 0.15%.
  2. Yesterday’s IBS must have been 0.25 or lower.
  3. Yesterday’s 5-day RSI must be 0.45 or lower.
  4. If 1-3 are true, then buy today’s open.
  5. Exit at the close if the close is higher than yesterday’s close.

Most of the time this strategy holds the S&P overnight but exits on the same day if it manages to fill the gap and close higher than the day before.

gap fill trading strategies

The average gain per trade is 0.48 and the profit factor is 1.8. Not a spectacular strategy, but works reasonably well, most likely because of the extra risk premium of the gap down opening.

If we test on a longer time fra by using SPY, the average per trade is still around 0.5% and has a rising equity curve. The strategy can probably be improved a lot.

Gap trading strategies in other assets than stocks

The competition in the stock market indices is enormous. The lowest hanging fruit is arbed away a long time ago.

But there are opportunities in other markets, something we will get back to later.

If you would like to have the code for the gap trading strategy above you can order it on the green link below and get the code for all the other free strategies we have published from 2012 (over 70 tips, edges, and strategies). The code is for Amibroker, but around 50% is in Tradestation/Easy Language. The code in this article contains code both for end-of-day (EOD) and 5-minute data.

Other gap trading strategies

You can, of course, backtest other types of gap trading strategies:

  • Gap up and gap down (two-day pattern)
  • Gap down and gap up (two-day pattern)

These are just two examples, but there are many more.

How to know if a stock will gap up?

After reading the article, you might wonder if there is any way you can find out before a stock or asset gaps up. Unfortunately, that is an almost impossible task! However, you might improve the odds by doing some backtesting.

Conclusion about gap trading strategies

Gaps are areas that are recently not been traded, and small gaps tend to get filled. As a general rule, the bigger the gap, the less likely it is to get filled, at least it will take a longer time.

Gap trading strategies used to be “low hanging” fruit but not anymore. We find gap trading to be reasonably difficult, at least in the most popular indices and asset classes.

FAQ:

– How do gaps occur in trading?

Gaps occur due to news, imbalances, or other factors between the close and the open, leading to a higher or lower opening price the next day. Overnight gaps are the most frequent and result from events or news during non-trading hours.

– Is gap trading profitable?

Gap trades can be both profitable and unprofitable. However, as computer power and the number of traders have increased, the profitability of gap trading has diminished. What worked well before may not be as effective in today’s market.

– Can gap trading strategies be applied to different time frames?

Yes, gaps can occur in various time frames, including daily and intraday charts. However, overnight gaps are most frequent. Gap trading strategies can be adapted to different time frames based on the trader’s preferences.

Similar Posts