This article will detail a methodology to trade the SPY ETF that, back tested over the 23 year life of the SPY ETF, results in about an 8:1 gain versus buying and holding the SPY ETF for the same period.

First let's start with some simple statistics for the SPY ETF:

- Initiated in January, 1993 (23 years)
- Heavily traded, highly liquid, 120M shares traded daily
- Fairly accurately tracks the S&P 500 Index
- Very small Bid/Ask Spread, typically $0.01 during regular trading hours
- Trades both pre-market and after-market

Here's a chart of the performance of the SPY ETF from 1993 - 2015

Looking at the SPY ETF from a probability perspective we find the following:

Total Number of Trading Days = 5773

Number of Winning Days = 3114 (53.94%) **unchanged days counted as winning days*

Number of Losing Days = 2624 (46.06%)

Total % Gain, Winning Days = 2,419.06% (average = +0.78% / day)

Total % Loss, Losing Days = -2,224.56% (average = -0.84% / day)

Total Gain = 194.50% (+8.46% / year)

Notice that we did not include any effects from compounding; we simply added up the daily percentage gains and daily percentage losses. This is a conservative way to present performance data; be very suspicious of any performance data that includes compounding.

Next, let's begin a search for an edge. My definition of a Trading Edge is a statistically significant tradeable advantage that bends the probability of a positive outcome in your favor.

Let's begin by looking at the probabilities and statistics for two very simple ways to trade the SPY ETF. Let's compare the performance of trading the SPY ETF from Close-to-Open [CTO] and from Open-to-Close [OTC].

**Statistics for SPY Open-to-Close [OTC]**

Total Number of Trading Days = 5773

Number of Winning Days = 3049 (52.81%) **unchanged days counted as winning days*

Number of Losing Days = 2724 (47.19%)

Total % Gain, Winning Days = 1,973.23% (average = +0.65% / day)

Total % Loss, Losing Days = -1,972.09% (average = -0.72% / day)

Total Gain = +1.14% ( 0.05% / year)

Wow. Didn't see that coming. So where did all the gains over the last 23 years go? Well, it's all in the daily opening gap!

**Statistics for SPY Close-to-Open [CTO]**

Total Number of Trading Days = 5773

Number of Winning Days = 3276 (56.75%) **unchanged days counted as winning days*

Number of Losing Days = 2497 (43.25%)

Total % Gain, Winning Days = 1,281.13% (average = +0.39% / day)

Total % Loss, Losing Days = -1,088.74% (average = -0.44% / day)

Total Gain = 193.39% ( 8.41% / year)

So a couple of notes here; the total movement of the SPY ETF OTC is 3,945.31% vs 2,370.86% for the SPY ETF CTO, a ratio of 1.66.

So nearly all of the gain in the S&P 500 over the last 23 years can be captured trading Close to Open. Let's see if we can build on that.

Suppose we had a notion that when the price of SPY was above its 200-day [simple] moving average we could assume we're in some sort of bull market, and conversely when SPY is below its 200-day Simple Moving Average [SMA] we're in some sort of bear market. So what would the gain be for a strategy that traded SPY Close-to-Open and when we were above the 200-day SMA we traded the SPY ETF long and when we were below the 200-day SMA we traded the ETF short? Well, if we run the numbers for that scenario we get +147.23%. So that's not a good strategy, you're better off with buy and hold. So the next question might "Well why did we pick the 200-day SMA?" Perhaps there's a better SMA that would produce a better result.

Here's the graph for the Total Percentage Gain trading the SPY ETF Long above a given SMA and Short below a given SMA for a range of Simple Moving Averages from 2 to 400. And the answer is... 392.

What we now have is a simple 2-zone model. Zone 1 is comprised of those days when SPY is above its 392-day SMA and Zone 2 is comprised of those days when SPY is below its 392-day SMA and we trade Zone 1 Long and Zone 2 Short. Here's the statistics for trading this simple 2-zone model:

**SPY 2-Zone 392-day SMA CTO Model**

Total Number of Trading Days = 5373 (we need to "charge up" the SMA)

Number of Winning Days = 2986 (55.57%) **unchanged days counted as winning days*

Number of Losing Days = 2387 (44.43%)

Total % Gain, Winning Days = 1,263.70% (average = +0.42% / day)

Total % Loss, Losing Days = -1,028.22% (average = -0.43% / day)

Total Gain = 235.48%

So a couple of notes here. We achieved a 235.48% Gain using this model but we did it in 400 fewer trading days, so the comparison is actually a bit better than shown. We "traded" 400 fewer days because we needed 400 days of SPY data to establish the SMA. Note also that while the winning days percentage (55.57%) is actually less than simply trading SPY CTO Long (56.75%) we have to factor in the difference in the average daily gain for a winning day versus the average daily loss for a losing day. It's the **combination** of those two parameters that determines the overall total gain and effectiveness of a model.

Let's go back and look at the chart spanning SMA from 1-400. Notice the pronounced initial dip in the chart, which peaks at an SMA value of 12. The total gain for a 2-zone CTO model at SMA 12 is -170.41%, which clearly indicates that we're doing something wrong. All that we need to do to "fix" this is to reverse the strategy; i.e., trade the SPY ETF Short when the closing price is above the 12-day SMA and trade the SPY ETF Long when the closing price is below the 12-day SMA. So how can we incorporate this new information? One way is to move to a 4-zone model:

Zone 1 SPY >= 392 day SMA and also SPY >= 12-day SMA

Zone 2 SPY >= 392 day SMA and also SPY < 12-day SMA

Zone 3 SPY < 392 day SMA and also SPY >= 12-day SMA

Zone 4 SPY < 392 day SMA and also SPY < 12-day SMA

Let's zero in on Zone 2. If we just look at trading days when the SPY ETF is in Zone 2 we get the following statistics:

Total Number of Trading Days = 1514 (28.18% of the time)

Number of Winning Days = 972 (64.20%) **unchanged days counted as winning days*

Number of Losing Days = 542 (35.80%)

Total % Gain, Winning Days = 408.69% (average = +0.42% / day)

Total % Loss, Losing Days = -236.94% (average = -0.44% / day)

Total Gain = 176.20%

So not very impressive from a Total % Gain perspective but then again we're only trading 28% of the time, and when we do trade we have a pretty spectacular win rate, nearly 65%. So what would this actually look like over time if we were to implement it?

This will be the one chart in this article that includes compounding, both for the Zone 2 data and SPY baseline data.

Notice how you conveniently "miss" a lot of the downturns in SPY's performance over the period.

Next, we going to move on to an 8-zone model and then on to a 29-zone model for SPY. There's many ways to "define" the zones in an 8-zone model, much as we did above moving from a 2-zone model to a 4-zone model. The current 8-zone model we trade looks like the following:

Zone |
SMA(m) > EMA(n) |
Slope SMA(m) > x |
Slope EMA(n) > y |

1 |
Yes |
Yes |
Yes |

2 |
Yes |
Yes |
No |

3 |
Yes |
No |
Yes |

4 |
Yes |
No |
No |

5 |
No |
Yes |
Yes |

6 |
No |
Yes |
No |

7 |
No |
No |
Yes |

8 |
No |
No |
No |

Here we use three determinants or conditions; whether the value of a SMA of period **m** days is greater than the value of an EMA of period **n** days, whether the Slope of a SMA of period m days is greater than a constant [X], and whether the Slope of an EMA of period n days is greater than a constant [Y]. So how do we determine the values for m, n, x, and y? We use a computer. In this case we simply run through a range of numbers looking for a maximum value for total percentage gain. Takes about a day on a fast 8-core CPU to analyze several billion potential combinations.

Here's the statistics for an 8-zone SPY model once you've optimized for the four variables.

Zone |
Position |
Total Days |
Winning Days |
Losing Days |
Win Rate, % |
Net Zone Gain, % |

1 |
Short |
214 |
120 |
94 |
56.07% |
17.35% |

2 |
Long |
3529 |
2068 |
1461 |
58.60% |
175.96% |

3 |
Long |
10 |
3 |
7 |
30.00% |
0.85% |

4 |
Long |
61 |
38 |
23 |
62.30% |
1.06% |

5 |
Short |
20 |
8 |
12 |
40.00% |
2.20% |

6 |
Long |
631 |
379 |
252 |
60.06% |
65.38% |

7 |
Long |
119 |
74 |
45 |
62.18% |
31.94% |

8 |
Short |
896 |
469 |
427 |
52.34% |
65.41% |

57.65% |
360.15% |

Well, now we're getting somewhere. We're a little under 2x the original total percentage gain for the SPY ETF (194%). Notice, however, how the days are very unevenly distributed within the 8-zones. What can we do about that? One answer is a process we call "distillation", which is simply rerunning the model, again using 8-zones as before, but only on the subset of days that are in a particular zone. In that process we find a new set of m, n, x, and y values specific to that zone. Basically we're sub-dividing a large sample zone into 8 new unique zones. Looking at the chart above, Zones 2, 6, and 8 are good candidates for this process. For notation purposes we'll simply call these new zones Zones 2.1 thru 2.8, 6.1 through 6.8 and 8.1 through 8.8.

Here's the statistics for one of those subdivided zones, Zone 8:

Zone |
Position |
Total Days |
Winning Days |
Losing Days |
Win Rate, % |
Net Zone Gain, % |

8.1 |
Short |
186 |
112 |
74 |
60.22% |
27.53% |

8.2 |
Short |
50 |
28 |
22 |
56.00% |
11.38% |

8.3 |
Long |
121 |
67 |
54 |
55.37% |
17.00% |

8.4 |
Short |
83 |
51 |
32 |
61.45% |
15.78% |

8.5 |
Long |
12 |
8 |
4 |
66.67% |
4.60% |

8.6 |
Short |
6 |
4 |
2 |
66.67% |
3.73% |

8.7 |
Short |
365 |
188 |
177 |
51.51% |
49.03% |

8.8 |
Long |
73 |
45 |
28 |
61.64% |
20.46% |

56.14% |
149.51% |

Notice how we've now gone from a win rate of 52.34% to 56.14% and a net region gain of 65.41% to 149.51%.

Here's how the full 29-zone SPY CTO model looks with Zones 2, 6, and 8 subdivided.

Zone |
Original Win Rate, % |
New Win Rate, % |
Original Net Gain, % |
New Net Gain, % |

1 |
56.07% |
17.35% |
||

2 |
58.60% |
59.33% |
175.96% |
218.09% |

3 |
30.00% |
0.85% |
||

4 |
62.30% |
1.06% |
||

5 |
40.00% |
2.20% |
||

6 |
60.06% |
62.18% |
65.38% |
90.36% |

7 |
62.18% |
31.94% |
||

8 |
52.34% |
56.14% |
65.41% |
149.51% |

57.65% |
57.79% |
360.15% |
511.36% |

That's a nice boost. Let's look at some more statistics for SPY focusing on the opening gap. When SPY gaps up and the model is long that's a good thing; we sell at the open and lock in a profit. Conversely, when SPY gaps down and the model is short we also lock in a profit. But what can we do when the model is wrong? That would mean a gap down when we're long and a gap up when we're short. Let's look at the statistics for SPY opening bell gaps, both up and down. Gaps, so I'm told, tend to * fill*. Is this really the case?

Overall, SPY gaps up 56.75% of the time and gaps down 43.25% of the time, inline with what we previously observed trading Close-to-Open. When SPY gaps up it fills that gap 69.25% of the time (where a fill means that during the day SPY dips back to or below the previous day's close) and when SPY gaps down it fills that gap 72.47% of the time. So we can simply lay a "strategy" on top of the model that looks like this:

If the model is correct (either Long or Short) close the position at the open and take your profit.

If the model is incorrect and the opening gap is against you, enter a limit order to close your position at the previous day's close (your entry point). If this order executes (and it will 69-72% of the time) you're back to break-even.

If the model is incorrect and the opening gap is against you and the gap does not fill, you close your position at that day's close for a loss.

So what does this combination of the SPY 29-zone CTO model and what we call a "break-even" strategy look like?

The total percentage gain goes from 511.36% to 655.84%

**Risk**

One of the things a smart trader or investor always asks first is "what's my risk" rather than "how much money can I make". So the next chart shows the maximum draw down for the SPY CTO 29-zone Break Even model for a range of days from 1 through 500 (about 2 trading years).

The worst-case loss for the model is -11.26% and occurs at 10 trading days. Of note also is the "crossover point" where the model is always net profitable; that occurs at 223 trading days, just shy of a year.

Here's the year by year percentage gain for the SPY CTO 29-zone model with the break-even strategy.

**Leverage**

Last, there's leverage. Once you begin to have confidence in a model, leverage becomes your friend. In the last decade there's been a massive growth in leveraged and inverse leveraged ETFs, and the two we trade for SPY are (NYSEARCA:SPXL) and (NYSEARCA:SPXS). These ETFs are advertised as 3X ETFs; in practice you'd be happy with 2.5x.

If we used the 3X Leveraged ETFs since their inception in late 2008 along with the SPY 29-zone CTO Simple Model (no Break-Even) we get the following results for the period 11/20/2008 through 12/31/2015:

1X SPY CTO 29-Zone Model Total Gain = 163.73%

3X SPY (SPXS / SPXL live data) CTO 29-Zone Model Total Gain = 388.62%

Leverage Factor = 2.37x

Quite a bit less than the "3X" advertised but still a nice boost.

So last, we take the 655.84% total gain for the SPY CTO 29-zone Break-Even Model and multiple by 2.37; we get 1,554%, which is right at 8:1 vs SPY (194%).