TL;DR: the answer box
- The default is good on SPY and ordinary on ES. CCI(20), buy below -100, sell 5 bars later: a Ret/DD of 3.99 on SPY (rank 38 of 223) and 1.31 on ES (rank 118 of 193).
- Pick the side before the setting. On SPY, 269 of 336 long settings made money. Only 30 of 336 short settings did. On Euro FX and yen futures it flipped toward short.
- A fast CCI beat the default. CCI 5 to 14, bought below -50 to -150: a median Ret/DD of 4.88 on SPY and 2.75 on ES, across 27 settings.
- Buying the drop beat chasing the rise. Of four rule types, "buy while CCI is below the line" scored highest on both markets.
- On SPY and ES, RSI(2) below 10 beat almost every reliable long CCI setting. Ret/DD 7.34 on SPY and 4.82 on ES, same exit. Only 6 of 223 reliable long CCI settings on SPY scored higher, and 7 of 193 reliable ones on ES.
- Few comparable long CCI settings beat luck. Against a random long entry, 9 of 27 long hold-5 settings with a similar trade count cleared the bar on SPY. On ES, 0 of 28.
What is the CCI indicator, and how did I test it?
The Commodity Channel Index is Donald Lambert's indicator. It measures how far today's price sits from its own recent average. Above +100 is called "overbought". Below -100 is called "oversold". The number in brackets is how many days it looks back, and 20 is the textbook default.
I tested four ways to turn it into a buy signal. Two fade the move, and two follow it.
The test. I ran all four rule types, long and short. Seven lengths, from 5 to 50. Five levels, from 50 to 250. Three holds: sell 3, 5 or 10 bars later. That is 672 settings per market.
The markets. SPY from 1994, on a $35,000 account in whole shares. ES (E-mini S&P 500 futures) from 2006, one contract. And two currency futures, Euro FX (6E) and Japanese yen (6J), from 2002. All to 2026-08-20.
The fills: Execution rule v2. The signal is read at the close. The trade buys the next open, and the exit sells at an open too. You can't trade a close you have not seen yet.
The scores, in plain words:
- Drawdown: the biggest drop from a high point.
- Ret/DD: net profit divided by the biggest dollar drawdown. Profit per dollar of pain. Higher is better.
- Reliable: a setting with 100 trades or more. Only these get ranked.
Here is one default trade, the one closest to the median profit of all 355.
CCI(20) closed at -153.6 on 2013-06-05. The rule bought the open of 2013-06-06 at 161.20 and sold the open of 2013-06-13 at 161.66. $100. Not the best trade. The typical one.
Where does the default CCI setting rank?
High on SPY. Below the middle on ES. If you trade futures, that gap matters.
On SPY the default long rule made $50,574 on 355 trades. Its worst drawdown was $12,690. It won 54.9% of trades, a Ret/DD of 3.99. On ES it made $62,788, but its worst drawdown was $47,925. Same rule, same index, a much worse rank.
Now compare it with what you could have traded instead.
The short side lost on both. 610 SPY shorts, a 39.5% win rate, -$34,224.
One small change broke it. Buy when CCI(20) climbs back over -100 instead of closing below it. The SPY Ret/DD drops from 3.99 to -0.38. On ES, from 1.31 to -0.51. Same indicator, same level, a different trigger.
Does the side matter more than the setting?
Yes. Before you tune a length, pick your side. On SPY, 269 of 336 long settings made money before costs. Only 30 of 336 short settings did.
On the S&P 500, four in five long settings made money. About one in ten short settings did. After costs it was 261 long and 23 short on SPY.
On the two currencies it flipped. On Euro FX, 212 of 336 short settings made money and 100 long. On the yen, 235 short and 82 long. Some markets reward one side far more than the other.
Is the currency short bias real?
Over the full test, yes. But it was not steady.
On Euro FX from 2002 to 2014, more level-rule settings made money long (47 of 105) than short (24). From 2014 to 2026, short won 92 to 17. On the yen, short led in both halves, 71 to 40 and then 94 to 12. A long yen contract gains when the yen rises against the dollar, so these shorts were bets on the dollar.
That is the warning for a one-sided system built on one era. A bias found on one stretch of history can be the stretch, not the market.
What are the best CCI indicator settings?
A fast CCI, length 5 to 14, bought below -50 to -150. A region, not a single cell. I read it off the SPY results and checked it on ES.
Think of the settings as a pivot table: CCI length down the side, buy level across the top, and the score in each cell.
On SPY, across all three holds, the 27 region settings had a median Ret/DD of 4.88. 18 of 27 beat the default. The deep levels, -200 and -250, mostly had too few trades to judge.
ES is the real check for you, because I did not pick the region from it. There, 24 of 27 region settings beat the default, with a median Ret/DD of 2.75. 26 of 27 stayed profitable after costs, on SPY and on ES.
Did it last? I split each test in half by time.
The region held: 2.91 and 2.88 on SPY, 1.88 and 2.03 on ES. The default faded, from 3.45 to 1.42 on SPY and from 1.88 to 0.47 on ES.
Don't chase the top cell. The best single SPY setting scored 8.99. It is the top of 336 long settings on SPY, picked on the same data it is scored on, so I report it but do not use it. Researchers measure that risk as the probability of backtest overfitting. I learned that the expensive way: I lost roughly $270K early on, over years of overfitting and leverage. The best ES cell was a different rule entirely, a CCI(30) breakout. Two markets, two different winners.
Does a longer CCI period cut whipsaws?
It cuts trades. It does not give you the best score. For a higher Ret/DD on these SPY and ES longs, go faster, not slower.
On SPY, moving from CCI(20) to CCI(40) cut the median trade count from 207 to 176, 15.0% fewer. The median Ret/DD rose from 3.09 to 4.09. So the longer setting did beat CCI(20). But going faster did better: CCI(5) scored 4.59 on SPY and 3.26 on ES.
Should you fade CCI or follow it?
For long trades on SPY and ES, fade it.
The level rule had a median Ret/DD of 3.70 on SPY and 2.32 on ES. The zero-line cross, a common trend entry, scored 0.94 and 1.08.
Which is better, RSI or CCI?
RSI(2), by a clear margin, for long trades on SPY and ES. RSI is another 0 to 100 score of recent up and down days, and RSI(2) looks back just two days. I ran it with the same next-open fills and the same 5-bar exit.
RSI(2) below 10 took 405 SPY trades. It won 61.0% of them, with a Ret/DD of 7.34 and $88,289 profit. The CCI default: 3.99 and $50,574. On ES, RSI(2) below 10 scored 4.82 against the default's 1.31.
Only 6 of 223 reliable long CCI settings on SPY beat RSI(2) below 10. On ES, 7 of 193. Every RSI(2) level from below 5 to below 30 beat the CCI region's median on both markets. That median mixes holds of 3, 5 and 10 bars.
Do CCI signals beat a random entry?
On SPY, a third of comparable settings do. On ES, none.
This is the test that matters most, and you can run it on any setting you plan to trade. On SPY, a random long held 5 bars earned 0.199% on average, so a buy signal has to beat that drift. So I built a random long entry that sells 5 bars later the same way, over 10 seeds. It takes as many trades as the typical setting: 288 on SPY and 190 on ES. I then compared only the settings within 25% of that count. Random entries made $15,026 on SPY and $27,578 on ES. The luck bar is that average plus two spreads: $35,223 on SPY and $133,381 on ES.
On SPY, 9 of 27 comparable settings cleared it. On ES, 0 of 28. On the currencies the short side looked thin too: 0 of 21 Euro FX short settings cleared their own random bar, and 2 of 27 on the yen.
And buy and hold? It made far more.
Buy and hold SPY made $518,686 on the same $35,000. Its worst fall was 56.45%. The default CCI rule made $50,574, with a worst drop of $12,690. The rule also sat out most of the time: it held a position on 21.7% of days.
The verdict, and the honest limits
Where the old CCI advice holds up. Two textbook CCI rules lost money on SPY and ES. The default short side lost on both S&P 500 markets. The cross-back version of the default long rule lost too. And the side matters more than the setting.
Where it goes too far. A tuned CCI is not "a winning edge" by default. On ES, no comparable CCI setting beat the random bar. RSI(2) below 10 beat the CCI default on both markets. And the currency short bias on Euro FX only showed up after 2014.
The limits:
- British Pound futures were not tested. My 2025 CCI work used them, and I have no data for them here. Euro FX and yen are different markets.
- The fast region was picked on SPY. ES and the two halves are the checks.
- RSI(2) did not win everywhere. On Euro FX longs, 185 of 204 reliable CCI settings beat RSI(2) below 10.
- No stop loss. The biggest single loss on one ES contract with the default was -$25,888.
- Costs are left out of the headline figures. 26 of the 27 region settings stayed profitable after costs, on SPY and on ES.
- Daily bars, time exits only. No trailing stops.
- A backtest is not a live edge. It is the best evidence about the past.
What this means for you
- Decide the side first. On the S&P 500, CCI longs made money in four of five settings. Shorts made money in one of ten.
- Buy the stretch, not the cross back. CCI(20) below -100 scored 3.99 on SPY. Waiting for the cross back scored -0.38.
- Go faster than the default. CCI 5 to 14, bought below -50 to -150, beat the default in 18 of 27 settings on SPY and 24 of 27 on ES.
- Test it against RSI(2) before you commit. Only 6 of 223 reliable long CCI settings on SPY beat RSI(2) below 10.
- Judge a region, not a cell. Put the trade lists of a few neighbouring settings into AlgoChef and check they behave alike before real money goes on the one that led the sweep.
CCI isn't dead. Long and fast, it held up on the S&P 500. Its default and its fast region's median trailed every RSI(2) level I tested, and on ES no comparable setting beat luck.
Reference tables
For readers who want the detail behind the charts.
Table 1. The default, CCI(20) at +/-100, sell 5 bars later
| Market | Side | Trades | Win rate | Net profit | Max drawdown | Ret/DD | Profit factor | Rank by Ret/DD |
|---|---|---|---|---|---|---|---|---|
| SPY | long | 355 | 54.9% | $50,574 | $12,690 | 3.99 | 1.44 | 38 of 223 |
| SPY | short | 610 | 39.5% | -$34,224 | $38,320 | -0.89 | 0.77 | 115 of 216 |
| ES | long | 212 | 59.0% | $62,788 | $47,925 | 1.31 | 1.22 | 118 of 193 |
| ES | short | 403 | 41.4% | -$86,488 | $112,162 | -0.77 | 0.75 | 111 of 196 |
Profit factor: dollars won for each dollar lost. Execution rule v2, next-open fills, no costs. SPY $35,000 in whole shares, ES one contract.
Table 2. The fast region: level rule, CCI 5 to 14, buy below -50 to -150, all three holds
| SPY | ES | |
|---|---|---|
| Settings | 27 | 27 |
| Median Ret/DD | 4.88 | 2.75 |
| Lowest to highest Ret/DD | 0.00 to 8.99 | -0.33 to 6.40 |
| Median trades | 437 | 268 |
| Profitable after costs | 26 of 27 | 26 of 27 |
| Beat the default | 18 of 27 | 24 of 27 |
Table 3. The sweep
| Setting | Values |
|---|---|
| Rule type | level, cross back, breakout, zero line |
| CCI length | 5, 10, 14, 20, 30, 40, 50 |
| Level | 50, 100, 150, 200, 250 (not used by the zero line) |
| Hold | 3, 5, 10 bars |
| Side | long and short |
672 CCI settings per market, plus 12 RSI(2) rows: 2,736 backtests across SPY, ES, 6E and 6J.
Everything here is research, not investment advice. It is a backtest on historical data with the assumptions stated above. It is not a recommendation to buy or sell anything, and past results do not predict future ones.
Want the next study when it is finished, including the ones that overturn something I believed? That is what the newsletter is for: StatOasis.com/Overfit






