As of 04/18/2024
  Indus: 37,775 +22.07 +0.1%  
  Trans: 14,947 -39.62 -0.3%  
  Utils: 860 +6.95 +0.8%  
  Nasdaq: 15,602 -81.87 -0.5%  
  S&P 500: 5,011 -11.09 -0.2%  
YTD
 +0.2%  
-6.0%  
-2.4%  
 +3.9%  
 +5.1%  
  Targets    Overview: 04/12/2024  
  Up arrow39,800 or 37,150 by 05/01/2024
  Up arrow16,200 or 15,000 by 05/01/2024
  Up arrow885 or 850 by 05/01/2024
  Up arrow16,700 or 15,800 by 05/01/2024
  Up arrow5,250 or 5,025 by 05/01/2024
As of 04/18/2024
  Indus: 37,775 +22.07 +0.1%  
  Trans: 14,947 -39.62 -0.3%  
  Utils: 860 +6.95 +0.8%  
  Nasdaq: 15,602 -81.87 -0.5%  
  S&P 500: 5,011 -11.09 -0.2%  
YTD
 +0.2%  
-6.0%  
-2.4%  
 +3.9%  
 +5.1%  
  Targets    Overview: 04/12/2024  
  Up arrow39,800 or 37,150 by 05/01/2024
  Up arrow16,200 or 15,000 by 05/01/2024
  Up arrow885 or 850 by 05/01/2024
  Up arrow16,700 or 15,800 by 05/01/2024
  Up arrow5,250 or 5,025 by 05/01/2024

Bulkowski on the Double 7s Trading Setup

 

Double 7s Trading Setup: Summary

The following rules performed well using in-sample and way-out-of-sample data when compared to the original rules. However, I do not think this represents a system worth trading. Although it sports a high win/loss ratio, the profits just aren't there. You may decide otherwise. Before trading this setup, be sure to test it on your security.

  1. The ETF closes above the 30-bar simple moving average of closing prices.
  2. When the ETF makes its lowest close in 11 price bars (including today), buy on the close today.
  3. When the ETF makes its highest open in 7 price bars (including today), use a trailing stop placed 10 cents below today's high price to exit.

Double 7s Trading Setup: Definitions

I using the following definitions.

Top of page

Double 7s Trading Setup: Background

The idea for the double 7s trading setup is not my own. Rather, it comes from an article by Larry Connors and David Penn in the January 2009 issue of Technical Analysis of Stocks & Commodities magazine. Based on the number of letters to the editor it received over several issues, it was a popular article.

The double 7s setup only trades from the long side and, according to the article, is meant for exchange traded funds (ETFs). The idea behind double 7s is to catch pullbacks in an upward price trend.

The article says that the authors tested the setup on the Standard & Poor's 500 (SPX) and the Nasdaq 100 (NDX) from January 1995 through April 2008, but my testing shows that the actual date ranges from January 1995 to January 2008, not April.

What is the double 7s setup? The setup has three simple rules, taken verbatim from the article.

  1. The ETF is above the 200-day moving average.
  2. The ETF closes at a seven-day low. Buy on the close.
  3. Exit when the ETF closes at a seven-day high.

Here is what they meant to write.

  1. The ETF closes above the 200-day simple moving average of closing prices.
  2. The ETF makes its lowest close in 7 price bars (6 prior bars plus today). Buy on the close today.
  3. Exit on the close today when the ETF makes its highest close in 7 price bars (6 prior bars plus today).
A chart of the FTSE/Xinhua China 25 index fund (FXI) on the daily scale

Let's give you an example of how the system works, using the best trade posted by FXI in my tests. The chart shows the FTSE/Xinhua China 25 index fund (FXI) on the daily scale.

Using the rules outlined above, a buy order is placed at the close at A when price closes below the prior six days. Day 6 I show as point D. Three days later, price has climbed to B. The sell signal comes when price closes above the prior six closes, which begin at C. Trading 100 shares in the ETF with $10 commissions each way, gives a profit of $182 or 4.1%. As I mentioned, this is the best trade that this system offers for this ETF. Notice how the results deteriorate if the trade occurs at the opening price the next day.

That highlights an interesting quirk of the system: The authors are using a signal based on the closing price today to enter or exit a position using the closing price today. In other words, just before the market closes, they must guess that their system will receive a signal and that there remains enough time and activity to fire off a trade, hoping it will fill at the closing price. Now imagine that you had a dozen ETFs to check, and you can understand the problem with this situation.

Top of page

Double 7s Trading Setup: Article Testing

The following table shows what they reported as results compared to what I found.

My resultsTheir ResultsImproved Results
SymbolPercent
Profitable
PointsProfit per Trade
Per Share
SymbolPercent
Profitable
PointsSymbolPercent
Profitable
PointsProfit per Trade
Per Share
NDX79.85%2,817$21.84 or 1.4%NDX79.84%2,822NDX78.90%1,511$39.77 or 2.5%
^GSPC79.5%1,133$8.59 or 0.8%SPX~80%1,133^GSPC78.30%263$5.72 or 0.6%
FXI80.8%$11.18$0.43 or 1.4%FXI73%?FXI100%5.04$0.72 or 2.5%
EWZ83.9%$50.99$0.82 or 2.6%EWZ>80%?EWZ81.80%21.17$0.96 or 3.7%

My results for the NDX is within 5 points of theirs (which could be due to dividend adjustments) and the win/loss ratio is about dead on. The same can be said for the SPX/^GSPC. However, the FXI trade is off: 73% win/loss ratio versus 80.8%. I tried different end dates without success.

I am comfortable with the belief that I can reliably reproduce their results.

Look at the profit numbers. Yuck! Nowhere in the article did they give a full accounting of their system. That made me suspicious, especially when a trade makes only 43 cents per share, on average, and that is before commissions.

After finishing testing and optimizing the various parameters, the right side of the above table shows the results. I did not include NDX in my testing, so the results show how tuning the system on in-sample data can help with what I call way-out-of-sample data. In this case, profits jumped from $21.84 per trade to $39.77, or almost double.

With the S&P 500 index (^GSPC), the results went the other way: $8.59 versus $5.72. EWZ was used as part of the in-sample testing but not FXI. FXI shows profit rising from $0.43 per trade to $0.72. In fact, if you compare the ETFs run through the optimized system with the original double 7 parameters, you will find that over 90% of the funds show performance improvement, with many of them switching from a loss to a profit.

Let's take a closer look at additional testing to see how I improved the original results.

Top of page

Double 7s Trading Setup: My Testing

I tested the double 7s setup using many variations. The first employs all of the 93 ETFs that I follow. Using 100 shares and $10 commissions per trade ($20 round trip), the original system is profitable just 34% of the time. By that I mean that 34% of the ETFs had net profits using the original double 7s setup. The results are in the spreadsheet labeled, All ETFs.xls, which is contained in a zip file for downloading.

Combining the results shows that the system posts an average loss of $6.15 per trade or -0.2% (using 3,807 trades), and has a win/loss ratio of 59.4%. The maximum loss was 68.9%, the maximum gain was 64% with an average 12 calendar day hold time. Notice that the maximum loss is above the maximum gain. In a good system, those two should be reversed.

Based on these results alone, I would not trade this system. With only 34% of ETFs showing gains, I have no assurance that the system will continue to work for the ETF I want to trade, even if testing showed it made a profit in the past.

For additional tests, I selected nine ETFs that began no more recently than 2002, but stretching as far back as 1996. I optimized parameters on this in-sample data and used the out-of-sample data and way-out-of-sample ETFs to confirm the results. Even though I optimized parameters, splitting the data in this manner avoided curve fitting the results to the data while still verifying that I was on the right track.

Top of page

Double 7s Trading Setup: Moving Averages

I explored various moving averages on in-sample ETFs to determine whether or not a 200 bar simple moving average resulted in the best performance. The spreadsheet titled, In-sample MA test.xls in the zip file shows the entire results. The following table extracts a portion of them.

Net ProfitAvg/TradeAvg/TradeTradesWin/LossMaxLossMaxGainHoldDescription
$3,692.00 $13.67 0.60%27068.50%-47.80%15.70%12Buy MA=25 Buy=6 Sell=6
$4,198.00 $14.48 0.60%29069.00%-47.80%15.70%12Buy MA=30 Buy=6 Sell=6
$2,896.00 $9.75 0.40%29766.00%-47.80%15.70%12Buy MA=35 Buy=6 Sell=6
($64.00)($0.22)0.00%29661.50%-28.90%10.50%12Buy MA=195 Buy=6 Sell=6
($206.00)($0.70)0.00%29561.40%-28.90%10.50%12Buy MA=200 Buy=6 Sell=6
($206.00)($0.70)0.00%29561.40%-28.90%10.50%12Buy MA=205 Buy=6 Sell=6

I bracketed the 30 and the 200 bar simple moving averages just to show you the statistics. I chose the 30 SMA as the best performing moving average for the in-sample ETFs. You will notice that the 30 bar SMA makes money, but the 200 SMA does not. The win/loss ratio is 69% compared to 61%, but the max loss is substantially higher for the 30 versus the 200 day SMA: 47.8% compared to 28.9%. The max gain is higher, though, 15.7% to 10.5%.

Out-of-sample tests performed better with the 200 day SMA making $30.36 per trade or 0.6% with a 71% win/loss ratio, 29.7% max loss, and 12.8% max gain. Those results compare to the 30 bar SMA making $46.57 per trade or 1.0% with 73.3% winning, 29.7% max loss and 19% max gain. The out-of-sample tests revealed that a 15 bar SMA was optimum, scoring $75.25 or 1.6% average per trade and a 79.5% win/loss ratio. The max loss was smaller, 21.5% with the same 19% max gain. Since this is out-of-sample, I decided to stay with the 30 SMA setting as the preferred one.

Top of page

Double 7s Trading Setup: Trigger Below the MA?

As another check, I tested whether or not a closing price below the moving average resulted in better performance than when price closed above the moving average on entry. None of the tests showed a profit. In short, wait for price to close above the moving average before taking a position. These results are at the bottom of the In-sample MA test.xls spreadsheet.

Double 7s Trading Setup: Use Close or Open?

For the next test, I wanted to know if buying or selling using today's close versus tomorrow's open was best. The following table shows the results of in-sample tests using a 30 bar SMA with 6 days look back for buying and selling.

Net ProfitAvg/TradeAvg/TradeTradesWin/LossMaxLossMaxGainHoldDescription
$4,198.00$14.480.60%29069.00%-47.80%15.70%12Buy and sell on close today
$3,982.77$13.730.60%29064.80%-47.70%15.40%10Buy open next day, sell on close today
$3,379.30$11.650.50%29066.20%-47.80%15.70%12Buy on close today, sell on open next day
$3,164.07$10.910.40%29064.10%-47.70%15.40%10Buy and sell on open next day

As the results show, buying and selling on the current day's close results in the highest average dollars per trade ($14.48 or 0.6%), the best win/loss ratio (69%), with little changes in the max loss or max gain. If you are serious about using the double 7s strategy for trading then buy or sell on the same day you get a signal.

Out-of-sample testing shows mixed results. Buying and selling on the close the same day places second for net profit behind buying on the close the same day and selling on the open the next day.

Using way-out-of-sample ETFs shows similar findings as the prior test with the close-close scenario placing second behind the close-open setup. Based on the in-sample tests, I am going to keep the close-close setup instead of using the close-open scenario. However, later tests will reveal that using a trailing stop to sell results in more profit than selling at the close the same day.

The spreadsheet Open Close test.xls in the zip file details the results.

Top of page

Double 7s Trading Setup: Buy Look Back

The buy look back is what I call how far you scan to see if today's closing price is below the prior closing price. The default is 6 price bars, which does not include today, but is that the optimum number? The following table shows the results for various tests.

Net ProfitAvg/TradeAvg/TradeTradesWin/LossMaxLossMaxGainHoldDescription
($206.00)($0.70)0.00%29561.40%-28.90%10.50%12Buy MA=200 Buy=6 Sell=6, benchmark
$2,803.00$22.420.90%12570.40%-46.50%13.20%11Buy MA=30 Buy=10 Sell=6, in-sample
$6,265.08$47.831.10%13175.60%-27.40%13.60%11Buy MA=30 Buy=9 Sell=6, out-of-sample
$2,160.00$11.020.40%19664.80%-22.10%27.50%11Buy MA=30 Buy=15 Sell=6, way-out-of-sample

The benchmark, using a 200 day simple moving average, shows a minor loss of $206 over 295 trades. Running a scan from 1 day to 25 shows that 10 days is the optimum look back number. There are higher profit numbers, but they have fewer than 100 trades. I threw them out because of the low sample count. The complete results are included in Buy rules.xls spreadsheet in the zip file.

Since the in-sample and out-of-sample show values close to one another, I am going to use 10 days as the look back when buying. Again, the 10 day look back does not include today.

Double 7s Trading Setup: Buy Trigger, OHLC?

Next I tested whether the open, high, low, or closing price should trigger the buy. In other words, when the open/high/low/close price is below the prior 10 days of open/high/low/close prices then buy.

Results show that the closing price works best. That corresponds to the in-sample line in the above table. The results also appear in the Buy rules.xls spreadsheet in the zip file.

Top of page

Double 7s Trading Setup: Sell Using OHLC?

Before I test the look back, I tested the exit signal using the opening, high, low, or closing prices. For example, if the opening price is higher today than in the past 6 days, then sell. I substituted the opening price for the others and tested each one. The following table shows the results.

Net ProfitAvg/TradeAvg/TradeTradesWin/LossMaxLossMaxGainHoldDescription
$3,030.00$24.441.00%12466.90%-46.50%17.00%12Sell on higher opening price
$2,744.00$21.950.90%12569.60%-46.50%13.20%11Sell on higher high price
$3,217.00$25.941.00%12466.90%-23.50%17.00%11Sell on higher low price
$2,803.00$22.420.90%12570.40%-46.50%13.20%11Sell on higher closing price

The highest average gain per trade comes when you sell on a higher low. In other words, if today's low price is above the prior ones, then sell.

Unfortunately, way-out-of-sample tests, shown in the table below, suggest using the opening price instead of the low for the most profit. Out-of-sample tests have the closing price outperforming the others. So, three tests give three different answers. Ugh! The out-of-sample tests show the opening price coming in second for performance (and first in way-out-of-sample), so that is what I will use.

Net ProfitAvg/TradeAvg/TradeTradesWin/LossMaxLossMaxGainHoldDescription
$9,181.71$8.190.30%112159.90%-40.00%64.00%12Sell on higher opening price
$3,796.95$3.400.10%111662.40%-66.40%49.00%12Sell on higher high price
$153.73$0.140.00%111462.50%-66.40%49.00%12Sell on higher low price
$2,730.44$2.440.10%111864.20%-66.70%64.00%12Sell on higher closing price

These results appear in the Sell rules.xls spreadsheet.

Top of page

Double 7s Trading Setup: Sell Look Back

The look back, as you will recall, checks back a number of days to make sure the ETF is closing at a x day high, with x being the number of days to look back. For example, if today price closes above the prior 6 closes, then the system would flag a sale.

I tested the sell look back number to determine the best setting using in-sample, out-of-sample, and way-out-of-sample data. The in-sample tests showed that a period of 21 days worked best, with days from 15 to 23 also doing well. Out-of-sample data showed a 6 day look back gave a low maximum loss (22.9%) with an average rise per trade of 0.70%. This was not the most profitable setting. A 50 day look back scored an average rise of 0.90% but the maximum loss jumped to 72.1%. I felt that the lower setting was better. The way-out-of-sample tests confirm the 6 day look back as being a good one to use. Again, this was not the most profitable (19 days was with gains of 0.60% per trade), but the maximum loss also jumped to 69.9%. I decided to stay with the 6 day look back.

The following table shows the results for way-out-of-sample data, which are ETFs not used in the tests and the date range spans from January 1995 to June 2009.

Net ProfitAvg/TradeAvg/TradeTradesWin/LossMaxLossMaxGainHoldDescription
$6,657.74$5.890.20%113154.80%-40.00%49.00%9Buy MA=30 Buy=10 Sell=4
$7,312.63$6.510.20%112458.60%-40.00%64.00%10Buy MA=30 Buy=10 Sell=5
$9,181.71$8.190.30%112159.90%-40.00%64.00%12Buy MA=30 Buy=10 Sell=6
$3,325.71$2.980.10%111561.30%-66.40%64.00%14Buy MA=30 Buy=10 Sell=7
($3,610.09)($3.24)-0.10%111461.30%-66.40%64.00%16Buy MA=30 Buy=10 Sell=8

You can find these results in the Sell rules.xls spreadsheet.

Top of page

Double 7s Trading Setup: Buy Stops

If price continues lower then you will want to postpone buying the ETF. The following tests if waiting for a lower price results in better profits or lower risk.

The test has two variables, the stop amount and which of the open, high, low or closing prices to trigger on. Let's take them in order using the optimum settings found so far (Buy MA=30 Buy=10 Sell=6). The following table shows the results for in-sample tests using the high price. By that I mean I will trail the stop above the high price each day, trying to get a better entry.

Net ProfitAvg/TradeAvg/TradeTradesWin/LossMaxLossMaxGainHoldCents
$3,918.03$31.601.30%12465.30%-46.50%17.00%14No stop used
$1,929.53$15.560.60%12464.50%-45.50%15.50%111
$1,627.89$13.130.50%12458.90%-45.50%15.40%105
$1,598.52$12.890.50%12456.50%-45.60%15.30%1010
$1,379.15$11.120.40%12455.60%-45.90%15.20%915
$1,137.96$9.180.40%12452.40%-46.50%15.20%920

The above table shows that not using a buy stop results in the highest profit with only a slight increase in the risk (maximum loss).

The following table confirms that not using a buy stop results in the best performance. This test keeps a 1-cent stop but varies the open, high, low, or closing prices as the trigger. Additional tests on way-out-of-sample data shows that a buy stop does not increase profits nor does it substantially reduce risk.

Net ProfitAvg/TradeAvg/TradeTradesWin/LossMaxLossMaxGainHoldPrice
$3,918.03$31.601.30%12465.30%-46.50%17.00%14No stop used
$2,282.35$18.410.70%12466.90%-45.50%22.80%12Open
$1,929.53$15.560.60%12464.50%-45.50%15.50%11High
$3,283.62$26.481.10%12466.90%-45.50%16.90%12Low
$3,143.99$25.351.00%12466.10%-45.50%16.90%12Close

You can find these results in the Buy and sell stops.xls spreadsheet. Additional results using older parameter settings are in the Buy stops.xls spreadsheet.

Top of page

Double 7s Trading Setup: Sell Stops

I had more success with sell stops. In its original form, a trailing sell stop occurs when price closes at a seven day high. You trail the stop upward, trying to piggyback on an upward price trend. When the trend ends, the trailing stop will take you out and protect profits.

Testing revealed that the high price was the best one to base the stop on. Also, placing a stop ten cents away from the high price resulted in improved performance. The following table shows the results for in-sample tests using a 10 cent stop placed below the high price and raised each day if a higher high occurred.

Net ProfitAvg/TradeAvg/TradeTradesWin/LossMaxLossMaxGainHoldPrice
$3,609.57$29.111.20%12462.90%-46.50%17.00%14Open
$3,918.03$31.601.30%12465.30%-46.50%17.00%14High
$3,539.66$28.781.20%12362.60%-46.50%17.00%16Low
$3,613.41$29.141.20%12466.10%-46.50%17.00%14Close

These results are also in the Buy and sell stops.xls spreadsheet.

Double 7s Trading Setup: Closing Position

If you combine all of the results together, you get the rules shown in the Summary. The original system was profitable only 34% of the time in 93 ETFs. The optimized system is profitable 58% of the time on 84 ETFs (the remainder had no trades). Results using data from January 1991 to June 23 shows 57% are profitable.

Two funds stand out for performance: SRS and SKF. Both short the market, SRS handles real estate and SKF covers the financials. Together they made only 6 trades but net profits were over 10% in each fund. You might think that they benefited from the 2008 bear market but the trades occurred in mid to late 2007. I show them at the bottom of the Optimized results for All ETFs.xls spreadsheet.

My opinion about this system is that profitability is lousy. It does not prove itself over a variety of funds, suggesting that it will cease to work if you actually trade its signals. The choices I made in optimizing the system were many and they likely reduced the number of trades. You will want to perform your own tests and make your own choices before using this system.

If there is one facet about this system that is very good, it is the high win/loss ratio. Perhaps you can build on the system to keep the ratio high while also improving profitability.

-- Thomas Bulkowski

Top of page

See Also

 

Support this site! Clicking any of the books (below) takes you to Amazon.com If you buy ANYTHING while there, they pay for the referral.
Legal notice for paid links: "As an Amazon Associate I earn from qualifying purchases."

My Stock Market Books
My Novels

Copyright © 2005-2024 by Thomas N. Bulkowski. All rights reserved.
Disclaimer: You alone are responsible for your investment decisions. See Privacy/Disclaimer for more information.
Some pattern names are registered trademarks of their respective owners.
Home Advertise Contact Donate Privacy/Disclaimer

I call my dog Egypt because in every room he leaves a pyramid.Smiley