Backtesting the Closing Range Trading System

Last week I posted a description of Ken Calhoun’s Closing Range trading system. Now I’ll go through the process of backtesting the system itself and comparing my theories about what data points would affect its profitability.

A brief overview of the system itself. It looks for a breakout in the first 15 minutes above the closing 30-minute range from the prior day and uses a stop at the bottom of the closing range. Pretty simple:

chart of AMD trade in the closing range trading system

As I suspected, the system puts out a LOT of trades. Including all these trades produces some pretty poor results, so the question becomes under what circumstances should you take trades. That is, which trades from the system should you actually take and which ones should you ignore?

initial equity curve of the closing range trading system before optimizing
Equity curve if you traded everything

Is it even possible to find a profitable subset of trades from this system with an equity curve that looks that bad? You might be surprised. Let’s take a look.

Which Filters to Use?

I suggested in my last post that the filters that would make the most difference in this system would be:

  • The height of the closing range
  • Volatility
  • The opening gap/immediate trading action

So let’s look at each of these.

Height of Closing Range

chart of closing range trading strategy showing height of the closing range
Height of the closing range

When you look at the height of the closing range you see that it has increasing profitability the larger the value is. Here’s a chart of the equity curves for each range of values.

graph of closing range trading system ranked by height of closing range

The purple line represents the trades with the highest closing range height values in the trade set. The smaller the values, the worse the trades.

Volatility

One filter I look at in almost every system I examine is volatility. How much does this stock move normally, outside of the day in question? Stocks that typically move more, in general, are more profitable to trade. But wait – we’re trading this event that’s already unusual by definition – does it really matter what it does on a normal day? Why?

Because stocks tend to revert back to their normal character, so even on unusual days this tendency will still exist. Given the fact that this trading strategy has relatively few requirements for “unusualness” anyway, it will likely revert to normal even more so. Here I use Average True Range (ATR) for my measure of volatility.

graph of closing range system ranked by ATR

Notice that the highest levels of values for the Average True Range are the most profitable (the purple line). All lower values tend to be grouped together. Also, note that all these lines each represent the same number of trades.

Opening Gap%

chart of closing range system with the opening range
Opening action prior to signal

I thought that the opening gap would be important for this trading system. Imagine a large, meaningful gap down. Just how important can the closing range from yesterday really be in that situation? The more meaningful the gap, the less meaningful the closing range.

graph of closing range trading system ranked by gap percentage

Sure enough, you see another strong correlation here. Literally the bigger the gap the worse the trades perform. The smaller gaps represented by the red line are actually starting to look like a system you could trade!

What to Look at Next?

There are other filters I’d want to look at next, but I believe the improvement gains from additional filters would be smaller and less obvious.

What other filters do you think would be worth examining? Let me know in the comments and I’ll try to test them and post an update.

2 comments
  1. Dave, great post as usual! I have several questions. Is this all trades for just one stock, or a universe of stocks? Also, what backtesting engine are you using to generate these equity curves? Finally, have you experimented with entering on a pullback?

    1. @John – thanks! This is for the entire market. I’m using R to generate the equity curves. I haven’t experimented with a pullback. So you’re suggesting wait for the break of the top of the range, then enter a limit order good for some period of time below the top of the range?

Comments are closed.