PriceMomentum_V0395
ARCHIVEDmomentumllmConverted single-threshold entry into a momentum+trend gate: require positive 20d return, rising 50-day slope, and either a 20d breakout or small positive distance above the 20 SMA — to reduce overfitting and enforce structural momentum. Tightened exit set by adding momentum-fade (macd_hist < 0) plus a modest stop (ret_20d < -12%) while keeping the roll-high/sma breach. Added regime gates to avoid downtrends and high volatility, and introduced multi-dimensional position scaling (volatility and bubble states) and lowered base position to reduce drawdown and make sizing adaptive.
Lineage
entry from PriceMomentum_V0054, exit from PriceMomentum_V0227
Strategy Logic (pseudocode)
# PriceMomentum_V0395 [momentum]
require regime.trend in ['UPTREND', 'SIDEWAYS']
require regime.volatility in ['LOW_VOLATILITY', 'MEDIUM_VOLATILITY']
require regime.bubble in ['NORMAL', 'EXPENSIVE']
if flat and (ret_20d > 0.04 and sma_50_slope > 0.0 and (breakout_20 > 0.5 or dist_sma_20 > 0.01)):
position = 0.85
if long and (ret_20d < -0.12 or roll_high_50 < sma_20 or macd_hist < 0.0):
position = 0.0 # exit to cash
if regime.volatility == "LOW_VOLATILITY": position *= 1.0
if regime.volatility == "MEDIUM_VOLATILITY": position *= 0.7
if regime.volatility == "HIGH_VOLATILITY": position *= 0.3
if regime.bubble == "NORMAL": position *= 1.0
if regime.bubble == "EXPENSIVE": position *= 0.6
if regime.bubble == "EXTREME": position *= 0.2Backtest Metrics
| Metric | Train | Validation | Hidden Test | Full |
|---|---|---|---|---|
| CAGR | 1.6% | 12.0% | 3.2% | 4.1% |
| Total Return | 13.1% | 40.6% | 12.4% | 81.5% |
| Sharpe | 0.18 | 0.92 | 0.29 | 0.37 |
| Sortino | 0.11 | 0.63 | 0.17 | 0.22 |
| Calmar | 0.06 | 0.54 | 0.19 | 0.13 |
| Volatility | 13.0% | 13.3% | 14.8% | 13.5% |
| Max DD | -27.9% | -22.1% | -17.2% | -31.4% |
| Win Rate | 39.7% | 56.7% | 40.0% | 43.6% |
| Avg Win | 3.6% | 3.8% | 5.8% | 4.2% |
| Avg Loss | -2.1% | -2.0% | -2.8% | -2.2% |
| Payoff | 1.75 | 1.91 | 2.03 | 1.89 |
| Expectancy | 0.2% | 1.3% | 0.6% | 0.6% |
| Profit Factor | 1.15 | 2.50 | 1.35 | 1.46 |
| Trades | 73 | 30 | 30 | 133 |
| Avg Holding Days | 5.0 | 5.6 | 5.0 | 5.2 |
| Turnover | 12.6 | 11.3 | 11.7 | 12.1 |
| Exposure | 10.6% | 11.0% | 9.2% | 10.3% |
Growth of $100
Walk-Forward Years
| Year | CAGR | Sharpe | Max DD | Trades |
|---|---|---|---|---|
| 2016 | -1.5% | -0.17 | -9.0% | 8 |
| 2017 | 11.3% | 1.16 | -4.7% | 17 |
| 2018 | -7.6% | -1.20 | -9.0% | 5 |
| 2019 | -6.5% | -0.21 | -19.8% | 4 |
| 2020 | 26.1% | 2.44 | -2.9% | 8 |
| 2021 | 25.2% | 1.32 | -12.5% | 15 |
| 2022 | -11.0% | -1.11 | -13.0% | 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 | 267 | 0.0% | 0.00 | 0% |
| hidden test | EXPENSIVE | 83 | 25.8% | 1.35 | 15% |
| hidden test | EXTREME | 48 | 0.0% | 0.00 | 0% |
| hidden test | HIGH VOLATILITY | 254 | -5.8% | -0.70 | 1% |
| hidden test | LOW VOLATILITY | 429 | 23.0% | 1.44 | 15% |
| hidden test | MEDIUM VOLATILITY | 248 | -17.9% | -1.02 | 8% |
| hidden test | NORMAL | 800 | 2.3% | 0.15 | 9% |
| hidden test | SIDEWAYS | 293 | -14.2% | -1.18 | 10% |
| hidden test | UPTREND | 371 | 21.9% | 1.05 | 15% |
| train | DOWNTREND | 518 | -0.3% | -0.79 | 0% |
| train | EXPENSIVE | 311 | 11.1% | 1.01 | 14% |
| train | EXTREME | 100 | 4.2% | 1.55 | 0% |
| train | HIGH VOLATILITY | 699 | 5.6% | 0.38 | 1% |
| train | LOW VOLATILITY | 745 | 7.7% | 0.57 | 23% |
| train | MEDIUM VOLATILITY | 568 | -8.5% | -0.90 | 6% |
| train | NORMAL | 1,601 | 0.6% | 0.04 | 11% |
| train | SIDEWAYS | 592 | -8.0% | -0.75 | 7% |
| train | UPTREND | 902 | 10.7% | 0.62 | 19% |
| validation | DOWNTREND | 125 | 0.0% | 0.00 | 0% |
| validation | EXPENSIVE | 138 | 43.9% | 3.31 | 15% |
| validation | EXTREME | 144 | 13.7% | 2.28 | 1% |
| validation | HIGH VOLATILITY | 258 | -4.9% | -0.66 | 0% |
| validation | LOW VOLATILITY | 183 | 9.6% | 0.68 | 26% |
| validation | MEDIUM VOLATILITY | 315 | 27.8% | 1.71 | 11% |
| validation | NORMAL | 474 | 2.6% | 0.17 | 13% |
| validation | SIDEWAYS | 206 | -14.1% | -1.71 | 4% |
| validation | UPTREND | 425 | 28.6% | 1.71 | 18% |
Trades (full period)
| Entry | Exit | Entry Px | Exit Px | Return | Days | |
|---|---|---|---|---|---|---|
| 2026-05-27 | 2026-06-02 | $440.36 | $423.74 | -3.63% | 5 | |
| 2026-05-22 | 2026-05-26 | $426.01 | $433.59 | 1.49% | 2 | |
| 2026-05-14 | 2026-05-21 | $443.30 | $417.85 | -5.51% | 6 | |
| 2025-12-15 | 2025-12-30 | $475.31 | $454.43 | 0.01% | 11 | |
| 2025-11-06 | 2025-11-07 | $445.91 | $429.52 | -1.32% | 2 | |
| 2025-11-03 | 2025-11-05 | $468.37 | $462.07 | -1.83% | 3 | |
| 2025-10-24 | 2025-10-27 | $433.72 | $452.42 | -1.28% | 2 | |
| 2025-10-09 | 2025-10-10 | $435.54 | $413.49 | -0.33% | 2 | |
| 2025-10-07 | 2025-10-08 | $433.09 | $438.69 | -1.66% | 2 | |
| 2025-09-08 | 2025-10-06 | $346.40 | $453.25 | 15.03% | 21 | |
| 2025-08-25 | 2025-09-03 | $346.60 | $334.09 | -2.82% | 7 | |
| 2025-06-04 | 2025-06-05 | $332.05 | $284.70 | -2.23% | 2 | |
| 2025-05-19 | 2025-06-03 | $342.09 | $344.27 | 1.98% | 11 | |
| 2024-10-07 | 2024-10-08 | $240.83 | $244.50 | -3.31% | 2 | |
| 2024-10-03 | 2024-10-04 | $240.66 | $250.08 | -2.12% | 2 | |
| 2024-09-16 | 2024-09-20 | $226.78 | $238.25 | 3.42% | 5 | |
| 2024-09-05 | 2024-09-09 | $230.17 | $216.27 | -2.37% | 3 | |
| 2024-06-14 | 2024-07-12 | $178.01 | $248.23 | 25.51% | 19 | |
| 2023-07-20 | 2023-07-21 | $262.90 | $260.02 | -8.44% | 2 | |
| 2023-07-18 | 2023-07-19 | $293.34 | $291.26 | 0.70% | 2 | |
| 2023-07-14 | 2023-07-17 | $281.38 | $290.38 | 0.89% | 2 | |
| 2023-07-12 | 2023-07-13 | $271.99 | $277.90 | 0.52% | 2 | |
| 2023-07-10 | 2023-07-11 | $269.61 | $269.79 | -1.16% | 2 | |
| 2023-07-05 | 2023-07-07 | $282.48 | $274.43 | -0.81% | 3 | |
| 2023-06-30 | 2023-07-03 | $261.77 | $279.82 | 1.24% | 2 | |
| 2023-06-28 | 2023-06-29 | $256.24 | $257.50 | 1.88% | 2 | |
| 2023-05-31 | 2023-06-27 | $203.93 | $250.21 | 16.57% | 19 | |
| 2023-04-03 | 2023-04-06 | $194.77 | $185.06 | -8.05% | 4 | |
| 2023-03-02 | 2023-03-03 | $190.90 | $197.79 | -3.60% | 2 | |
| 2023-02-28 | 2023-03-01 | $205.71 | $202.77 | -0.67% | 2 | |
| 2022-09-12 | 2022-09-23 | $304.42 | $275.33 | -3.28% | 10 | |
| 2022-08-22 | 2022-08-23 | $289.91 | $296.45 | -2.10% | 2 | |
| 2022-08-15 | 2022-08-19 | $309.32 | $296.67 | 0.46% | 5 | |
| 2022-08-02 | 2022-08-12 | $300.59 | $300.03 | -2.17% | 9 | |
| 2022-04-05 | 2022-04-11 | $363.75 | $325.31 | -6.42% | 5 | |
| 2022-01-12 | 2022-01-13 | $368.74 | $343.85 | 2.22% | 2 | |
| 2021-11-23 | 2021-11-24 | $369.68 | $372.00 | -2.58% | 2 | |
| 2021-10-12 | 2021-11-10 | $268.57 | $355.98 | 24.79% | 22 | |
| 2021-10-08 | 2021-10-11 | $261.83 | $263.98 | -1.04% | 2 | |
| 2021-09-27 | 2021-10-07 | $263.79 | $264.54 | 0.75% | 9 | |
| 2021-09-23 | 2021-09-24 | $251.21 | $258.13 | 0.02% | 2 | |
| 2021-09-07 | 2021-09-21 | $250.97 | $246.46 | -0.54% | 11 | |
| 2021-08-26 | 2021-08-27 | $233.72 | $237.31 | -1.37% | 2 | |
| 2021-08-24 | 2021-08-25 | $236.16 | $237.07 | 0.09% | 2 | |
| 2021-08-03 | 2021-08-17 | $236.58 | $221.90 | -2.97% | 11 | |
| 2021-02-04 | 2021-02-05 | $283.33 | $284.08 | -0.27% | 2 | |
| 2021-02-02 | 2021-02-03 | $290.93 | $284.90 | 1.33% | 2 | |
| 2021-01-28 | 2021-01-29 | $278.48 | $264.51 | -1.26% | 2 | |
| 2021-01-26 | 2021-01-27 | $294.36 | $288.05 | 0.02% | 2 | |
| 2021-01-12 | 2021-01-25 | $283.15 | $293.60 | 1.51% | 9 | |
| 2021-01-05 | 2021-01-11 | $245.04 | $270.40 | 6.99% | 5 | |
| 2020-12-31 | 2021-01-04 | $235.22 | $243.26 | 0.49% | 2 | |
| 2020-12-29 | 2020-12-30 | $222.00 | $231.59 | 0.05% | 2 | |
| 2020-12-24 | 2020-12-28 | $220.59 | $221.23 | 0.80% | 2 | |
| 2020-12-18 | 2020-12-23 | $231.67 | $215.33 | -0.83% | 4 | |
| 2020-12-10 | 2020-12-17 | $209.02 | $218.63 | 1.05% | 6 | |
| 2020-11-19 | 2020-12-08 | $166.42 | $216.63 | 10.56% | 13 | |
| 2020-10-13 | 2020-10-20 | $148.88 | $140.65 | -0.97% | 6 | |
| 2020-06-25 | 2020-06-26 | $65.73 | $63.98 | 0.86% | 2 | |
| 2019-12-17 | 2020-01-22 | $25.27 | $37.97 | 19.71% | 24 | |
| 2019-11-22 | 2019-11-25 | $22.20 | $22.42 | -5.39% | 2 | |
| 2019-10-16 | 2019-10-25 | $17.32 | $21.88 | 13.88% | 8 | |
| 2019-09-12 | 2019-09-25 | $16.39 | $15.25 | -8.28% | 10 | |
| 2019-07-22 | 2019-07-26 | $17.05 | $15.20 | -9.77% | 5 | |
| 2018-12-12 | 2018-12-18 | $24.44 | $22.47 | -2.45% | 5 | |
| 2018-12-06 | 2018-12-07 | $24.20 | $23.86 | 0.44% | 2 | |
| 2018-11-29 | 2018-11-30 | $22.74 | $23.37 | -1.26% | 2 | |
| 2018-03-13 | 2018-03-15 | $22.79 | $21.71 | -3.38% | 3 | |
| 2018-01-22 | 2018-02-05 | $23.44 | $22.21 | -1.15% | 11 | |
| 2017-09-18 | 2017-09-25 | $25.67 | $23.00 | -3.47% | 6 | |
| 2017-08-15 | 2017-08-18 | $24.16 | $23.16 | -1.24% | 4 | |
| 2017-08-04 | 2017-08-07 | $23.79 | $23.68 | 0.94% | 2 | |
| 2017-06-05 | 2017-06-14 | $23.15 | $25.38 | 3.53% | 8 | |
| 2017-05-17 | 2017-05-18 | $20.41 | $20.87 | -1.30% | 2 | |
| 2017-05-12 | 2017-05-16 | $21.65 | $21.13 | -0.87% | 3 | |
| 2017-05-02 | 2017-05-04 | $21.26 | $19.70 | -1.79% | 3 | |
| 2017-04-28 | 2017-05-01 | $20.94 | $21.52 | 0.56% | 2 | |
| 2017-04-26 | 2017-04-27 | $20.68 | $20.58 | -0.48% | 2 | |
| 2017-04-24 | 2017-04-25 | $20.54 | $20.92 | 0.21% | 2 | |
| 2017-04-20 | 2017-04-21 | $20.17 | $20.37 | -0.42% | 2 | |
| 2017-03-28 | 2017-04-04 | $18.50 | $20.25 | 4.00% | 6 | |
| 2017-02-23 | 2017-02-24 | $17.07 | $17.13 | -3.37% | 2 | |
| 2017-02-09 | 2017-02-22 | $17.95 | $18.23 | 2.89% | 9 | |
| 2017-02-07 | 2017-02-08 | $17.17 | $17.47 | -0.16% | 2 | |
| 2017-02-03 | 2017-02-06 | $16.76 | $17.18 | -0.15% | 2 | |
| 2016-12-28 | 2017-02-02 | $14.65 | $16.77 | 11.74% | 25 | |
| 2016-07-26 | 2016-08-09 | $15.30 | $15.27 | -1.58% | 11 | |
| 2016-04-27 | 2016-04-28 | $16.76 | $16.51 | -0.65% | 2 | |
| 2016-04-25 | 2016-04-26 | $16.79 | $16.92 | -0.57% | 2 | |
| 2016-04-21 | 2016-04-22 | $16.55 | $16.92 | -0.52% | 2 | |
| 2016-04-19 | 2016-04-20 | $16.49 | $16.66 | -1.64% | 2 | |
| 2016-04-15 | 2016-04-18 | $16.97 | $16.93 | 0.51% | 2 | |
| 2016-04-04 | 2016-04-14 | $16.47 | $16.79 | 5.12% | 9 | |
| 2016-03-28 | 2016-04-01 | $15.35 | $15.84 | 0.41% | 5 | |
| 2015-08-06 | 2015-08-07 | $16.41 | $16.17 | -5.40% | 2 | |
| 2015-07-20 | 2015-07-22 | $18.82 | $17.86 | -1.16% | 3 | |
| 2015-06-22 | 2015-07-09 | $17.32 | $17.19 | -2.57% | 13 | |
| 2015-06-18 | 2015-06-19 | $17.46 | $17.50 | 0.31% | 2 | |
| 2015-06-10 | 2015-06-11 | $16.71 | $16.76 | -1.93% | 2 | |
| 2015-06-08 | 2015-06-09 | $17.09 | $17.07 | 2.27% | 2 |