As of 12/20/2024
Indus: 42,840 +498.02 +1.2%
Trans: 15,892 +32.54 +0.2%
Utils: 986 +14.76 +1.5%
Nasdaq: 19,573 +199.83 +1.0%
S&P 500: 5,931 +63.77 +1.1%
|
YTD
+13.7%
0.0%
+11.9%
+30.4%
+24.3%
|
44,200 or 41,750 by 01/01/2025
16,100 or 17,700 by 01/01/2025
1,050 or 975 by 01/01/2025
20,500 or 19,300 by 01/01/2025
6,100 or 5,775 by 01/01/2025
|
As of 12/20/2024
Indus: 42,840 +498.02 +1.2%
Trans: 15,892 +32.54 +0.2%
Utils: 986 +14.76 +1.5%
Nasdaq: 19,573 +199.83 +1.0%
S&P 500: 5,931 +63.77 +1.1%
|
YTD
+13.7%
0.0%
+11.9%
+30.4%
+24.3%
| |
44,200 or 41,750 by 01/01/2025
16,100 or 17,700 by 01/01/2025
1,050 or 975 by 01/01/2025
20,500 or 19,300 by 01/01/2025
6,100 or 5,775 by 01/01/2025
| ||
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.
I using the following definitions.
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.
Here is what they meant to write.
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.
The following table shows what they reported as results compared to what I found.
My results | Their Results | Improved Results | ||||||||
Symbol | Percent Profitable | Points | Profit per Trade Per Share | Symbol | Percent Profitable | Points | Symbol | Percent Profitable | Points | Profit per Trade Per Share |
NDX | 79.85% | 2,817 | $21.84 or 1.4% | NDX | 79.84% | 2,822 | NDX | 78.90% | 1,511 | $39.77 or 2.5% |
^GSPC | 79.5% | 1,133 | $8.59 or 0.8% | SPX | ~80% | 1,133 | ^GSPC | 78.30% | 263 | $5.72 or 0.6% |
FXI | 80.8% | $11.18 | $0.43 or 1.4% | FXI | 73% | ? | FXI | 100% | 5.04 | $0.72 or 2.5% |
EWZ | 83.9% | $50.99 | $0.82 or 2.6% | EWZ | >80% | ? | EWZ | 81.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.
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.
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 Profit | Avg/Trade | Avg/Trade | Trades | Win/Loss | MaxLoss | MaxGain | Hold | Description |
$3,692.00 | $13.67 | 0.60% | 270 | 68.50% | -47.80% | 15.70% | 12 | Buy MA=25 Buy=6 Sell=6 |
$4,198.00 | $14.48 | 0.60% | 290 | 69.00% | -47.80% | 15.70% | 12 | Buy MA=30 Buy=6 Sell=6 |
$2,896.00 | $9.75 | 0.40% | 297 | 66.00% | -47.80% | 15.70% | 12 | Buy MA=35 Buy=6 Sell=6 |
($64.00) | ($0.22) | 0.00% | 296 | 61.50% | -28.90% | 10.50% | 12 | Buy MA=195 Buy=6 Sell=6 |
($206.00) | ($0.70) | 0.00% | 295 | 61.40% | -28.90% | 10.50% | 12 | Buy MA=200 Buy=6 Sell=6 |
($206.00) | ($0.70) | 0.00% | 295 | 61.40% | -28.90% | 10.50% | 12 | Buy 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.
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.
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 Profit | Avg/Trade | Avg/Trade | Trades | Win/Loss | MaxLoss | MaxGain | Hold | Description |
$4,198.00 | $14.48 | 0.60% | 290 | 69.00% | -47.80% | 15.70% | 12 | Buy and sell on close today |
$3,982.77 | $13.73 | 0.60% | 290 | 64.80% | -47.70% | 15.40% | 10 | Buy open next day, sell on close today |
$3,379.30 | $11.65 | 0.50% | 290 | 66.20% | -47.80% | 15.70% | 12 | Buy on close today, sell on open next day |
$3,164.07 | $10.91 | 0.40% | 290 | 64.10% | -47.70% | 15.40% | 10 | Buy 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.
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 Profit | Avg/Trade | Avg/Trade | Trades | Win/Loss | MaxLoss | MaxGain | Hold | Description |
($206.00) | ($0.70) | 0.00% | 295 | 61.40% | -28.90% | 10.50% | 12 | Buy MA=200 Buy=6 Sell=6, benchmark |
$2,803.00 | $22.42 | 0.90% | 125 | 70.40% | -46.50% | 13.20% | 11 | Buy MA=30 Buy=10 Sell=6, in-sample |
$6,265.08 | $47.83 | 1.10% | 131 | 75.60% | -27.40% | 13.60% | 11 | Buy MA=30 Buy=9 Sell=6, out-of-sample |
$2,160.00 | $11.02 | 0.40% | 196 | 64.80% | -22.10% | 27.50% | 11 | Buy 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.
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.
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 Profit | Avg/Trade | Avg/Trade | Trades | Win/Loss | MaxLoss | MaxGain | Hold | Description |
$3,030.00 | $24.44 | 1.00% | 124 | 66.90% | -46.50% | 17.00% | 12 | Sell on higher opening price |
$2,744.00 | $21.95 | 0.90% | 125 | 69.60% | -46.50% | 13.20% | 11 | Sell on higher high price |
$3,217.00 | $25.94 | 1.00% | 124 | 66.90% | -23.50% | 17.00% | 11 | Sell on higher low price |
$2,803.00 | $22.42 | 0.90% | 125 | 70.40% | -46.50% | 13.20% | 11 | Sell 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 Profit | Avg/Trade | Avg/Trade | Trades | Win/Loss | MaxLoss | MaxGain | Hold | Description |
$9,181.71 | $8.19 | 0.30% | 1121 | 59.90% | -40.00% | 64.00% | 12 | Sell on higher opening price |
$3,796.95 | $3.40 | 0.10% | 1116 | 62.40% | -66.40% | 49.00% | 12 | Sell on higher high price |
$153.73 | $0.14 | 0.00% | 1114 | 62.50% | -66.40% | 49.00% | 12 | Sell on higher low price |
$2,730.44 | $2.44 | 0.10% | 1118 | 64.20% | -66.70% | 64.00% | 12 | Sell on higher closing price |
These results appear in the Sell rules.xls spreadsheet.
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 Profit | Avg/Trade | Avg/Trade | Trades | Win/Loss | MaxLoss | MaxGain | Hold | Description |
$6,657.74 | $5.89 | 0.20% | 1131 | 54.80% | -40.00% | 49.00% | 9 | Buy MA=30 Buy=10 Sell=4 |
$7,312.63 | $6.51 | 0.20% | 1124 | 58.60% | -40.00% | 64.00% | 10 | Buy MA=30 Buy=10 Sell=5 |
$9,181.71 | $8.19 | 0.30% | 1121 | 59.90% | -40.00% | 64.00% | 12 | Buy MA=30 Buy=10 Sell=6 |
$3,325.71 | $2.98 | 0.10% | 1115 | 61.30% | -66.40% | 64.00% | 14 | Buy MA=30 Buy=10 Sell=7 |
($3,610.09) | ($3.24) | -0.10% | 1114 | 61.30% | -66.40% | 64.00% | 16 | Buy MA=30 Buy=10 Sell=8 |
You can find these results in the Sell rules.xls spreadsheet.
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 Profit | Avg/Trade | Avg/Trade | Trades | Win/Loss | MaxLoss | MaxGain | Hold | Cents |
$3,918.03 | $31.60 | 1.30% | 124 | 65.30% | -46.50% | 17.00% | 14 | No stop used |
$1,929.53 | $15.56 | 0.60% | 124 | 64.50% | -45.50% | 15.50% | 11 | 1 |
$1,627.89 | $13.13 | 0.50% | 124 | 58.90% | -45.50% | 15.40% | 10 | 5 |
$1,598.52 | $12.89 | 0.50% | 124 | 56.50% | -45.60% | 15.30% | 10 | 10 |
$1,379.15 | $11.12 | 0.40% | 124 | 55.60% | -45.90% | 15.20% | 9 | 15 |
$1,137.96 | $9.18 | 0.40% | 124 | 52.40% | -46.50% | 15.20% | 9 | 20 |
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 Profit | Avg/Trade | Avg/Trade | Trades | Win/Loss | MaxLoss | MaxGain | Hold | Price |
$3,918.03 | $31.60 | 1.30% | 124 | 65.30% | -46.50% | 17.00% | 14 | No stop used |
$2,282.35 | $18.41 | 0.70% | 124 | 66.90% | -45.50% | 22.80% | 12 | Open |
$1,929.53 | $15.56 | 0.60% | 124 | 64.50% | -45.50% | 15.50% | 11 | High |
$3,283.62 | $26.48 | 1.10% | 124 | 66.90% | -45.50% | 16.90% | 12 | Low |
$3,143.99 | $25.35 | 1.00% | 124 | 66.10% | -45.50% | 16.90% | 12 | Close |
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.
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 Profit | Avg/Trade | Avg/Trade | Trades | Win/Loss | MaxLoss | MaxGain | Hold | Price |
$3,609.57 | $29.11 | 1.20% | 124 | 62.90% | -46.50% | 17.00% | 14 | Open |
$3,918.03 | $31.60 | 1.30% | 124 | 65.30% | -46.50% | 17.00% | 14 | High |
$3,539.66 | $28.78 | 1.20% | 123 | 62.60% | -46.50% | 17.00% | 16 | Low |
$3,613.41 | $29.14 | 1.20% | 124 | 66.10% | -46.50% | 17.00% | 14 | Close |
These results are also in the Buy and sell stops.xls spreadsheet.
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
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
|
I call my dog Egypt because in every room he leaves a pyramid.