PriceMomentum_V1525
ARCHIVEDhybridllm1) Added strict regime gates: only trade in UPTREND, LOW/MEDIUM volatility, and NORMAL bubble to reduce drawdown in adverse regimes. 2) Added a volatility filter (vol_pctile < 0.85) in the entry to avoid extreme intraday/short-term volatility spikes. 3) Strengthened exit logic: exit on MACD histogram turning negative OR a sharp 1-day drop (ret_1d < -3%) OR a 20-day rolling low to cut losses faster. 4) Reduced base_position from 1.0 to 0.8 to lower position sizing and portfolio risk. 5) Removed a redundant cumret condition to simplify the entry logic.
Lineage
removed entry condition: (ret_20d > 0.184 and breakout_20 == 1)
Strategy Logic (pseudocode)
# PriceMomentum_V1525 [hybrid]
require regime.trend in ['UPTREND']
require regime.volatility in ['LOW_VOLATILITY', 'MEDIUM_VOLATILITY']
require regime.bubble in ['NORMAL']
if flat and (((((close > sma_200 and sma_200_slope > -0.0024) or ret_20d > 0.085) and cumret_252d > 1.1509 and dist_sma_50 > -0.2357) or ((macd_hist > 0.0 and close > sma_50) or ((breakout_50 == 1 and rel_volume > 1.5045) or ((macd_hist > 0.0 and close > sma_50) and sma_50 > sma_200)))) and sma_20 < close and vol_pctile < 0.85):
position = 0.8
if long and (macd_hist < 0.0 or ret_1d < -0.03 or roll_low_20 == 1):
position = 0.0 # exit to cashBacktest Metrics
| Metric | Train | Validation | Hidden Test | Full |
|---|---|---|---|---|
| CAGR | 1.0% | -2.1% | 1.5% | 0.5% |
| Total Return | 8.7% | -6.3% | 5.9% | 7.9% |
| Sharpe | 0.17 | -0.20 | 0.20 | 0.10 |
| Sortino | 0.08 | -0.09 | 0.08 | 0.05 |
| Calmar | 0.07 | -0.09 | 0.09 | 0.02 |
| Volatility | 7.7% | 8.9% | 10.0% | 8.6% |
| Max DD | -14.8% | -22.7% | -16.4% | -29.2% |
| Win Rate | 51.7% | 50.0% | 51.3% | 51.2% |
| Avg Win | 1.6% | 1.5% | 2.5% | 1.8% |
| Avg Loss | -1.4% | -1.8% | -2.2% | -1.7% |
| Payoff | 1.10 | 0.84 | 1.12 | 1.04 |
| Expectancy | 0.1% | -0.1% | 0.2% | 0.1% |
| Profit Factor | 1.17 | 0.84 | 1.18 | 1.09 |
| Trades | 89 | 38 | 39 | 166 |
| Avg Holding Days | 2.0 | 2.0 | 2.0 | 2.0 |
| Turnover | 17.8 | 20.3 | 16.6 | 18.0 |
| Exposure | 3.5% | 4.0% | 3.3% | 3.6% |
Growth of $100
Walk-Forward Years
| Year | CAGR | Sharpe | Max DD | Trades |
|---|---|---|---|---|
| 2016 | 0.0% | 0.03 | -2.9% | 10 |
| 2017 | 9.0% | 1.99 | -0.3% | 12 |
| 2018 | -3.1% | -0.65 | -4.0% | 4 |
| 2019 | 3.7% | 0.72 | -1.2% | 2 |
| 2020 | 0.0% | 0.00 | 0.0% | 0 |
| 2021 | 8.3% | 0.67 | -10.7% | 29 |
| 2022 | -13.5% | -1.79 | -13.5% | 9 |
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 | 33.8% | 2.44 | 2% |
| hidden test | EXTREME | 48 | 0.0% | 0.00 | 0% |
| hidden test | HIGH VOLATILITY | 254 | -13.9% | -1.44 | 1% |
| hidden test | LOW VOLATILITY | 443 | 3.6% | 0.40 | 4% |
| hidden test | MEDIUM VOLATILITY | 250 | 15.5% | 1.31 | 5% |
| hidden test | NORMAL | 816 | -1.1% | -0.11 | 4% |
| hidden test | SIDEWAYS | 298 | -4.9% | -1.23 | 1% |
| hidden test | UPTREND | 371 | 9.1% | 0.59 | 8% |
| train | DOWNTREND | 518 | 0.0% | 0.00 | 0% |
| train | EXPENSIVE | 311 | 6.6% | 1.31 | 1% |
| train | EXTREME | 100 | 0.0% | 0.00 | 0% |
| train | HIGH VOLATILITY | 699 | 4.5% | 0.59 | 0% |
| train | LOW VOLATILITY | 745 | 5.7% | 0.76 | 7% |
| train | MEDIUM VOLATILITY | 568 | -8.3% | -1.01 | 3% |
| train | NORMAL | 1,601 | 0.4% | 0.05 | 4% |
| train | SIDEWAYS | 592 | -3.4% | -1.05 | 1% |
| train | UPTREND | 902 | 5.2% | 0.46 | 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.1% | -0.99 | 0% |
| validation | LOW VOLATILITY | 183 | 1.9% | 0.24 | 11% |
| validation | MEDIUM VOLATILITY | 315 | -5.3% | -0.43 | 3% |
| validation | NORMAL | 474 | -2.8% | -0.25 | 6% |
| validation | SIDEWAYS | 206 | -10.9% | -1.57 | 1% |
| validation | UPTREND | 425 | 2.1% | 0.20 | 7% |
Trades (full period)
| Entry | Exit | Entry Px | Exit Px | Return | Days | |
|---|---|---|---|---|---|---|
| 2026-07-01 | 2026-07-02 | $425.30 | $393.45 | 0.73% | 2 | |
| 2026-05-29 | 2026-06-01 | $435.79 | $415.88 | -1.30% | 2 | |
| 2025-12-29 | 2025-12-30 | $459.64 | $454.43 | -2.78% | 2 | |
| 2025-12-24 | 2025-12-26 | $485.40 | $475.19 | -0.19% | 2 | |
| 2025-12-22 | 2025-12-23 | $488.73 | $485.56 | 1.09% | 2 | |
| 2025-12-18 | 2025-12-19 | $483.37 | $481.20 | 2.60% | 2 | |
| 2025-12-16 | 2025-12-17 | $489.88 | $467.26 | 2.29% | 2 | |
| 2025-12-12 | 2025-12-15 | $458.96 | $475.31 | 2.00% | 2 | |
| 2025-12-10 | 2025-12-11 | $451.45 | $446.89 | 0.97% | 2 | |
| 2025-12-08 | 2025-12-09 | $439.58 | $445.17 | -2.87% | 2 | |
| 2025-12-04 | 2025-12-05 | $454.53 | $455.00 | 1.23% | 2 | |
| 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-23 | 2025-07-24 | $332.56 | $305.30 | -0.05% | 2 | |
| 2025-07-21 | 2025-07-22 | $328.49 | $332.11 | -0.44% | 2 | |
| 2025-06-02 | 2025-06-03 | $342.69 | $344.27 | -1.03% | 2 | |
| 2025-05-27 | 2025-05-28 | $362.89 | $356.90 | 5.39% | 2 | |
| 2025-05-22 | 2025-05-23 | $341.04 | $339.34 | 1.37% | 2 | |
| 2024-10-03 | 2024-10-04 | $240.66 | $250.08 | -2.84% | 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-11 | 2024-07-12 | $241.03 | $248.23 | -6.91% | 2 | |
| 2024-07-09 | 2024-07-10 | $262.33 | $263.26 | 2.81% | 2 | |
| 2024-07-05 | 2024-07-08 | $251.52 | $252.94 | 1.50% | 2 | |
| 2024-07-02 | 2024-07-03 | $231.26 | $246.39 | 7.99% | 2 | |
| 2023-09-01 | 2023-09-05 | $245.01 | $256.49 | -4.21% | 2 | |
| 2023-08-30 | 2023-08-31 | $256.90 | $258.08 | -0.25% | 2 | |
| 2023-07-06 | 2023-07-07 | $276.54 | $274.43 | -1.84% | 2 | |
| 2023-06-23 | 2023-06-26 | $256.60 | $241.05 | -2.58% | 2 | |
| 2023-06-21 | 2023-06-22 | $259.46 | $264.61 | -4.53% | 2 | |
| 2023-06-16 | 2023-06-20 | $260.54 | $274.45 | 1.29% | 2 | |
| 2023-06-14 | 2023-06-15 | $256.79 | $255.90 | -0.75% | 2 | |
| 2023-06-12 | 2023-06-13 | $249.83 | $258.71 | 1.62% | 2 | |
| 2023-06-08 | 2023-06-09 | $234.86 | $244.40 | 3.50% | 2 | |
| 2023-06-06 | 2023-06-07 | $221.31 | $224.57 | 1.20% | 2 | |
| 2023-06-02 | 2023-06-05 | $213.97 | $217.61 | 2.32% | 2 | |
| 2022-09-21 | 2022-09-22 | $300.80 | $288.59 | -2.21% | 2 | |
| 2022-09-19 | 2022-09-20 | $309.07 | $308.73 | 1.35% | 2 | |
| 2022-09-15 | 2022-09-16 | $303.75 | $303.35 | 0.14% | 2 | |
| 2022-09-13 | 2022-09-14 | $292.13 | $302.61 | -3.39% | 2 | |
| 2022-08-18 | 2022-08-19 | $302.87 | $296.67 | -0.46% | 2 | |
| 2022-08-16 | 2022-08-17 | $306.56 | $304.00 | -0.87% | 2 | |
| 2022-08-05 | 2022-08-08 | $288.17 | $290.42 | -5.46% | 2 | |
| 2022-04-07 | 2022-04-08 | $352.42 | $341.83 | 0.72% | 2 | |
| 2022-04-05 | 2022-04-06 | $363.75 | $348.59 | -3.94% | 2 | |
| 2021-12-30 | 2021-12-31 | $356.78 | $352.26 | -1.33% | 2 | |
| 2021-12-28 | 2021-12-29 | $362.82 | $362.06 | -0.56% | 2 | |
| 2021-11-23 | 2021-11-24 | $369.68 | $372.00 | -3.47% | 2 | |
| 2021-11-08 | 2021-11-09 | $387.65 | $341.17 | -4.03% | 2 | |
| 2021-11-04 | 2021-11-05 | $409.97 | $407.36 | 0.90% | 2 | |
| 2021-11-02 | 2021-11-03 | $390.67 | $404.62 | -2.58% | 2 | |
| 2021-10-29 | 2021-11-01 | $371.33 | $402.86 | 2.58% | 2 | |
| 2021-10-27 | 2021-10-28 | $345.95 | $359.01 | 1.37% | 2 | |
| 2021-10-25 | 2021-10-26 | $341.62 | $339.48 | 9.96% | 2 | |
| 2021-10-21 | 2021-10-22 | $298.00 | $303.23 | 2.44% | 2 | |
| 2021-10-19 | 2021-10-20 | $288.09 | $288.60 | -0.70% | 2 | |
| 2021-10-15 | 2021-10-18 | $281.01 | $290.04 | 2.25% | 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-13 | 2021-08-16 | $239.06 | $228.72 | -0.72% | 2 | |
| 2021-08-11 | 2021-08-12 | $235.94 | $240.75 | -0.40% | 2 | |
| 2021-08-09 | 2021-08-10 | $237.92 | $236.66 | 1.52% | 2 | |
| 2021-08-05 | 2021-08-06 | $238.21 | $233.03 | 0.26% | 2 | |
| 2019-12-16 | 2019-12-17 | $25.43 | $25.27 | 4.99% | 2 | |
| 2019-10-21 | 2019-10-22 | $16.90 | $17.04 | -1.23% | 2 | |
| 2018-12-17 | 2018-12-18 | $23.23 | $22.47 | -3.94% | 2 | |
| 2018-12-13 | 2018-12-14 | $25.12 | $24.38 | 2.06% | 2 | |
| 2018-12-11 | 2018-12-12 | $24.45 | $24.44 | 0.19% | 2 | |
| 2018-02-01 | 2018-02-02 | $23.28 | $22.92 | -1.30% | 2 | |
| 2017-10-18 | 2017-10-19 | $23.98 | $23.45 | 0.72% | 2 | |
| 2017-10-13 | 2017-10-16 | $23.70 | $23.37 | -0.18% | 2 | |
| 2017-03-24 | 2017-03-27 | $17.54 | $18.01 | 2.47% | 2 | |
| 2017-03-20 | 2017-03-21 | $17.46 | $16.71 | -0.03% | 2 | |
| 2017-01-31 | 2017-02-01 | $16.80 | $16.62 | 0.25% | 2 | |
| 2017-01-24 | 2017-01-25 | $16.97 | $16.96 | 1.67% | 2 | |
| 2017-01-20 | 2017-01-23 | $16.32 | $16.59 | 0.16% | 2 | |
| 2017-01-18 | 2017-01-19 | $15.89 | $16.25 | 0.78% | 2 | |
| 2017-01-13 | 2017-01-17 | $15.85 | $15.71 | 2.68% | 2 | |
| 2017-01-11 | 2017-01-12 | $15.32 | $15.31 | -0.21% | 2 | |
| 2017-01-09 | 2017-01-10 | $15.42 | $15.32 | 0.63% | 2 | |
| 2017-01-05 | 2017-01-06 | $15.12 | $15.27 | -0.24% | 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 |