Lab note: our first Double Seven run on SPY, and what it got wrong
This is a lab note from our own research pipeline, not a recommendation. We publish it because the most useful part of the run was the mistakes it exposed in our tooling.
What we tested
Double Seven is a well-known, simple long-only rule set for an index fund:
- Only trade when the close is above its 200-day simple moving average.
- Buy at the close when the close is the lowest close of the last seven days.
- Exit at the close when the close is the highest close of the last seven days.
The study ran on five years of daily SPY bars with a 300-day warm-up, a slippage assumption of five basis points per side and no commission. It was generated on 2026-05-28 by the Python study runner in the AIAlgoTrading research repository.
The raw output
These results are based on simulated or hypothetical performance results that have certain inherent limitations. Unlike the results shown in an actual performance record, these results do not represent actual trading. Also, because these trades have not actually been executed, these results may have under-or over-compensated for the impact, if any, of certain market factors, such as lack of liquidity. Simulated or hypothetical trading programs in general are also subject to the fact that they are designed with the benefit of hindsight. No representation is being made that any account will or is likely to achieve profits or losses similar to these being shown.
| Metric | Reported value |
|---|---|
| Total trades | 53 |
| Winning trades | 41 |
| Losing trades | 12 |
| Win rate | 77.36% |
| Profit factor | 2.09 |
| Total return | 0.17% |
| Max drawdown | 0.06% |
| Sharpe ratio | -87.19 |
| Starting capital | $100,000.00 |
| Ending capital | $100,167.72 |
What is wrong with these numbers
Position size was one share. Each trade bought a single SPY share against a notional account of one hundred thousand dollars. That is why the account barely moved and why the drawdown looks tiny: almost all of the capital sat idle. The return and drawdown rows therefore say nothing useful about the rules themselves.
The Sharpe ratio is an artefact. A strongly negative Sharpe ratio next to a positive profit factor is a red flag. With returns this small, subtracting a cash-rate benchmark swamps the trade results and dividing by an almost-zero volatility blows the figure up. We now treat any Sharpe ratio computed on an under-invested account as invalid.
A high hit rate is not an edge. Most trades were small winners, but the losers were roughly one and a half times the size of the average winner. Mean-reversion rules often look like this, and one bad sequence can undo many small gains.
What we changed
- The browser backtester sizes each position as a fraction of current equity, so the equity curve reflects the rules rather than idle cash.
- It reports exposure (time in the market) and a buy-and-hold comparison for the same bars, so a result can be judged against simply holding the instrument.
- It does not report a Sharpe ratio at all until we have a version we are confident in.
Try it yourself
Export daily bars for any instrument from your own charting platform or broker as CSV (date and close columns are enough), open the backtester and run the same rules. Change the look-back and the trend filter and watch how sensitive the result is. That sensitivity is the lesson.