October 10


The Double Seven Strategy

By Jeff Swanson

October 10, 2016

automated trading, Automated Trading Development, EasyLanguage, ES, futures trading, mean reversion, S&P Emini, SPY, stock index futures, TradeStation

It’s time to look at another simple trading system which can be found in the book, ”Short Term Trading Strategies That Work” by Larry Connors and Cesar Alvarez. In this article we are going to look at the Double 7 strategy. This is a simple strategy that can be applied to the major market indices such as DIA, DOW and QQQ. It can also be applied to the futures markets.

The rules of this system are very simple.

  • The instrument must be above its 200 day moving average.
  • If the instrument closes at a 7-day low – buy.
  • If a long position is open and the instrument closes at a 7-day high – sell.

The trading system follows two basic concepts we have talked a lot about on this website. Namely when trading the major market indices, like the S&P, an effective strategy is to buy pullbacks in a major up trend. This system does just that. The major up-trend is defined by price being above the 200-day moving average. A pull-back is defined as a close below the lowest-low over the past seven days. Once a trade is entered, we simply look for a new seven day high to exit. Super simple. Below is an example of some trades on the S&P Cash Index. Click the image for a larger view.

Looking at the trading rules, you will also notice it’s a long-only system. Later in this article I will also reverse the rules and test it on the short-side. But for now, let’s look at the performance for the long-only system. At this point I’m going to test it on the S&P cash index ($SPX.X for TradeStation).

Unless otherwise stated, all the tests performed in this article will be based on the following assumptions:

  • Starting account size of  $100,000.
  • The number of shares traded will be based on volatility estimation and risking no more than $2,000 per trade.
  • Volatility is estimated with a five times 20-day ATR calculation. This is done to normalize the amount of risk per trade.
  • The P&L is not accumulated to the starting equity.
  • There are no deductions for commissions and slippage.
  • There are no stops.

Here is the position sizing formula used:

Shares = $2,000 per trade / 5 * ATR(20) * Big_Point_Value ) 

This looks very promising. Keep in mind, the system has no stops.

Is The 7-Day Optimized?

Let’s look at changing the 7-day look-back period for two reasons. First, I would like to see if the default seven value is optimized. Secondly, I would like to know if other nearby values are used, would the system remain viable. In short, I would like to test the robustness of  the look-back period. For example, if we change the 7-day low value to six, I don’t want to see the system’s equity curve drastically change. Likewise, if we increase the 7-day low value to eight, I don’t want to see a drastic change in results. The neighboring values around seven should still produce positive results. In fact, it would be great to see the system  remain profitable over a wide range of values.

I will use TradeStation’s optimization feature to optimize the look-back period over the values 2-20 in increments of one. Keep in mind this single input value controls two look-back periods. The first is the entry look-back and the second is the exit look-back. As the trading system is defined, both these variables use the same value.  The results of the test are in the graph below. You can click the image to see a larger view.  The x-axis contains the look-back period while the y-axis contains the trading systems total P&L.

This looks great. Any value you choose produces positive results. Each change in the look-back period also does not drastically change from neighboring values. The default value of seven is near the peek, which is six, but it’s not the most optimal number. It’s also important to keep in mind we will be using the default value of seven for other instruments as well and it’s highly unlikely the bar graph for those instruments would look exactly like what we have here. In any event, I think this brings a lot of confidence to the look-back period.

Is The Regime Look-Back Optimized?

Just as we did for the look-back period for our entry trigger, let’s perform the same type of test on the regime look-back period. Again, I will use TradeStation’s optimization feature to optimize the look-back period over the values 20-200 in increments of ten. The results are in the graph below. You can click the image to see a larger view.  The x-axis contains the look-back period while the y-axis contains the trading systems total return.

This looks great as well. All values produce positive returns. In general, the longer the look-back period the more profit the system generates. While I did not study the numbers just beyond 200, I feel confident that a 200-period look-back is not optimized.

Taken both these tests we can feel confident that this system does not appear to be optimized and it’s robust given a wide variety of input values.

Going Short

The original system is a long-only system. Let’s try to use the current rules to short the market. We can do this by simply reversing the rules. In other words, we will modify the regime filter to only open trades when price is below the 200-day moving average. Trades will then open when price makes a new 7-day high and close when they make a new 7-day low.

  • The instrument must be below its 200 day moving average.
  • If the instrument closes at a 7-day high – sell short.
  • If a position is open and the instrument closes at a 7-day low – buy to cover.

I created a separate trading system to study only the short-side. The results of the system can be seen in the equity graph below.

This is not so great. Most of the time the equity curve is below the zero line. It’s choppy and ugly.  Clearly the market participants’ psychology during a bear market is different than simply a mirror image of those found in a bull market. One would think shorting new highs in a bear is a good idea, and maybe it is, but this system is not successful at capturing profit. Taking a wild guess simply from past experience, I have found that exiting quickly during bear markets tends to work better than in bull markets. Thus, maybe a modification of the exit rules to only hold a trade until the first profitable day or only hold for a maximum of three days may produce significantly better results. However, such modifications are best left for another day.

To further test our shorting idea, let’s now look at testing a range of look-back periods just like we did during our bull market. If our shorting concept is truly flawed, I would expect to see not much improvement in modification of our look-back period. In fact, since my wild guess is we need to exit quickly to remain profitable, I would expect to see greater losses as we continue to increase our look-back period. Likewise, I would expect to see greater profit as we shorten our look-back period. I will optimize the look-back period over the values 2-20 in increments of one. The results are in the graph below. You can click the image to see a larger view.

Just as I expected. In general the shorter the look-back period, the more profitable. However, since this is our first look at the Double Seven Strategy, I don’t want to over complicate it by introducing a shorting component. We’ll keep it simple for now and apply our long-only strategy to several major market ETFs.

Double Seven Strategy

Confident the long-only trading rules are robust and appear to hold potential, let’s now test this system on several major ETFs. Let’s test, SPY, QQQ, DIA, and IWM. For this test we are going to use all the same trading assumptions and position sizing as we did above except for the following modifications.

  • $100,000 starting account
  • Risk 2% of account equity per trade
  • P&L is not reinvested

Double Seven System





Total Net Profit





Profit Factor





Total No Of Trades





% Profitable





Avg.Trade Net Profit





Return on Capital





Annual Rate of Return






The Double Seven Strategy does produce positive results across the four major market ETFs we tested. Is this system tradable with real money as is? Probably not. Remember, there are no stops. However, this does appear to be a great start to a viable system. I would imagine if some of the larger losing trades could be eliminated by some type of stop method, this system could be viable with real money.

 Get The Book

Jeff Swanson

About the author

Jeff has built and traded automated trading systems for the futures markets since 2008. He is the creator of the online courses System Development Master Class and Alpha Compass. Jeff is also the founder of EasyLanguage Mastery - a website and mission to empower the EasyLanguage trader with the proper knowledge and tools to become a profitable trader.

  • Thanks for sharing your code. As a long term Connors fan I’m always interested to look at his stuff.
    Encouraging the way that the strategy has behaved itself lately, as a lot of strategies seem to fail post publication.

    A stop loss of $1800 or $2000 works quite well on the SPY, but a five year flat period unfortunately makes this strategy hard to live with.

  • Try to run the code on the SPX period from 1980 till 1993, the performance chart does not look so good…

  • I don’t have tradestation, so I modified a spreadsheet I have to test out your model. I tested from 5/22/08-2/8/13 (as that’s what my other models dates were). I did a very basic test just buying at the close when the Double7 said to, but didn’t use any ATR. All trades used all the account capital, so gains are compounded and I just bought/sold the S&P500 index (so similar to SPY). Results are below along with buy/hold, and what’s interesting is if you take out 2008 buy/hold is better for most years. I wonder if a simple model of buy/hold and just getting out of the market if S&P500 is below the 200 day moving average is just as good???

    Also note that if you decrease the moving average the results get quite a bit better for Double7. The 200 day MA has a total gain of 34.98%, a 100 day MA has 43.59% and a 30 day MA gets 62.75%.


    2008 – 0.00%
    2009 – 10.62%
    2010 – 1.28%
    2011 – -2.96%
    2012 – 19.32%
    2013 – 4.06%

    2008 – -35.22%
    2009 – 23.45%
    2010 – 12.78%
    2011 – 0.00%
    2012 – 13.41%
    2013 – 6.43%

  • {"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}

    Learn To Code & Build Strategies
    Using EasyLanguage.