Markets › Stocks & ETFs · SPY ETF, daily closes, with dividends
Double 7s Strategy on SPY: 32-Year Backtest of Connors' Rule
Buy the S&P 500 at a 7-day closing low while it is in an uptrend, sell at a 7-day closing high: we backtested Larry Connors and Cesar Alvarez's Double 7s rule on SPY from 1994 to 2026, with dividends, costs and a random control, with the rules fixed before any number was computed. It passed every gate, one of them by a hair, on a market and a last period we had already used: a result to confirm on new data, not a recipe to trade.
Survived · Needs new dataPassed all six gates, the control by a hair. Random dips in an uptrend nearly kept up.
Variants tried: 1 · Passed every gate: 1 · Best: 6 of 6 · Holdout opened: yes (already used)
Short answer: on SPY it survived our test, barely. Buying at a 7-day closing low above the 200-day average and selling at a 7-day closing high made +0.71% a trade after costs from 1994 to 2026, with 79% winners, and passed all six of our gates; but random buys on any dip in an uptrend, with the same exit, made +0.61%, so its margin over chance was thin.
00The verdict in three lines
- Does the Double 7s strategy work? On SPY it survived our tests, which is not proof that it will keep working: buying at a 7-day closing low above the 200-day average and selling at a 7-day closing high made +0.710% a trade on average after costs on 326 trades, with 78.8% winners. It passed all six of our gates.
- Only just better than chance. Random buys on any dip in an uptrend, with the same exit, made +0.610% a trade in the median run. The rule beat 476 of 500 such runs, so it cleared our 95th-percentile gate by a hair. Most of the result comes from buying dips in a rising market and waiting for a full recovery.
- Not new evidence for dip buying. It is a close relative of the RSI(2) rule that passed on the same SPY data: 114 of its 326 entries fell on an RSI(2) entry day. Our last period had been used before. Only new data can confirm it, and under our protocol a survivor goes to forward testing before anyone should risk money.
01The Double 7s strategy
Larry Connors and Cesar Alvarez published it in Short Term Trading Strategies That Work (2008), chapter 10, for stock indices and index ETFs, with SPY as the example. It has three rules:
- Trend: SPY is above its 200-day moving average.
- Buy at the close when SPY closes at a 7-day low.
- Sell at the close when SPY closes at a 7-day high. No stop.
We did not have the book, so we worked from summaries of it, which agree on these three rules but not on the details (next section). The only figures attributed to the book that we found are relayed by a 2012 blog summary: SPY from 1993 to 2008, 153 trades, 80.4% winners, +0.85% a trade. We could not check them. Our closest comparison, the 137 trades from 1994 to 2007, made +0.844% a trade after costs with 81.0% winners.
Not new on this site. It belongs to the same family as RSI(2) on SPY, the only other daily rule here that passed every gate, on the same data. The same RSI(2) rule passed three of six gates on QQQ (five of six with the stricter threshold) and three of six on the DAX. We also buried an hourly RSI(2) rule on ES futures and the IBS daily reversal on NQ. Because this family has well over four versions on the site, the first-period bar is t ≥ 2.5, a stricter bar for a crowded family but not a full correction for testing many versions.
02What we had to fix ourselves
The summaries leave some details open. We fixed each one in the specification before the run:
- The 7-day window is today and the 6 trading days before it. One summary could be read as today against the 7 closes before it, an 8-day window; we did not use that reading.
- "At a 7-day low" means at or below: today's close is lower than or equal to each of the 6 closes before it. Equal closes are rare (62 of 8,488 days closed exactly where they did the day before). The exit mirrors it: a close higher than or equal to each of the 6 closes before it, a window that can reach back before the entry day.
- The 200-day filter is the close above the plain average of the last 200 closes, checked at entry only. A trade stays open if SPY falls below its average, as every summary that says anything says.
- Fills at the close of the signal day, as in Connors' tests; we also show buying and selling at the next morning's open. One position at a time; after an exit, the next entry can come from the next day. Long only: the summaries give no short side.
- Dividends are reinvested: a trade held over an ex-dividend day earns the dividend. Signals start on 24 January 1994, the 250th day of the data, as in our RSI(2) test.
03How we tested it
SPY daily prices and dividends from January 1993 to 20 October 2026 (Yahoo Finance), the files of our RSI(2) test, checked again byte for byte; our total return with dividends matches Yahoo's adjusted close within 0.1% over the whole period. Costs: 0.04% of the price per round trip, as in our other SPY tests, with 0.10% shown too. Unit: net % per trade. Periods: 1994 to 2005, 2006 to 2015, and a holdout from 2016 already used by six earlier SPY tests. Control: buy at random on days when SPY is above its 200-day average and below its 5-day average (any dip in an uptrend), with the same 7-day-high exit and about the same number of trades on average, 500 times. Every Double 7s entry day lies inside that pool. Engine check: the trades were computed twice, by our engine and by a separate re-implementation with its own file reading, windows and trade arithmetic, which agree on all 326 trades. The re-implementation was written by the same author (an AI, Claude), not by an independent person or agent. The self-test passed 26 checks before any result was printed, among them hand-worked days with ties at the low and the high, and 5 deliberate rule changes it had to catch (d7_selftest.txt).
04Results: does the Double 7s strategy work on SPY?
| Variant | Buy when | Trades | Win rate | Gross per trade | Net per trade | Sum of trades | Profit factor | Verdict |
|---|---|---|---|---|---|---|---|---|
| D7 | Close at a 7-day low above the 200-day average | 326 | 78.8% | +0.750% | +0.710% | +231.5% | 2.54 | Survivor |
| Variant | 1994 to 2005 (trades) | 2006 to 2015 (trades) | Holdout* 2016 to Oct 2026 (trades) | t, first period | PF, second period | PF, holdout |
|---|---|---|---|---|---|---|
| D7 | +0.953% (115) | +0.551% (100) | +0.602% (111) | 5.12 | 2.19 | 2.16 |
* The holdout years had already been used by our earlier SPY tests. The last trade, bought on 14 October 2026, was still open at the end of the data and is counted at the 20 October close (-0.11%).
It made money in every period: +0.953% a trade from 1994 to 2005, +0.551% from 2006 to 2015 and +0.602% since 2016. A typical trade lasted 6 trading days; 16 of the 326 lasted 20 days or more, the longest 38. Before 2008, the year the book appeared, it made +0.844% a trade (137 trades); from 2008 on, +0.613% (189 trades, t 4.44), weaker but still positive.
05A 7-day low, or any dip?
The average net result per trade of 500 runs of random buys on dips in an uptrend (grey), with the same exit, costs and about the same number of trades; the dashed line is their 95th percentile.
| Variant | Trades | Real net per trade | Random dips, median | Random dips, 5th to 95th | Runs as good or better | Percentile (95 needed) |
|---|---|---|---|---|---|---|
| D7 | 326 | +0.710% | +0.610% | +0.510% to +0.709% | 24 of 500 | 95.2 |
This is the gate it nearly failed. Buying any dip in an uptrend and holding until a 7-day closing high made +0.610% a trade in the median random run, because SPY rose over these years and the exit waits for a full recovery. The Double 7s rule made +0.710%, about 0.10 points more, which put it at the 95.2th percentile: 24 of the 500 runs did as well or better. With 500 runs the 95th percentile itself is uncertain by about a point, so a pass this close is near a coin toss; the verdict stands as the protocol gives it.
06Double 7s and RSI(2): one result seen twice
| On SPY, 1994 to Oct 2026 | Trades | Win rate | Median days held | Net per trade | 1994 to 2005 | 2006 to 2015 | 2016 to 2026 | Random dips, same exit, median | Percentile | Growth with T-bills | Time invested |
|---|---|---|---|---|---|---|---|---|---|---|---|
| Double 7s | 326 | 78.8% | 6 | +0.710% | +0.953% | +0.551% | +0.602% | +0.610% | 95.2 | ×16.65 | 29.9% |
| RSI(2) below 10 | 257 | 75.9% | 3 | +0.616% | +0.942% | +0.304% | +0.532% | +0.316% | 100.0 | ×9.76 | 10.5% |
Both rules buy a short dip above the 200-day average, and they often pick the same days: 114 of the 326 Double 7s entries fell on an RSI(2) entry day, and 214 of its trades overlapped an RSI(2) trade. On the other 212 entries it made +0.636% a trade (t 5.03), so it is not simply RSI(2) under another name. The big difference is the exit. RSI(2) sells at the first close above the 5-day average, after 3 days in the median trade; Double 7s waits for a 7-day closing high, 6 days. The longer hold made more per trade and kept it invested 29.9% of the time instead of 10.5%, but it also made random dips look much better (+0.610% against +0.316%), which is why RSI(2) beat all 500 random runs and Double 7s only 476.
07Double 7s against buy and hold
Growth of $1 from January 1994, log scale. The strategy earns 3-month T-bill interest while out of the market and pays the cost on every trade; buy and hold reinvests dividends.
| From January 1994 | Growth | Per year | Largest fall (at daily closes, open losses included) | Volatility | Time invested |
|---|---|---|---|---|---|
| Double 7s, T-bills while out | ×16.65 | 9.0% | -14.1% | 9.8% | 29.9% |
| Buy and hold SPY | ×29.06 | 10.8% | -55.2% | 18.7% | 100.0% |
| Crash | Double 7s | Trades started | Buy and hold |
|---|---|---|---|
| 2000-02 dot-com | +6.8% | 10 | -47.5% |
| 2008-09 financial crisis | -1.4% | 2 | -55.2% |
| 2020 Covid | -6.2% | 1 | -33.7% |
| 2022 rate hikes | -7.7% | 2 | -24.5% |
Per trade it is strong; as a portfolio it lagged. Out of the market seven days in ten, it grew 9.0% a year against 10.8% for holding SPY. In return its largest fall, at daily closes with open losses included, was -14.1%, in the summer of 2011, against -55.2% for holding. It came through the dot-com crash up (+6.8%, with 10 trades, SPY being above its 200-day average on fewer than a quarter of those days) and the 2008 crisis nearly flat (-1.4%, 2 trades), mostly by staying out.
08How solid is it?
| Variant | Net per trade | At 0.10% cost | Next-open fills | Sum without the 10 best | Sum without the 20 best | Median days held | Longest | Worst open loss at a close (open positions included) |
|---|---|---|---|---|---|---|---|---|
| D7 | +0.710% | +0.650% | +0.663% | +187% | +155% | 6 | 38 | -14.0% |
Two and a half times the cost barely changes it, and buying and selling at the next morning's open instead of the close kept +0.663% a trade. Removing the 10 or the 20 best trades leaves most of the result (81% and 67% of the sum). The weak spot is the lack of a stop. The worst open loss came in the trade bought on 27 July 2011, just before the August sell-off: it was 14.0% down at a close and was sold on 15 August 2011 at a 7.7% loss, the worst trade. Because the 200-day filter applies only at entry, 43 trades were still open on a day SPY closed below its 200-day average; together they lost 61.4% (-1.43% a trade on average).
09By year
| Year | Sum of trades | Trades |
|---|---|---|
| 1994 | -0.13% | 7 |
| 1995 | +12.54% | 11 |
| 1996 | +12.50% | 14 |
| 1997 | +28.49% | 15 |
| 1998 | +13.01% | 10 |
| 1999 | +18.54% | 13 |
| 2000 | +11.44% | 12 |
| 2001 | no trade | 0 |
| 2002 | -2.79% | 2 |
| 2003 | +11.01% | 9 |
| 2004 | +2.79% | 10 |
| 2005 | +2.19% | 12 |
| 2006 | +9.37% | 12 |
| 2007 | -3.33% | 10 |
| 2008 | no trade | 0 |
| 2009 | +11.58% | 9 |
| 2010 | +0.15% | 6 |
| 2011 | -0.34% | 9 |
| 2012 | +16.43% | 16 |
| 2013 | +12.22% | 13 |
| 2014 | +6.31% | 14 |
| 2015 | +2.73% | 11 |
| 2016 | +15.16% | 13 |
| 2017 | +9.30% | 13 |
| 2018 | -6.09% | 9 |
| 2019 | +5.18% | 9 |
| 2020 | -3.37% | 6 |
| 2021 | +18.87% | 13 |
| 2022 | -8.89% | 2 |
| 2023 | +0.41% | 8 |
| 2024 | +11.12% | 13 |
| 2025 | +13.18% | 13 |
| 2026 (to 20 Oct) | +11.96% | 12 |
It lost in 7 of its 31 years with trades: 1994, 2002, 2007, 2011, 2018, 2020 and 2022. The two years with no trade, 2001 and 2008, are years when SPY spent little or no time above its 200-day average.
10Verdict by variant
| Variant | Cause | Gates failed | Verdict |
|---|---|---|---|
| D7 | Passed every gate (the control at the 95.2th percentile) | – | Survivor |
| Variant | Trades | 1. PF ≥ 1.2 in validation | 2. ≥ 50 trades in each period | 3. t ≥ 2.5 on development | 4. Above the 95th percentile of random dips in an uptrend | 5. Positive without the 10 best trades | 6. Holdout net positive (already used) |
|---|---|---|---|---|---|---|---|
| D7 | 326 | pass | pass | pass | pass | pass | pass |
What would change our mind: a record on new SPY data, with the rule unchanged, that contradicts the backtest, or one that does no better than random dips with the same exit. The data after 20 October 2026 has not been looked at, and no forward test is running yet.
TWhat this shows, and what to take into your own tests
What the results show
- Larry Connors and Cesar Alvarez's Double 7s rule (buy SPY at the close at a 7-day closing low while it is above its 200-day average, sell at the close at a 7-day closing high) made +0.710% a trade on average after costs on 326 trades from 1994 to 2026, with 78.8% winners, and passed all six of our gates.
- The margin over chance was thin: random buys on any dip in an uptrend, with the same exit, made +0.610% a trade in the median run, and the rule beat 476 of the 500 random runs, just enough for the 95 our gate needs.
- As a whole strategy it did not beat holding SPY: invested 29.9% of the time, it grew ×16.65 against ×29.06, with a largest fall of -14.1% against -55.2% (at daily closes, open losses included).
What remains unknown
- Whether it keeps working on new data. Our holdout years had already been used by six earlier SPY tests, the RSI(2) test among them, so they cannot confirm it independently.
- How much it adds to RSI(2). It is the same family on the same data: 114 of its 326 entries fell on an RSI(2) entry day, and 214 of its trades overlapped an RSI(2) trade.
- Other markets, other windows (5 or 10 days instead of 7) and the short side: not tested. We tested one version, the published rule.
- Live fills: we buy and sell at the close, which you only know at the bell; buying and selling at the next open kept most of the result here.
Why it passed, and why only just
Five of the six gates passed with room: it made money in all three periods, its first-period t-statistic was 5.12 against the 2.5 needed, and without its 10 best trades it kept 81% of its sum. The sixth, the control, passed by a hair: the 7-day-high exit waits for a full recovery, about 6 trading days, and in a market that rose most of the time almost any dip held that long made money. What the 7-day low adds on top of that is about 0.10 percentage points a trade.
What you can apply to your own tests
- Give the control the same exit as the rule. A slow exit can make any entry look good in a rising market; here random dips with this exit made almost as much as RSI(2) with its own.
- Treat a pass at the edge of a gate as a coin toss near the line. With 500 random runs the 95th percentile itself moves by about a point from one set of runs to another.
- When two rules from the same family pass on the same data, count it as one result seen twice, not two results.
A note on the numbers: drawdown figures are measured on closed trades unless a table says it includes open losses. Open losses inside a trade are not counted in a closed-trade drawdown, so real account risk is higher, especially for systems with no stop. Backtests are not live trading.
FAQCommon questions
What is the Double 7s strategy?
A rule from Larry Connors and Cesar Alvarez's Short Term Trading Strategies That Work (2008): when SPY is above its 200-day moving average and closes at a 7-day low, buy at the close; sell at the close when it closes at a 7-day high. There is no stop.
Does the Double 7s strategy work?
On SPY, in our backtest, it passed every gate: 326 trades from 1994 to 2026 at +0.71% each after costs, positive in all three periods. It beat random dips in an uptrend in 476 of 500 runs, just enough for our 95th-percentile gate, and our last period had been used by earlier tests, so only new data can confirm it.
What is the win rate of the Double 7 strategy?
About 79% on SPY in our test. A typical trade lasted 6 trading days. There is no stop: one trade, bought in July 2011, was 14% down at a close before it was sold.
Is the Double 7s strategy better than RSI(2)?
On the same SPY data it made more per trade (+0.71% against +0.62%) because it holds longer (6 days against 3), but the longer hold also made random dips look much better, and RSI(2) beat chance by a wider margin. The two rules often buy the same dips (114 of 326 entry days), so they are one result seen twice.
How was the Double 7s strategy tested?
On SPY daily closes with dividends, 1994 to 2026, with the rules fixed before any number was computed, 0.04% of costs per round trip, a control of random buys on dips in an uptrend with the same exit, and rules written and dated before the data was run, costs included on every trade, results split into development, validation and holdout periods, a random-entry control as the benchmark, and every variant reported. Read the protocol.
11Check our arithmetic
d7_spec.md
d7_lib.js · d7_ref.js · d7_selftest.js · d7_run.js · d7_datacheck.js
control_audit_lib.js · gh_lib.js · hourly_lib.js · ma_lib.js · rsi2_protocol.js · rsy_lib.js · sma200_lib.js
d7_datacheck.txt · d7_selftest.txt · d7_results.txt · d7_summary.json · d7_gates.json · d7_control_D7.json
D7
To rerun it: put spy_daily.csv (date,open,high,low,close,adj_close,volume; 29 January 1993 to 20 October 2026, from Yahoo Finance), spy_dividends.csv (date,dividend) and FRED's DTB3 series as dtb3_fred_raw.csv in a folder named data_spy next to the scripts (the first 16 characters of their SHA-256 hashes are in the specification), then run node d7_selftest.js and node d7_run.js; the run refuses to start unless the specification's hash matches the frozen one, the self-test passed on the current code, and no earlier run left results. We do not republish the price files. Code provenance: our own code, written for this test.
12Data notes
Source. Yahoo Finance daily prices of SPY, an ETF that tracks the S&P 500, and its dividends; FRED for the 3-month T-bill rate. The data check (before the freeze; no signal or trade): 8,489 days from 29 January 1993 to 20 October 2026, 136 dividends, all on trading days; no date out of order, repeated or on a weekend; one gap of more than five calendar days, the market closure after 11 September 2001. Indicators use the raw closes; returns include dividends. Fills at the close (and, as a check, at the next open); the cost is a fixed 0.04% for 32 years, which is low for the years before 2001, when US stock prices still moved in eighths and sixteenths of a dollar; at 0.10% a round trip it still made +0.650% a trade. One market, one data source, the published rule only, a holdout already used.
13Corrections
None since publication.