Friday, February 4, 2011

Closing the gap strategy

Fading the opening gap is a well-known strategy, promising acceptable results with minimal efforts. A great article about trading gaps is written by Scott Andrews. It sounded interesting, so I've decided to spend an hour or so to check if the numbers are right. The basic 'Dumb gap' strategy that I've simulated always trades the opening gap in the direction of the previous days close. In other words, if opening above yesterdays close, go short. Take profit level is set on yesterdays close, if it is not reached, the strategy  closes the position on the days close.
As a test set I've chosen past 10 years of the SPY, ignoring transaction costs and slippage. And the results are:

  • The gaps fully closed on about 75% of occasions
  • The strategy has a sharpe of 1.3
  • Using 'BLUD' (below low of an up day) compensation introduces only marginal improvement. These days are quite rare, ~3% of all occurences.
And as a picture speaks a thouthand words, here are the pnl curves.
Disclaimer: this is just an idea that that needs some work before a tradeable stragegy is achieved. I do not recommend anyone trading using the rules described above.


  1. Nice work again. How fast do these tend to mean-revert? So if you do your calculation on the price after the market has been open for 10mins, do you still win? Chasing the open with limit orders is hard, but more realistic within a few mins after the open (IMO).

    I've been trading some other asset classes right now, but interested to see how things evolve.

  2. @tr8der: I've tried to replicate the results with intraday data, entering ~5 mins after the open. Funny thing is that while still having 70% win chance, the loosing 30% trades devastate the pnl. Again, this post relies on a very quick calculation based on daily OHLC data and it could be that I've made an error along the way. I'll try to recalculate everything to check the result.
    I still believe that with a better entry point and some risk management this strategy could be profitable

  3. Hey guys, I found this post interesting and did the same calculation from Yahoo Finance historical quotes and came to the same equity curve. However, I noticed that the adjusted close was siginificantly different from the quoted one. Apparently there is some impact from ETF share buying and selling, or something like that concerning fund mechanics.

    Anyway, it becomes obvious that the open and close quotes are not directly comparable, so it should come as no surprise, that using intraday data (presumably more precise), the profit is obliterated.

    I tried at the index itself, and the result for the S&P500 and for DAX was total loss after ten years.


  4. Have spent some time doing the same thing a while ago. Unfortunately, it is not tradable.