MACDMomentum_V1186
ARCHIVEDhybridllm1) Added regime gates: only allow UPTREND/SIDEWAYS, exclude HIGH volatility and bubble EXTREME to reduce overfit to extreme periods. 2) Strengthened entry by requiring macd_hist>0 and close>sma_50 plus either breakout with higher rel_volume or a price+trend momentum branch (sma50>sma200 and ret_20d>0). 3) Added volatility and RSI filters on entry (vol_pctile<0.8, rsi_14<70) to avoid noisy/overbought entries. 4) Improved exits: exit on macd_hist<0 OR price crossing below sma_50 OR portfolio drawdown >8% OR extreme RSI>80 for faster loss control. 5) Introduced position scaling rules by vol_pctile (reduce size in elevated volatility) and lowered base_position to 0.8 for more conservative sizing.
Lineage
Parents (1)
changed rel_volume threshold 1.5045 -> 1.3475
Strategy Logic (pseudocode)
# MACDMomentum_V1186 [hybrid]
require regime.trend in ['UPTREND', 'SIDEWAYS']
require regime.volatility in ['LOW_VOLATILITY', 'MEDIUM_VOLATILITY']
require regime.bubble in ['NORMAL']
if flat and (macd_hist > 0.0 and close > sma_50 and ((breakout_50 == 1 and rel_volume > 1.2) or (sma_50 > sma_200 and ret_20d > 0.0)) and vol_pctile < 0.8 and rsi_14 < 70.0):
position = 0.8
if long and (macd_hist < 0.0 or close < sma_50 or drawdown < -0.08 or rsi_14 > 80.0):
position = 0.0 # exit to cashBacktest Metrics
| Metric | Train | Validation | Hidden Test | Full |
|---|
| CAGR | -1.1% | -2.7% | -3.5% | -2.1% |
| Total Return | -8.4% | -7.9% | -12.6% | -26.3% |
| Sharpe | -0.08 | -0.56 | -0.38 | -0.22 |
| Sortino | -0.04 | -0.19 | -0.15 | -0.09 |
| Calmar | -0.04 | -0.34 | -0.20 | -0.06 |
| Volatility | 8.7% | 4.7% | 8.6% | 8.0% |
| Max DD | -25.7% | -7.9% | -17.6% | -33.3% |
| Win Rate | 51.9% | 48.5% | 44.4% | 48.8% |
| Avg Win | 1.9% | 0.8% | 1.7% | 1.6% |
| Avg Loss | -2.3% | -1.2% | -2.0% | -1.9% |
| Payoff | 0.84 | 0.66 | 0.86 | 0.82 |
| Expectancy | -0.1% | -0.2% | -0.3% | -0.2% |
| Profit Factor | 0.90 | 0.62 | 0.69 | 0.78 |
| Trades | 54 | 33 | 36 | 123 |
| Avg Holding Days | 3.0 | 2.0 | 2.4 | 2.5 |
| Turnover | 10.8 | 17.6 | 15.4 | 13.4 |
| Exposure | 4.3% | 3.5% | 4.2% | 4.1% |
Growth of $100
MACDMomentum_V1186 vs TSLA Buy & Hold
MACDMomentum_V1186 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 | -1.2% | -0.50 | -2.9% | 7 |
| 2017 | 4.8% | 1.35 | -0.1% | 2 |
| 2018 | -4.6% | -0.90 | -6.1% | 2 |
| 2019 | 5.1% | 1.01 | -0.1% | 2 |
| 2020 | 0.0% | 0.00 | 0.0% | 0 |
| 2021 | -3.4% | -0.47 | -6.3% | 27 |
| 2022 | -4.6% | -1.04 | -6.1% | 6 |
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 | 278 | 0.0% | 0.00 | 0% |
| hidden test | EXPENSIVE | 83 | 17.4% | 1.72 | 1% |
| hidden test | EXTREME | 48 | 0.0% | 0.00 | 0% |
| hidden test | HIGH VOLATILITY | 254 | -6.9% | -1.02 | 0% |
| hidden test | LOW VOLATILITY | 438 | 1.4% | 0.14 | 6% |
| hidden test | MEDIUM VOLATILITY | 250 | -7.6% | -1.09 | 4% |
| hidden test | NORMAL | 811 | -5.5% | -0.64 | 5% |
| hidden test | SIDEWAYS | 293 | -8.0% | -1.12 | 6% |
| hidden test | UPTREND | 371 | -1.9% | -0.16 | 6% |
| train | DOWNTREND | 518 | -0.0% | -0.70 | 0% |
| train | EXPENSIVE | 311 | 8.9% | 1.65 | 1% |
| train | EXTREME | 100 | 0.0% | 0.00 | 0% |
| train | HIGH VOLATILITY | 699 | 3.3% | 0.42 | 0% |
| train | LOW VOLATILITY | 745 | 3.8% | 0.43 | 9% |
| train | MEDIUM VOLATILITY | 568 | -11.7% | -1.28 | 4% |
| train | NORMAL | 1,601 | -2.7% | -0.28 | 5% |
| train | SIDEWAYS | 592 | -2.1% | -0.27 | 5% |
| train | UPTREND | 902 | -0.2% | -0.02 | 7% |
| validation | DOWNTREND | 125 | 0.0% | 0.00 | 0% |
| validation | EXPENSIVE | 138 | 0.0% | 0.00 | 0% |
| validation | EXTREME | 144 | 0.0% | 0.00 | 0% |
| validation | HIGH VOLATILITY | 258 | 0.0% | 0.00 | 0% |
| validation | LOW VOLATILITY | 183 | 5.1% | 0.86 | 9% |
| validation | MEDIUM VOLATILITY | 315 | -9.2% | -1.63 | 3% |
| validation | NORMAL | 474 | -4.2% | -0.71 | 6% |
| validation | SIDEWAYS | 206 | -2.9% | -0.42 | 7% |
| validation | UPTREND | 425 | -3.3% | -0.80 | 3% |
Trades (full period)
latest 100 of 123
| Entry | Exit | Entry Px | Exit Px | Return | Days | |
|---|
| 2025-12-11 | 2025-12-30 | $446.89 | $454.43 | 1.35% | 13 | |
| 2025-12-04 | 2025-12-09 | $454.53 | $445.17 | -1.43% | 4 | |
| 2025-09-12 | 2025-09-15 | $395.94 | $410.04 | 5.72% | 2 | |
| 2025-07-29 | 2025-07-30 | $321.20 | $319.04 | -1.24% | 2 | |
| 2025-07-21 | 2025-07-22 | $328.49 | $332.11 | -0.44% | 2 | |
| 2024-10-03 | 2024-10-04 | $240.66 | $250.08 | -2.84% | 2 | |
| 2024-10-01 | 2024-10-02 | $258.02 | $249.02 | -1.26% | 2 | |
| 2024-09-27 | 2024-09-30 | $260.46 | $261.63 | 1.80% | 2 | |
| 2024-09-25 | 2024-09-26 | $257.02 | $254.22 | 0.70% | 2 | |
| 2024-09-23 | 2024-09-24 | $250.00 | $254.27 | 3.78% | 2 | |
| 2024-09-18 | 2024-09-19 | $227.20 | $243.92 | -0.40% | 2 | |
| 2024-09-16 | 2024-09-17 | $226.78 | $227.87 | -1.38% | 2 | |
| 2024-09-06 | 2024-09-09 | $210.73 | $216.27 | -6.91% | 2 | |
| 2024-07-01 | 2024-07-02 | $209.86 | $231.26 | 4.68% | 2 | |
| 2024-06-27 | 2024-06-28 | $197.42 | $197.88 | 0.27% | 2 | |
| 2023-12-28 | 2023-12-29 | $253.18 | $248.48 | -2.69% | 2 | |
| 2023-12-26 | 2023-12-27 | $256.61 | $261.44 | 1.13% | 2 | |
| 2023-12-21 | 2023-12-22 | $254.50 | $252.54 | 2.22% | 2 | |
| 2023-12-19 | 2023-12-20 | $257.22 | $247.14 | 1.47% | 2 | |
| 2023-12-15 | 2023-12-18 | $253.50 | $252.08 | 0.62% | 2 | |
| 2023-12-13 | 2023-12-14 | $239.29 | $251.05 | 0.61% | 2 | |
| 2023-12-11 | 2023-12-12 | $239.74 | $237.01 | -1.50% | 2 | |
| 2023-12-07 | 2023-12-08 | $242.64 | $243.84 | 0.93% | 2 | |
| 2023-12-05 | 2023-12-06 | $238.72 | $239.37 | 0.91% | 2 | |
| 2023-12-01 | 2023-12-04 | $238.83 | $235.58 | -0.58% | 2 | |
| 2023-11-29 | 2023-11-30 | $244.14 | $240.08 | -1.00% | 2 | |
| 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-09 | $260.53 | $259.67 | -0.01% | 2 | |
| 2023-09-20 | 2023-09-21 | $262.59 | $255.70 | -1.33% | 2 | |
| 2023-09-18 | 2023-09-19 | $265.28 | $266.50 | -2.81% | 2 | |
| 2023-09-14 | 2023-09-15 | $276.04 | $274.39 | 1.24% | 2 | |
| 2023-09-12 | 2023-09-13 | $267.48 | $271.30 | -1.94% | 2 | |
| 2023-09-06 | 2023-09-07 | $251.92 | $251.49 | -1.58% | 2 | |
| 2023-08-31 | 2023-09-01 | $258.08 | $245.01 | 0.21% | 2 | |
| 2023-06-26 | 2023-06-27 | $241.05 | $250.21 | -5.00% | 2 | |
| 2022-04-08 | 2022-04-11 | $341.83 | $325.31 | -2.56% | 2 | |
| 2022-04-06 | 2022-04-07 | $348.59 | $352.42 | -3.49% | 2 | |
| 2022-04-01 | 2022-04-04 | $361.53 | $381.82 | 0.36% | 2 | |
| 2022-03-25 | 2022-03-28 | $336.88 | $363.95 | -0.42% | 2 | |
| 2022-03-23 | 2022-03-24 | $333.04 | $337.97 | 0.25% | 2 | |
| 2022-03-21 | 2022-03-22 | $307.05 | $331.33 | 1.23% | 2 | |
| 2021-12-28 | 2021-12-29 | $362.82 | $362.06 | -0.56% | 2 | |
| 2021-10-13 | 2021-10-14 | $270.36 | $272.77 | 0.37% | 2 | |
| 2021-10-08 | 2021-10-11 | $261.83 | $263.98 | -0.98% | 2 | |
| 2021-10-06 | 2021-10-07 | $260.92 | $264.54 | 0.06% | 2 | |
| 2021-10-04 | 2021-10-05 | $260.51 | $260.20 | 0.49% | 2 | |
| 2021-09-30 | 2021-10-01 | $258.49 | $258.41 | -0.76% | 2 | |
| 2021-09-28 | 2021-09-29 | $259.19 | $260.44 | -1.55% | 2 | |
| 2021-09-17 | 2021-09-20 | $253.16 | $243.39 | 0.10% | 2 | |
| 2021-09-15 | 2021-09-16 | $251.94 | $252.33 | 1.06% | 2 | |
| 2021-09-13 | 2021-09-14 | $247.67 | $248.16 | 0.57% | 2 | |
| 2021-09-09 | 2021-09-10 | $251.62 | $245.42 | -0.06% | 2 | |
| 2021-09-07 | 2021-09-08 | $250.97 | $251.29 | 1.95% | 2 | |
| 2021-09-02 | 2021-09-03 | $244.13 | $244.52 | -0.35% | 2 | |
| 2021-08-31 | 2021-09-01 | $245.24 | $244.70 | 0.37% | 2 | |
| 2021-08-03 | 2021-08-04 | $236.58 | $236.97 | -0.15% | 2 | |
| 2021-07-09 | 2021-07-12 | $218.98 | $228.57 | 0.35% | 2 | |
| 2021-07-07 | 2021-07-08 | $214.88 | $217.60 | -1.97% | 2 | |
| 2021-07-02 | 2021-07-06 | $226.30 | $219.86 | -0.04% | 2 | |
| 2021-06-30 | 2021-07-01 | $226.57 | $225.97 | -0.28% | 2 | |
| 2021-06-28 | 2021-06-29 | $229.57 | $226.92 | 1.84% | 2 | |
| 2021-06-24 | 2021-06-25 | $226.61 | $223.96 | 2.67% | 2 | |
| 2021-04-28 | 2021-04-29 | $231.47 | $225.67 | -1.33% | 2 | |
| 2021-04-26 | 2021-04-27 | $246.07 | $234.91 | 0.80% | 2 | |
| 2021-04-22 | 2021-04-23 | $239.90 | $243.13 | -2.78% | 2 | |
| 2021-04-20 | 2021-04-21 | $239.66 | $248.04 | 0.33% | 2 | |
| 2021-04-16 | 2021-04-19 | $246.59 | $238.21 | -0.06% | 2 | |
| 2021-04-14 | 2021-04-15 | $244.08 | $246.28 | -3.32% | 2 | |
| 2019-12-16 | 2019-12-17 | $25.43 | $25.27 | 4.99% | 2 | |
| 2019-10-15 | 2019-10-16 | $17.19 | $17.32 | 0.13% | 2 | |
| 2018-12-11 | 2018-12-18 | $24.45 | $22.47 | -3.81% | 6 | |
| 2018-01-18 | 2018-01-19 | $22.97 | $23.33 | -0.76% | 2 | |
| 2017-12-12 | 2017-12-13 | $22.74 | $22.60 | 2.79% | 2 | |
| 2017-03-27 | 2017-03-28 | $18.01 | $18.50 | 1.98% | 2 | |
| 2016-08-05 | 2016-08-08 | $15.34 | $15.08 | -0.36% | 2 | |
| 2016-08-03 | 2016-08-04 | $15.05 | $15.37 | -0.66% | 2 | |
| 2016-08-01 | 2016-08-02 | $15.33 | $15.15 | -1.79% | 2 | |
| 2016-07-28 | 2016-07-29 | $15.37 | $15.65 | 0.58% | 2 | |
| 2016-07-26 | 2016-07-27 | $15.30 | $15.23 | -0.33% | 2 | |
| 2016-07-22 | 2016-07-25 | $14.82 | $15.33 | 0.48% | 2 | |
| 2016-06-08 | 2016-06-09 | $15.70 | $15.29 | 0.93% | 2 | |
| 2015-12-31 | 2016-01-04 | $16.00 | $14.89 | 0.48% | 2 | |
| 2015-09-28 | 2015-09-29 | $16.56 | $16.44 | -2.80% | 2 | |
| 2015-09-24 | 2015-09-25 | $17.54 | $17.13 | 0.47% | 2 | |
| 2015-09-21 | 2015-09-23 | $17.61 | $17.40 | -0.06% | 3 | |
| 2015-07-21 | 2015-07-22 | $17.78 | $17.86 | -4.55% | 2 | |
| 2015-07-01 | 2015-07-09 | $17.94 | $17.19 | -4.09% | 6 | |
| 2015-06-23 | 2015-06-30 | $17.84 | $17.88 | 0.54% | 6 | |
| 2015-05-06 | 2015-05-07 | $15.36 | $15.79 | -1.02% | 2 | |
| 2014-11-28 | 2014-12-01 | $16.30 | $15.44 | -1.42% | 2 | |
| 2014-11-25 | 2014-11-26 | $16.54 | $16.56 | 0.28% | 2 | |
| 2014-11-20 | 2014-11-21 | $16.58 | $16.19 | 0.15% | 2 | |
| 2014-11-18 | 2014-11-19 | $17.18 | $16.52 | 1.01% | 2 | |
| 2014-11-14 | 2014-11-17 | $17.25 | $16.93 | 2.06% | 2 | |
| 2014-11-12 | 2014-11-13 | $16.61 | $16.78 | -0.79% | 2 | |
| 2014-09-08 | 2014-09-12 | $18.81 | $18.61 | 0.69% | 5 | |
| 2014-08-04 | 2014-08-25 | $15.90 | $17.50 | 7.86% | 16 | |
| 2014-06-26 | 2014-07-03 | $15.71 | $15.28 | -2.67% | 6 | |
| 2014-06-23 | 2014-06-25 | $15.81 | $15.79 | 0.87% | 3 | |