Beat the Market with Stochastic Momentum Index
Beat the Market with Stochastic Momentum Index
Test Setup
We assume that the value of the S&P500 index is a fictitious price for which you can buy it. On 01.01.1985 you can buy 6.1095 shares of the index for the total price 1000$. The question is simple:
If you held these shares for 35 years, could SMI‑based timing rules beat the S&P 500’s buy‑and‑hold return?
All tests use:
Weekly data (to reduce noise)
Price/volume from Yahoo Finance
Sixteen major S&P 500 declines (>10%) identified between 1985–2020
Identical buy/sell dates across all tests
No leverage, no shorting, no dividends (pure price return
Test1
sell rule:
we sell our shares at date i if:
Price(i) < SMA20
SMI(i,10,3,3) < 42.55 and SMI(i-2,10,3,3)>74.69 - the fast stochastic line has declined from its average value 74.69 at the sixteen price peaks to its average value 42.55 two weeks later.
buy rule: we buy again shares of S&P500 if:
SMI(i,9,3,3)>SMI(i-1,9,3,3)>SMI(i-2,9,3,3)
Result: return = 5.4467/6.1095= 89% of S&P500 return
Oops! Its not easy to beat the Market!
Lets change our selling rules and require that the current price should be below 26 periods (=weeks) simple moving average SMA.
Test 1A — Longer Moving Average
sell rule:
Price(i) < SMA26
SMI(i,10,3,3) < 42.55 and SMI(i-2,10,3,3)>74.69
buy rule: SMI(i,9,3,3)>SMI(i-1,9,3,3)>SMI(i-2,9,3,3)
Result:
You have bought shares = 6,109482177213925 for 1000 dolars at 1984-12-31
You should sell at 1988-11-07 sell price = 267,920013
You should buy at 2018-11-12 buy price = 2736,27002
........
Now you have shares =
5,841293072842256 but your cash is = 0
Now you have shares = 5,841293072842256
Your total
cash is = 0
The current value of SP500 index is
3638,350098
Time elapsed: 00:19:10.0342743
(that's correct - this test took me 19 minutes and 10 seconds on my new Lenovo Yoga Slim 7 laptop!)
Return: 5.8413/6.1095 = 95.6% of S&P500 return - still not good enough.
Test1B
sell rule:
Price(i) < SMA26
SMI(i-2,10,3,3) - SMI(i,10,3,3)>74.69-42.55=32.14 - the two week drop of the fast stochastic line K should be greater than the difference between the average values
SMI(i-2,10,3,3)>55 - the Stochastic Momentum Index must have been in overbought position
buy rule - the same as test1A
Results:
You have bought shares = 6,109482177213925 for 1000 dolars at 1984-12-31
You should sell at 1988-11-07 sell price = 267,920013
Now you have
shares = 0 but your cash is = 1636,852544342423
You should buy at 1988-12-12 buy price = 276,290009
Now you
have shares = 5,924400054373385 but your cash is = 0
....
Now you have shares = 6,128554462417772
Your total cash is
= 0
The current value of SP500 index is 3638,350098
Time
elapsed: 00:20:35.0398696
Return=6.1286/6.1095=100.3% of S&P500 return Voila ! We beat the Market! Hmmm - by very small amount. Let's smooth the K-line more.
Test 2A
sell rule:
Price(i) < SMA26
SMI(i,12,4,4) < 55.09 and SMI(i-2,12,4,4)>70.38 - the fast stochastic K-line now with settings (12,4,4) has declined from its average value 70.38 at the sixteen price peaks to its average value 55.09 two weeks later.
buy rule: SMI(i,9,3,3)>SMI(i-1,9,3,3)>SMI(i-2,9,3,3)
Results:
You have bought shares = 6,109482177213925 for 1000 dolars at 1984-12-31
You should sell at 2007-02-26 sell price = 1387,170044
......
You should buy at 2020-03-30 buy price = 2488,649902
Now you
have shares = 7,160320087635551 but your cash is = 0
Now you have shares = 7,160320087635551
Your total cash is = 0
The
current value of SP500 index is 3638,350098
Time elapsed:
00:19:00.7235007
Return = 7.1603/6.1095 = 117.2% of S&P500 return. Here we are - we beat the market by a substantial amount!
Test2C
sell rule: if ClosePrice[i] < SMA27[i] &&
StocMomIndex(12, 4, 4)[i - 2]- StocMomIndex(12, 4, 4)[i]> 20.0
&& StocMomIndex(10, 3, 3)[i - 2]>70.38
this test was a mistake - it should have been SMI(12,4,4)>70.38
buy rule: SMI(i,9,3,3)>SMI(i-1,9,3,3)>SMI(i-2,9,3,3)
Result:
You have bought shares = 6.109482177213925 for 1000 dolars at 1984-12-31
You should sell at 2000-01-24 sell price = 1360.160034
Now you have
shares = 0 but your cash is = 8309.873485881686
You should buy at 2000-03-06 buy price = 1395.069946
Now you
have shares = 5.956599889280165 but your cash is = 0
You should sell at 2007-02-26 sell price = 1387.170044
Now you have
shares = 0 but your cash is = 8262.81693050316
You should buy at 2007-03-26 buy price = 1420.859985
Now you
have shares = 5.815363243200322 but your cash is = 0
You should sell at 2010-05-03 sell price = 1110.880005
Now you have
shares = 0 but your cash is = 6460.170748683189
You should buy at 2010-07-12 buy price = 1064.880005
Now you
have shares = 6.066571555809417 but your cash is = 0
You should sell at 2018-10-08 sell price = 2767.129883
Now you have
shares = 0 but your cash is = 16786.99143943804
You should buy at 2018-11-12 buy price = 2736.27002
Now you
have shares = 6.134990814772746 but your cash is = 0
You should sell at 2020-02-24 sell price = 2954.219971
Now you have
shares = 0 but your cash is = 18124.11238690321
You should buy at 2020-03-30 buy price = 2488.649902
Now you
have shares = 7.282708737913594 but your cash is = 0
Now you have shares = 7.282708737913594
Your total cash is = 0
The
current value of SP500 index is 3638.350098
Time elapsed:
00:19:19.8304324
Although a mistake the result is: return= 7.2827/6.1095 = 119.2% of S&P500 return.
Test2D
Correction of the mistake in test2C:
sell rule: if ClosePrice[i] < SMA27[i] &&
StocMomIndex(12, 4, 4)[i - 2]- StocMomIndex(12, 4, 4)[i]> 20.0
&& StocMomIndex(12, 4, 4)[i - 2]>70.38
buy rule: SMI(i,9,3,3)>SMI(i-1,9,3,3)>SMI(i-2,9,3,3)
result = the same as test2C
Test2E
sell rule: if ClosePrice[i] < SMA27[i] &&
StocMomIndex(12, 4, 4)[i - 2]- StocMomIndex(12, 4, 4)[i]> 16.31+13.35=29.66 && StocMomIndex(12, 4, 4)[i - 2]>70.38
16.31 is the average 2-week drop of fast SMI line
13.35 is the standard deviation of that drop
buy rule: SMI(i,9,3,3)>SMI(i-1,9,3,3)>SMI(i-2,9,3,3)
Result:
You have bought shares = 6.109482177213925 for 1000 dolars at 1984-12-31
You should sell at 2018-10-08 sell price = 2767.129883
Now you have
shares = 0 but your cash is = 16905.730702224555
You should buy at 2018-11-12 buy price = 2736.27002
Now you
have shares = 6.178385385454231 but your cash is = 0
You should sell at 2020-02-24 sell price = 2954.219971
Now you have
shares = 0 but your cash is = 18252.30949424342
You should buy at 2020-03-30 buy price = 2488.649902
Now you
have shares = 7.3342214505845025 but your cash is = 0
Now you have shares = 7.3342214505845025
Your total cash is = 0
The
current value of SP500 index is 3638.350098
Time elapsed:
00:19:21.8258729
Return = 7.3342/6.1095 = 120.05% of S&P500 return.
Test2F
sell rule: if ClosePrice[i] < SMA27[i] &&
StocMomIndex(12, 4, 4)[i - 2] - StocMomIndex(12, 4, 4)[i]> 16.31
&& StocMomIndex(12, 4, 4)[i - 2]>70.38
buy rule: SMI(i,9,3,3)>SMI(i-1,9,3,3)>SMI(i-2,9,3,3)
result = the same as test2C
Test3
sell rule: if ClosePrice[i] < SMA27[i] && StocMomIndex(12, 4, 3)[i - 2]-
StocMomIndex(12, 4, 3)[i]> 23.0
&&
StocMomIndex(12, 4, 3)[i - 2]>73.85
buy rule: SMI(i,9,3,3)>SMI(i-1,9,3,3)>SMI(i-2,9,3,3)
Result:
You have bought shares = 6.109482177213925 for 1000 dolars at 1984-12-31
You should sell at 2000-01-24 sell price = 1360.160034
Now you have
shares = 0 but your cash is = 8309.873485881686
You should buy at 2000-03-06 buy price = 1395.069946
Now you
have shares = 5.956599889280165 but your cash is = 0
You should sell at 2007-02-26 sell price = 1387.170044
Now you have
shares = 0 but your cash is = 8262.81693050316
You should buy at 2007-03-26 buy price = 1420.859985
Now you
have shares = 5.815363243200322 but your cash is = 0
You should sell at 2010-05-03 sell price = 1110.880005
Now you have
shares = 0 but your cash is = 6460.170748683189
You should buy at 2010-07-12 buy price = 1064.880005
Now you
have shares = 6.066571555809417 but your cash is = 0
You should sell at 2018-10-08 sell price = 2767.129883
Now you have
shares = 0 but your cash is = 16786.99143943804
You should buy at 2018-11-12 buy price = 2736.27002
Now you
have shares = 6.134990814772746 but your cash is = 0
You should sell at 2020-02-24 sell price = 2954.219971
Now you have
shares = 0 but your cash is = 18124.11238690321
You should buy at 2020-03-30 buy price = 2488.649902
Now you
have shares = 7.282708737913594 but your cash is = 0
Now you have shares = 7.282708737913594
Your total cash is = 0
The
current value of SP500 index is 3638.350098
Time elapsed:
00:19:49.9682156
Return:7.2827/6.1095=119.2% of S&P500 return
Conclusion
Across all tests, one pattern becomes clear: the Stochastic Momentum Index can outperform the S&P 500, but only under specific conditions that capture genuine market exhaustion rather than ordinary pullbacks.
The early tests (1, 1A, 1B) show that simple SMI thresholds or basic moving‑average filters are not enough to beat the market. These rules either trigger too often or fail to distinguish between shallow corrections and true trend reversals. As a result, they underperform or only match buy‑and‑hold.
The breakthrough comes when the strategy focuses on the magnitude of the two‑week SMI decline, combined with:
a longer smoothing period (SMI 12‑4‑4),
a price filter (Price < SMA26/27), and
an overbought requirement (SMI > ~70 before the drop).
These conditions isolate the major turning points that preceded the 16 significant declines between 1985 and 2020. When the SMI drops sharply from an overbought level while price falls below a medium‑term moving average, the probability of a deeper correction increases. Avoiding these periods — and re‑entering only when SMI turns upward for three consecutive weeks — produces a measurable improvement.
The best-performing variations (Tests 2A, 2C, 2D, 2E, 3) deliver 117%–120% of the S&P 500’s return over 35 years. This is a substantial outperformance, especially considering:
no leverage
no alternative assets
identical underlying exposure as the index
only weekly data
only a handful of trades per decade
In other words:
The SMI does not beat the market by predicting tops — it beats the market by avoiding the worst declines.
The strategy works because it steps aside during the deepest drawdowns (2000, 2008, 2020), then re‑enters once momentum stabilizes. Over decades, avoiding even a few major crashes compounds into meaningful outperformance.
The final takeaway is simple:
Yes, it is possible to beat the S&P 500 using the Stochastic Momentum Index — but only with carefully tuned rules that capture true momentum reversals, not noise.
The SMI is not a magic indicator, but when combined with trend filters and statistical thresholds, it becomes a powerful tool for long‑term market timing.
Comments
Post a Comment