Strategy Zoo / S0417
MACDMomentum_V0417
ARCHIVEDhybridllmAdded regime gates to avoid DOWNTREND and EXTREME volatility/bubble; tightened entries by requiring trend confirmation (sma50>sma200) on the main MACD+SMA50 momentum leg; added a lower-volatility requirement (vol_pctile < 0.80) for breakout legs to avoid entries in turbulent regimes; added a short-term breakout_20+MACD leg to improve signal coverage; improved exit rules to include price crossing below sma_50 and a drawdown stop (12%) in addition to MACD histogram turn; reduced base position to 0.8 to lower exposure and improve robustness.
Fitness
0.3628
Generation
19
Complexity
20
Created
2026-09-18
Lineage
Parents (1)
changed rel_volume threshold 1.5045 -> 1.0207
Children (0)
None
Strategy Logic (pseudocode)
# MACDMomentum_V0417 [hybrid]
require regime.trend in ['UPTREND', 'SIDEWAYS']
require regime.volatility in ['LOW_VOLATILITY', 'MEDIUM_VOLATILITY']
require regime.bubble in ['NORMAL', 'EXPENSIVE']
if flat and ((macd_hist > 0.0 and close > sma_50 and sma_50 > sma_200) or (breakout_50 == 1 and rel_volume > 1.0207 and vol_pctile < 0.8) or (breakout_20 == 1 and macd_hist > 0.0 and vol_pctile < 0.8)):
position = 0.8
if long and (macd_hist < 0.0 or close < sma_50 or drawdown > 0.12):
position = 0.0 # exit to cashBacktest Metrics
| Metric | Train | Validation | Hidden Test | Full |
|---|---|---|---|---|
| CAGR | 3.7% | 26.5% | -2.7% | 6.5% |
| Total Return | 34.0% | 102.3% | -9.6% | 150.9% |
| Sharpe | 0.31 | 1.28 | -0.08 | 0.46 |
| Sortino | 0.22 | 1.05 | -0.05 | 0.33 |
| Calmar | 0.14 | 1.50 | -0.09 | 0.19 |
| Volatility | 15.4% | 19.9% | 16.6% | 16.7% |
| Max DD | -27.2% | -17.6% | -31.2% | -33.6% |
| Win Rate | 33.9% | 42.9% | 29.6% | 34.6% |
| Avg Win | 6.6% | 12.3% | 8.1% | 8.8% |
| Avg Loss | -2.7% | -2.4% | -3.6% | -2.9% |
| Payoff | 2.43 | 5.14 | 2.24 | 3.03 |
| Expectancy | 0.4% | 3.9% | -0.1% | 1.1% |
| Profit Factor | 1.24 | 3.85 | 0.94 | 1.60 |
| Trades | 59 | 21 | 27 | 107 |
| Avg Holding Days | 7.1 | 8.6 | 7.2 | 7.5 |
| Turnover | 11.9 | 11.2 | 11.7 | 11.7 |
| Exposure | 14.7% | 16.9% | 14.4% | 15.1% |
Growth of $100
MACDMomentum_V0417 vs TSLA Buy & Hold
MACDMomentum_V0417 TSLA Buy & HoldIn-sampleValidationHidden test
Growth of $100 · log scale · in-sample, validation and hidden-test segments are shaded separately and must not be compared as one out-of-sample track record.
Walk-Forward Years
year-by-year stability matters more than any single year
| Year | CAGR | Sharpe | Max DD | Trades |
|---|---|---|---|---|
| 2016 | -3.9% | -0.39 | -6.1% | 5 |
| 2017 | 17.3% | 1.13 | -10.0% | 15 |
| 2018 | -5.8% | -0.85 | -7.3% | 4 |
| 2019 | 11.0% | 0.60 | -15.8% | 3 |
| 2020 | 56.0% | 2.24 | -7.1% | 6 |
| 2021 | 30.2% | 1.24 | -16.0% | 10 |
| 2022 | -0.5% | 0.04 | -17.6% | 4 |
A robust strategy performs acceptably in most years rather than spectacularly in one — look for consistency across regimes, not a single outlier year.
Regime Performance
| Period | Regime | Days | Ann. Return | Sharpe | Exposure |
|---|---|---|---|---|---|
| hidden test | DOWNTREND | 267 | -2.9% | -1.40 | 1% |
| hidden test | EXPENSIVE | 83 | 35.3% | 1.55 | 21% |
| hidden test | EXTREME | 48 | 0.0% | 0.00 | 0% |
| hidden test | HIGH VOLATILITY | 254 | -8.7% | -0.63 | 2% |
| hidden test | LOW VOLATILITY | 429 | 14.4% | 0.87 | 21% |
| hidden test | MEDIUM VOLATILITY | 248 | -20.9% | -1.09 | 15% |
| hidden test | NORMAL | 800 | -5.2% | -0.32 | 14% |
| hidden test | SIDEWAYS | 293 | -33.9% | -1.95 | 22% |
| hidden test | UPTREND | 371 | 25.5% | 1.21 | 18% |
| train | DOWNTREND | 518 | -3.0% | -1.02 | 0% |
| train | EXPENSIVE | 311 | 38.1% | 1.93 | 23% |
| train | EXTREME | 100 | 9.3% | 1.55 | 1% |
| train | HIGH VOLATILITY | 699 | 11.4% | 0.73 | 1% |
| train | LOW VOLATILITY | 745 | 16.3% | 1.11 | 28% |
| train | MEDIUM VOLATILITY | 568 | -18.4% | -1.15 | 14% |
| train | NORMAL | 1,601 | -1.9% | -0.13 | 14% |
| train | SIDEWAYS | 592 | -11.6% | -0.75 | 16% |
| train | UPTREND | 902 | 20.1% | 1.05 | 22% |
| validation | DOWNTREND | 125 | 0.0% | 0.00 | 0% |
| validation | EXPENSIVE | 138 | 87.7% | 3.13 | 28% |
| validation | EXTREME | 144 | 30.7% | 2.28 | 2% |
| validation | HIGH VOLATILITY | 258 | -9.5% | -1.00 | 0% |
| validation | LOW VOLATILITY | 183 | 14.2% | 0.97 | 28% |
| validation | MEDIUM VOLATILITY | 315 | 60.7% | 2.22 | 24% |
| validation | NORMAL | 474 | 5.7% | 0.31 | 18% |
| validation | SIDEWAYS | 206 | 4.5% | 0.27 | 16% |
| validation | UPTREND | 425 | 43.1% | 1.81 | 22% |
Trades (full period)
latest 100 of 107
| Entry | Exit | Entry Px | Exit Px | Return | Days | |
|---|---|---|---|---|---|---|
| 2026-07-02 | 2026-07-06 | $393.45 | $419.77 | -6.15% | 2 | |
| 2026-05-08 | 2026-05-21 | $428.35 | $417.85 | 0.97% | 10 | |
| 2026-04-20 | 2026-04-21 | $392.50 | $386.42 | -1.78% | 2 | |
| 2025-12-04 | 2025-12-30 | $454.53 | $454.43 | 2.22% | 18 | |
| 2025-11-04 | 2025-11-05 | $444.26 | $462.07 | -4.27% | 2 | |
| 2025-09-12 | 2025-10-06 | $395.94 | $453.25 | 13.02% | 17 | |
| 2025-08-26 | 2025-09-03 | $351.67 | $334.09 | -4.14% | 6 | |
| 2025-08-12 | 2025-08-21 | $340.84 | $320.11 | -3.73% | 8 | |
| 2025-07-29 | 2025-07-30 | $321.20 | $319.04 | -1.24% | 2 | |
| 2025-07-21 | 2025-07-25 | $328.49 | $316.06 | -6.05% | 5 | |
| 2025-05-19 | 2025-06-03 | $342.09 | $344.27 | -1.77% | 11 | |
| 2025-05-12 | 2025-05-13 | $318.38 | $334.07 | 5.23% | 2 | |
| 2024-09-23 | 2024-10-04 | $250.00 | $250.08 | 0.70% | 10 | |
| 2024-09-16 | 2024-09-20 | $226.78 | $238.25 | 4.58% | 5 | |
| 2024-09-06 | 2024-09-09 | $210.73 | $216.27 | -6.91% | 2 | |
| 2024-06-18 | 2024-07-12 | $184.86 | $248.23 | 22.38% | 17 | |
| 2023-12-15 | 2024-01-02 | $253.50 | $248.42 | -0.94% | 11 | |
| 2023-11-29 | 2023-12-14 | $244.14 | $251.05 | -2.56% | 12 | |
| 2023-11-22 | 2023-11-24 | $234.21 | $235.45 | -2.48% | 2 | |
| 2023-11-16 | 2023-11-17 | $233.59 | $234.30 | -3.20% | 2 | |
| 2023-10-06 | 2023-10-17 | $260.53 | $254.85 | -2.03% | 8 | |
| 2023-09-12 | 2023-09-22 | $267.48 | $244.88 | -5.39% | 9 | |
| 2023-09-06 | 2023-09-07 | $251.92 | $251.49 | -1.58% | 2 | |
| 2023-08-30 | 2023-09-05 | $256.90 | $256.49 | -3.94% | 4 | |
| 2023-07-06 | 2023-07-07 | $276.54 | $274.43 | -1.84% | 2 | |
| 2023-05-31 | 2023-06-27 | $203.93 | $250.21 | 15.56% | 19 | |
| 2023-04-03 | 2023-04-06 | $194.77 | $185.06 | -8.66% | 4 | |
| 2022-09-20 | 2022-09-23 | $308.73 | $275.33 | -5.47% | 4 | |
| 2022-08-16 | 2022-08-19 | $306.56 | $296.67 | -1.83% | 4 | |
| 2022-08-02 | 2022-08-12 | $300.59 | $300.03 | -2.97% | 9 | |
| 2022-03-21 | 2022-04-11 | $307.05 | $325.31 | 10.49% | 16 | |
| 2021-12-28 | 2022-01-03 | $362.82 | $399.93 | -2.88% | 5 | |
| 2021-10-13 | 2021-11-10 | $270.36 | $355.98 | 21.37% | 21 | |
| 2021-10-08 | 2021-10-11 | $261.83 | $263.98 | -0.98% | 2 | |
| 2021-09-27 | 2021-10-07 | $263.79 | $264.54 | 0.71% | 9 | |
| 2021-08-31 | 2021-09-21 | $245.24 | $246.46 | -0.21% | 15 | |
| 2021-08-02 | 2021-08-17 | $236.56 | $221.90 | -0.24% | 12 | |
| 2021-06-24 | 2021-07-12 | $226.61 | $228.57 | -0.08% | 12 | |
| 2021-04-14 | 2021-04-29 | $244.08 | $225.67 | -7.29% | 12 | |
| 2021-01-26 | 2021-01-27 | $294.36 | $288.05 | 0.05% | 2 | |
| 2021-01-12 | 2021-01-25 | $283.15 | $293.60 | 3.35% | 9 | |
| 2021-01-05 | 2021-01-11 | $245.04 | $270.40 | 16.09% | 5 | |
| 2020-12-18 | 2020-12-23 | $231.67 | $215.33 | -1.99% | 4 | |
| 2020-12-10 | 2020-12-17 | $209.02 | $218.63 | 2.29% | 6 | |
| 2020-11-18 | 2020-12-08 | $162.21 | $216.63 | 34.96% | 14 | |
| 2020-11-09 | 2020-11-10 | $140.42 | $136.79 | -1.78% | 2 | |
| 2020-10-14 | 2020-10-20 | $153.77 | $140.65 | -2.98% | 5 | |
| 2019-12-13 | 2020-01-22 | $23.89 | $37.97 | 40.01% | 26 | |
| 2019-10-15 | 2019-10-25 | $17.19 | $21.88 | 13.15% | 9 | |
| 2019-09-11 | 2019-09-25 | $16.47 | $15.25 | -4.29% | 11 | |
| 2019-07-22 | 2019-07-26 | $17.05 | $15.20 | -9.19% | 5 | |
| 2018-12-11 | 2018-12-18 | $24.45 | $22.47 | -3.81% | 6 | |
| 2018-12-07 | 2018-12-10 | $23.86 | $24.34 | -1.28% | 2 | |
| 2018-12-04 | 2018-12-06 | $23.98 | $24.20 | 0.11% | 2 | |
| 2018-01-18 | 2018-02-05 | $22.97 | $22.21 | -0.92% | 13 | |
| 2017-12-12 | 2017-12-26 | $22.74 | $21.15 | -1.04% | 10 | |
| 2017-10-18 | 2017-10-20 | $23.98 | $23.01 | -1.04% | 3 | |
| 2017-10-12 | 2017-10-17 | $23.71 | $23.72 | -1.06% | 4 | |
| 2017-09-12 | 2017-09-25 | $24.18 | $23.00 | -2.90% | 10 | |
| 2017-08-15 | 2017-08-18 | $24.16 | $23.16 | -2.77% | 4 | |
| 2017-08-04 | 2017-08-07 | $23.79 | $23.68 | 2.10% | 2 | |
| 2017-06-05 | 2017-06-14 | $23.15 | $25.38 | 8.28% | 8 | |
| 2017-05-15 | 2017-05-16 | $21.06 | $21.13 | -2.36% | 2 | |
| 2017-05-02 | 2017-05-04 | $21.26 | $19.70 | -3.09% | 3 | |
| 2017-04-26 | 2017-04-27 | $20.68 | $20.58 | -1.08% | 2 | |
| 2017-04-20 | 2017-04-21 | $20.17 | $20.37 | -0.95% | 2 | |
| 2017-03-24 | 2017-04-04 | $17.54 | $20.25 | 13.40% | 8 | |
| 2017-03-20 | 2017-03-22 | $17.46 | $17.00 | -3.46% | 3 | |
| 2017-02-10 | 2017-02-22 | $17.95 | $18.23 | 2.29% | 8 | |
| 2016-12-28 | 2017-02-02 | $14.65 | $16.77 | 10.56% | 25 | |
| 2016-10-04 | 2016-10-05 | $14.09 | $13.90 | -1.02% | 2 | |
| 2016-07-22 | 2016-08-09 | $14.82 | $15.27 | 1.91% | 13 | |
| 2016-06-08 | 2016-06-10 | $15.70 | $14.59 | -1.18% | 3 | |
| 2016-04-05 | 2016-04-14 | $17.03 | $16.79 | 2.32% | 8 | |
| 2016-03-21 | 2016-03-24 | $15.89 | $15.18 | -3.63% | 4 | |
| 2015-12-31 | 2016-01-05 | $16.00 | $14.90 | -5.08% | 3 | |
| 2015-09-21 | 2015-09-29 | $17.61 | $16.44 | -3.90% | 7 | |
| 2015-07-21 | 2015-07-22 | $17.78 | $17.86 | -4.55% | 2 | |
| 2015-06-22 | 2015-07-09 | $17.32 | $17.19 | -2.40% | 13 | |
| 2015-06-18 | 2015-06-19 | $17.46 | $17.50 | 0.29% | 2 | |
| 2015-06-09 | 2015-06-10 | $17.07 | $16.71 | -0.25% | 2 | |
| 2015-04-28 | 2015-05-22 | $15.37 | $16.52 | 4.69% | 19 | |
| 2014-11-25 | 2014-12-01 | $16.54 | $15.44 | -0.87% | 4 | |
| 2014-11-12 | 2014-11-24 | $16.61 | $16.45 | -2.78% | 9 | |
| 2014-10-08 | 2014-10-10 | $17.29 | $15.79 | -0.95% | 3 | |
| 2014-09-02 | 2014-09-12 | $18.94 | $18.61 | 3.01% | 9 | |
| 2014-07-31 | 2014-08-25 | $14.89 | $17.50 | 9.51% | 18 | |
| 2014-06-16 | 2014-07-07 | $14.97 | $14.84 | 8.69% | 15 | |
| 2014-06-12 | 2014-06-13 | $13.57 | $13.76 | -0.53% | 2 | |
| 2014-06-06 | 2014-06-11 | $13.88 | $13.63 | -1.94% | 4 | |
| 2014-05-28 | 2014-06-03 | $14.02 | $13.66 | -2.76% | 5 | |
| 2014-02-13 | 2014-02-26 | $13.31 | $16.87 | 21.13% | 9 | |
| 2014-01-03 | 2014-01-10 | $9.97 | $9.71 | -1.52% | 6 | |
| 2013-09-20 | 2013-10-04 | $12.23 | $12.07 | -2.17% | 11 | |
| 2013-09-09 | 2013-09-10 | $10.71 | $11.09 | -3.16% | 2 | |
| 2013-03-27 | 2013-04-02 | $2.54 | $2.96 | 12.65% | 4 | |
| 2013-03-08 | 2013-03-18 | $2.56 | $2.34 | -6.31% | 7 | |
| 2013-01-23 | 2013-02-14 | $2.40 | $2.55 | 7.21% | 17 | |
| 2013-01-03 | 2013-01-04 | $2.32 | $2.29 | -1.49% | 2 | |
| 2012-11-06 | 2012-12-14 | $2.08 | $2.25 | 5.24% | 28 |