PriceMomentum_V0837
ARCHIVEDhybridllmSimplified and diversified entry rules into two clear legs: a short-term momentum breakout (ret_20d + above sma_50) and a trend-confirmed entry (above sma_200 with positive sma_200_slope). Added a volatility filter on entries (vol_pctile < 0.85) and tightened cumulative-return requirement. Replaced the single small fixed exit with a composite exit: larger momentum stop (ret_20d < -3%), a technical stop (close < sma_50), and a max-drawdown safeguard. Restricted regime gate to UPTREND and excluded HIGH_VOLATILITY / EXTREME bubble states to avoid bad environments. Added volatility-based position sizing rules to reduce size in high-volatility regimes. These structural changes aim to improve robustness, reduce large drawdowns, and generalize better in walk-forward.
Lineage
entry = PriceMomentum_V0602 OR LongTermTrend_V0519
Strategy Logic (pseudocode)
# PriceMomentum_V0837 [hybrid]
require regime.trend in ['UPTREND']
require regime.volatility in ['LOW_VOLATILITY', 'MEDIUM_VOLATILITY']
require regime.bubble in ['NORMAL', 'EXPENSIVE']
if flat and ((close > sma_50 and ret_20d > 0.07 and vol_pctile < 0.85) or (close > sma_200 and sma_200_slope > 0.0 and ret_20d > 0.03 and cumret_252d > -0.15)):
position = 1.0
if long and (ret_20d < -0.03 or close < sma_50 or drawdown > 0.12):
position = 0.0 # exit to cashBacktest Metrics
| Metric | Train | Validation | Hidden Test | Full |
|---|---|---|---|---|
| CAGR | 1.0% | 28.5% | 2.5% | 6.7% |
| Total Return | 8.5% | 112.0% | 9.6% | 159.6% |
| Sharpe | 0.15 | 1.08 | 0.22 | 0.41 |
| Sortino | 0.10 | 0.77 | 0.12 | 0.26 |
| Calmar | 0.02 | 0.62 | 0.08 | 0.15 |
| Volatility | 19.1% | 26.4% | 22.4% | 21.6% |
| Max DD | -41.7% | -45.7% | -30.3% | -45.7% |
| Win Rate | 37.5% | 40.0% | 50.0% | 40.7% |
| Avg Win | 8.4% | 26.2% | 10.4% | 14.5% |
| Avg Loss | -5.0% | -6.1% | -7.6% | -5.7% |
| Payoff | 1.69 | 4.31 | 1.36 | 2.53 |
| Expectancy | 0.0% | 6.8% | 1.4% | 2.5% |
| Profit Factor | 1.01 | 2.87 | 1.36 | 1.74 |
| Trades | 32 | 15 | 12 | 59 |
| Avg Holding Days | 12.8 | 12.5 | 12.7 | 13.2 |
| Turnover | 8.1 | 10.0 | 6.5 | 8.0 |
| Exposure | 20.1% | 22.8% | 14.9% | 19.4% |
Growth of $100
Walk-Forward Years
| Year | CAGR | Sharpe | Max DD | Trades |
|---|---|---|---|---|
| 2016 | -8.1% | -0.72 | -14.4% | 3 |
| 2017 | 3.5% | 0.27 | -21.8% | 11 |
| 2018 | -16.9% | -1.37 | -16.8% | 3 |
| 2019 | 17.8% | 1.36 | -7.4% | 0 |
| 2020 | 89.9% | 2.58 | -10.5% | 5 |
| 2021 | 52.3% | 1.48 | -23.1% | 6 |
| 2022 | -29.5% | -1.74 | -32.0% | 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 | 273 | 0.0% | 0.00 | 0% |
| hidden test | EXPENSIVE | 83 | 77.5% | 1.95 | 55% |
| hidden test | EXTREME | 48 | 0.0% | 0.00 | 0% |
| hidden test | HIGH VOLATILITY | 254 | -24.0% | -1.20 | 2% |
| hidden test | LOW VOLATILITY | 433 | 24.1% | 1.39 | 17% |
| hidden test | MEDIUM VOLATILITY | 250 | 1.4% | 0.04 | 26% |
| hidden test | NORMAL | 806 | -2.1% | -0.10 | 12% |
| hidden test | SIDEWAYS | 293 | -13.8% | -1.03 | 1% |
| hidden test | UPTREND | 371 | 23.6% | 0.70 | 37% |
| train | DOWNTREND | 518 | 0.0% | 0.00 | 0% |
| train | EXPENSIVE | 311 | 40.4% | 1.33 | 41% |
| train | EXTREME | 100 | 11.6% | 1.55 | 1% |
| train | HIGH VOLATILITY | 699 | 4.5% | 0.27 | 2% |
| train | LOW VOLATILITY | 745 | 20.7% | 1.00 | 39% |
| train | MEDIUM VOLATILITY | 568 | -22.6% | -1.14 | 18% |
| train | NORMAL | 1,601 | -5.0% | -0.30 | 17% |
| train | SIDEWAYS | 592 | -8.5% | -1.19 | 1% |
| train | UPTREND | 902 | 11.9% | 0.42 | 44% |
| validation | DOWNTREND | 125 | 0.0% | 0.00 | 0% |
| validation | EXPENSIVE | 138 | 115.7% | 3.00 | 54% |
| validation | EXTREME | 144 | 47.3% | 2.61 | 3% |
| validation | HIGH VOLATILITY | 258 | -8.2% | -0.66 | 1% |
| validation | LOW VOLATILITY | 183 | 24.7% | 1.26 | 38% |
| validation | MEDIUM VOLATILITY | 315 | 60.8% | 1.67 | 32% |
| validation | NORMAL | 474 | -2.5% | -0.11 | 20% |
| validation | SIDEWAYS | 206 | -24.8% | -1.59 | 2% |
| validation | UPTREND | 425 | 62.8% | 1.88 | 40% |
Trades (full period)
| Entry | Exit | Entry Px | Exit Px | Return | Days | |
|---|---|---|---|---|---|---|
| 2026-05-29 | 2026-06-01 | $435.79 | $415.88 | -1.63% | 2 | |
| 2025-12-12 | 2026-01-05 | $458.96 | $451.67 | -2.17% | 15 | |
| 2025-09-12 | 2025-11-14 | $395.94 | $404.35 | 8.79% | 46 | |
| 2025-09-04 | 2025-09-05 | $338.53 | $350.84 | 1.13% | 2 | |
| 2025-05-22 | 2025-06-06 | $341.04 | $295.14 | -15.09% | 11 | |
| 2024-10-03 | 2024-10-14 | $240.66 | $219.16 | -12.71% | 8 | |
| 2024-09-23 | 2024-09-27 | $250.00 | $260.46 | 6.49% | 5 | |
| 2024-09-16 | 2024-09-20 | $226.78 | $238.25 | 5.71% | 5 | |
| 2024-09-06 | 2024-09-09 | $210.73 | $216.27 | -8.64% | 2 | |
| 2024-07-02 | 2024-07-12 | $231.26 | $248.23 | 14.63% | 8 | |
| 2024-01-03 | 2024-01-10 | $238.45 | $233.94 | -5.61% | 6 | |
| 2023-06-02 | 2023-08-02 | $213.97 | $254.11 | 25.56% | 42 | |
| 2022-08-16 | 2022-08-22 | $306.56 | $289.91 | -4.28% | 5 | |
| 2022-08-05 | 2022-08-08 | $288.17 | $290.42 | -6.82% | 2 | |
| 2022-04-05 | 2022-04-27 | $363.75 | $293.84 | -23.64% | 16 | |
| 2022-01-12 | 2022-01-13 | $368.74 | $343.85 | 3.73% | 2 | |
| 2021-12-09 | 2021-12-10 | $334.60 | $339.01 | -6.29% | 2 | |
| 2021-11-23 | 2021-12-01 | $369.68 | $365.00 | -1.25% | 6 | |
| 2021-08-24 | 2021-11-10 | $236.16 | $355.98 | 44.62% | 56 | |
| 2021-08-05 | 2021-08-23 | $238.21 | $235.43 | -4.50% | 13 | |
| 2021-01-12 | 2021-02-11 | $283.15 | $270.55 | -0.98% | 22 | |
| 2020-12-10 | 2021-01-11 | $209.02 | $270.40 | 45.30% | 21 | |
| 2020-11-19 | 2020-12-08 | $166.42 | $216.63 | 31.62% | 13 | |
| 2020-10-22 | 2020-10-29 | $141.93 | $136.94 | -4.12% | 6 | |
| 2020-10-13 | 2020-10-20 | $148.88 | $140.65 | -2.79% | 6 | |
| 2020-06-25 | 2020-06-30 | $65.73 | $71.99 | 4.84% | 4 | |
| 2019-11-22 | 2020-01-22 | $22.20 | $37.97 | 53.90% | 40 | |
| 2018-11-27 | 2018-12-19 | $22.93 | $22.20 | -2.79% | 16 | |
| 2018-02-08 | 2018-02-09 | $21.02 | $20.69 | -8.82% | 2 | |
| 2018-02-01 | 2018-02-06 | $23.28 | $22.26 | -6.17% | 4 | |
| 2017-10-05 | 2017-10-10 | $23.69 | $23.71 | -3.59% | 4 | |
| 2017-09-18 | 2017-09-26 | $25.67 | $23.02 | -9.35% | 7 | |
| 2017-08-15 | 2017-08-18 | $24.16 | $23.16 | -3.46% | 4 | |
| 2017-08-04 | 2017-08-07 | $23.79 | $23.68 | 2.63% | 2 | |
| 2017-06-30 | 2017-07-06 | $24.11 | $20.59 | -9.51% | 4 | |
| 2017-06-05 | 2017-06-14 | $23.15 | $25.38 | 10.40% | 8 | |
| 2017-05-12 | 2017-05-19 | $21.65 | $20.72 | -3.30% | 6 | |
| 2017-04-24 | 2017-05-10 | $20.54 | $21.68 | 4.92% | 13 | |
| 2017-04-20 | 2017-04-21 | $20.17 | $20.37 | -1.18% | 2 | |
| 2017-03-28 | 2017-04-04 | $18.50 | $20.25 | 10.26% | 6 | |
| 2017-01-05 | 2017-02-28 | $15.12 | $16.67 | 8.26% | 37 | |
| 2016-07-26 | 2016-08-23 | $15.30 | $14.99 | -3.27% | 21 | |
| 2016-06-08 | 2016-06-09 | $15.70 | $15.29 | 1.17% | 2 | |
| 2016-04-05 | 2016-05-04 | $17.03 | $14.84 | -6.12% | 22 | |
| 2015-08-06 | 2015-08-07 | $16.41 | $16.17 | -9.08% | 2 | |
| 2015-05-11 | 2015-07-28 | $15.97 | $17.65 | 6.72% | 55 | |
| 2015-04-29 | 2015-05-01 | $15.50 | $15.07 | -2.12% | 3 | |
| 2014-09-19 | 2014-09-23 | $17.29 | $16.69 | -5.42% | 3 | |
| 2014-08-05 | 2014-09-16 | $15.90 | $17.38 | 6.22% | 30 | |
| 2014-06-23 | 2014-07-17 | $15.81 | $14.36 | -5.60% | 18 | |
| 2014-03-20 | 2014-03-26 | $15.66 | $14.20 | -6.72% | 5 | |
| 2014-02-13 | 2014-02-26 | $13.31 | $16.87 | 26.72% | 9 | |
| 2013-09-09 | 2013-10-22 | $10.71 | $11.44 | 3.16% | 32 | |
| 2013-03-26 | 2013-04-02 | $2.52 | $2.96 | 16.82% | 5 | |
| 2013-01-25 | 2013-02-22 | $2.47 | $2.41 | -5.14% | 20 | |
| 2012-12-18 | 2013-01-11 | $2.31 | $2.19 | -2.72% | 17 | |
| 2012-11-23 | 2012-12-14 | $2.14 | $2.25 | 3.30% | 16 | |
| 2012-02-23 | 2012-04-10 | $2.30 | $2.16 | -3.32% | 33 | |
| 2012-02-21 | 2012-02-22 | $2.30 | $2.28 | -1.54% | 2 |