PriceMomentum_V0630
ARCHIVEDhybridllm- Simplified and de-duplicated entry conditions: require 20d momentum, improving SMA slope, positive MACD histogram, and either price above SMA50 or a 20-day breakout. Added a volatility percentile cap to avoid extreme spikes. - Replaced single ret_20d exit with a safer exit: stop on portfolio drawdown (< -12%) OR sustained 20d deterioration (< -8%), to reduce large drawdowns and whipsaws. - Tightened regime gating: only trade in UPTREND and avoid HIGH_VOLATILITY; restrict bubble to NORMAL to avoid overvalued regimes. - Added explicit volatility-based position scaling (LOW=1.0, MED=0.7, HIGH=0.4) and reduced base position to 0.8 to lower risk and turnover.
Lineage
entry = PriceMomentum_V0267 AND LongTermTrend_V0182
Strategy Logic (pseudocode)
# PriceMomentum_V0630 [hybrid]
require regime.trend in ['UPTREND']
require regime.volatility in ['LOW_VOLATILITY', 'MEDIUM_VOLATILITY']
require regime.bubble in ['NORMAL']
if flat and (ret_20d > 0.05 and sma_50_slope > 0.0 and (close > sma_50 or breakout_20 > 0.0) and macd_hist > 0.0 and vol_pctile < 0.75):
position = 0.8
if long and (drawdown < -0.12 or ret_20d < -0.08):
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.4Backtest Metrics
| Metric | Train | Validation | Hidden Test | Full |
|---|---|---|---|---|
| CAGR | 0.9% | 2.1% | 1.7% | 1.3% |
| Total Return | 7.3% | 6.6% | 6.4% | 21.7% |
| Sharpe | 0.14 | 0.27 | 0.23 | 0.19 |
| Sortino | 0.07 | 0.12 | 0.09 | 0.09 |
| Calmar | 0.06 | 0.10 | 0.14 | 0.06 |
| Volatility | 9.2% | 9.5% | 9.2% | 9.3% |
| Max DD | -15.5% | -21.5% | -12.2% | -22.8% |
| Win Rate | 45.5% | 31.3% | 50.0% | 43.7% |
| Avg Win | 2.0% | 5.7% | 3.0% | 2.9% |
| Avg Loss | -1.2% | -1.7% | -2.3% | -1.6% |
| Payoff | 1.67 | 3.30 | 1.29 | 1.78 |
| Expectancy | 0.2% | 0.6% | 0.3% | 0.4% |
| Profit Factor | 1.39 | 1.50 | 1.29 | 1.38 |
| Trades | 33 | 16 | 22 | 71 |
| Avg Holding Days | 5.8 | 3.8 | 2.8 | 4.5 |
| Turnover | 6.4 | 7.7 | 8.3 | 7.2 |
| Exposure | 6.0% | 4.2% | 3.2% | 4.9% |
Growth of $100
Walk-Forward Years
| Year | CAGR | Sharpe | Max DD | Trades |
|---|---|---|---|---|
| 2016 | -2.5% | -0.58 | -6.3% | 7 |
| 2017 | 4.9% | 1.36 | -0.9% | 8 |
| 2018 | -8.2% | -1.72 | -8.1% | 2 |
| 2019 | -0.9% | -1.07 | -0.9% | 1 |
| 2020 | 0.0% | 0.00 | 0.0% | 0 |
| 2021 | 22.7% | 1.41 | -9.6% | 10 |
| 2022 | -13.1% | -2.37 | -13.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 | 270 | 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 | -9.6% | -1.43 | 0% |
| hidden test | LOW VOLATILITY | 430 | 2.9% | 0.30 | 5% |
| hidden test | MEDIUM VOLATILITY | 250 | 12.6% | 1.21 | 2% |
| hidden test | NORMAL | 803 | -1.1% | -0.12 | 4% |
| hidden test | SIDEWAYS | 293 | -0.6% | -0.44 | 1% |
| hidden test | UPTREND | 371 | 5.7% | 0.39 | 8% |
| train | DOWNTREND | 518 | 0.0% | 0.00 | 0% |
| train | EXPENSIVE | 311 | 2.2% | 1.18 | 1% |
| train | EXTREME | 100 | 0.0% | 0.00 | 0% |
| train | HIGH VOLATILITY | 699 | 2.8% | 0.33 | 0% |
| train | LOW VOLATILITY | 745 | 5.1% | 0.45 | 13% |
| train | MEDIUM VOLATILITY | 568 | -5.5% | -0.77 | 4% |
| train | NORMAL | 1,601 | 1.2% | 0.12 | 7% |
| train | SIDEWAYS | 592 | -2.8% | -1.02 | 0% |
| train | UPTREND | 902 | 4.7% | 0.35 | 13% |
| 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 | -6.6% | -1.00 | 0% |
| validation | LOW VOLATILITY | 183 | 11.3% | 1.47 | 12% |
| validation | MEDIUM VOLATILITY | 315 | 5.0% | 0.42 | 3% |
| validation | NORMAL | 474 | 4.1% | 0.34 | 7% |
| validation | SIDEWAYS | 206 | -4.8% | -1.16 | 0% |
| validation | UPTREND | 425 | 6.9% | 0.56 | 7% |
Trades (full period)
| Entry | Exit | Entry Px | Exit Px | Return | Days | |
|---|---|---|---|---|---|---|
| 2026-05-29 | 2026-06-01 | $435.79 | $415.88 | -1.30% | 2 | |
| 2025-12-15 | 2026-01-13 | $475.31 | $447.20 | -1.81% | 20 | |
| 2025-09-12 | 2025-09-15 | $395.94 | $410.04 | 5.72% | 2 | |
| 2025-06-02 | 2025-06-03 | $342.69 | $344.27 | -0.72% | 2 | |
| 2025-05-27 | 2025-05-28 | $362.89 | $356.90 | 5.39% | 2 | |
| 2025-05-22 | 2025-05-23 | $341.04 | $339.34 | 0.96% | 2 | |
| 2024-10-03 | 2024-10-04 | $240.66 | $250.08 | -1.99% | 2 | |
| 2024-09-16 | 2024-09-17 | $226.78 | $227.87 | -0.96% | 2 | |
| 2024-09-06 | 2024-09-09 | $210.73 | $216.27 | -4.84% | 2 | |
| 2024-07-11 | 2024-07-12 | $241.03 | $248.23 | -4.84% | 2 | |
| 2024-07-09 | 2024-07-10 | $262.33 | $263.26 | 1.97% | 2 | |
| 2024-07-05 | 2024-07-08 | $251.52 | $252.94 | 1.05% | 2 | |
| 2024-07-02 | 2024-07-03 | $231.26 | $246.39 | 7.99% | 2 | |
| 2023-07-06 | 2023-07-07 | $276.54 | $274.43 | -1.29% | 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-08-18 | 2022-08-19 | $302.87 | $296.67 | -0.32% | 2 | |
| 2022-08-16 | 2022-08-17 | $306.56 | $304.00 | -0.61% | 2 | |
| 2022-08-05 | 2022-08-08 | $288.17 | $290.42 | -3.82% | 2 | |
| 2022-04-08 | 2022-04-11 | $341.83 | $325.31 | -1.79% | 2 | |
| 2022-04-05 | 2022-04-07 | $363.75 | $352.42 | -5.03% | 3 | |
| 2021-10-04 | 2021-11-10 | $260.51 | $355.98 | 25.39% | 28 | |
| 2021-09-28 | 2021-10-01 | $259.19 | $258.41 | -1.76% | 4 | |
| 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-10 | 2021-09-13 | $245.42 | $247.67 | -2.13% | 2 | |
| 2021-09-08 | 2021-09-09 | $251.29 | $251.62 | -0.06% | 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-10-21 | 2019-10-22 | $16.90 | $17.04 | -0.86% | 2 | |
| 2018-12-13 | 2018-12-19 | $25.12 | $22.20 | -4.07% | 5 | |
| 2018-02-01 | 2018-02-06 | $23.28 | $22.26 | -4.23% | 4 | |
| 2017-01-31 | 2017-02-02 | $16.80 | $16.77 | -0.60% | 3 | |
| 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 | |
| 2016-04-12 | 2016-04-13 | $16.52 | $16.97 | -0.58% | 2 | |
| 2016-04-05 | 2016-04-11 | $17.03 | $16.66 | 0.64% | 5 | |
| 2015-06-22 | 2015-08-07 | $17.32 | $16.17 | -1.71% | 34 | |
| 2015-05-21 | 2015-05-22 | $16.37 | $16.52 | 0.26% | 2 | |
| 2015-05-19 | 2015-05-20 | $16.48 | $16.29 | -0.68% | 2 | |
| 2015-05-15 | 2015-05-18 | $16.59 | $16.58 | 1.39% | 2 | |
| 2015-05-13 | 2015-05-14 | $16.21 | $16.27 | -0.67% | 2 | |
| 2015-05-11 | 2015-05-12 | $15.97 | $16.32 | 0.81% | 2 | |
| 2015-04-29 | 2015-04-30 | $15.50 | $15.07 | 0.52% | 2 | |
| 2014-08-05 | 2014-09-23 | $15.90 | $16.69 | 4.92% | 35 | |
| 2014-06-23 | 2014-07-08 | $15.81 | $14.60 | -2.54% | 11 | |
| 2013-03-27 | 2013-04-02 | $2.54 | $2.96 | 12.65% | 4 | |
| 2013-02-12 | 2013-02-14 | $2.53 | $2.55 | -0.10% | 3 | |
| 2012-11-29 | 2012-12-14 | $2.25 | $2.25 | 0.79% | 12 | |
| 2012-11-27 | 2012-11-28 | $2.14 | $2.22 | -0.46% | 2 | |
| 2012-11-23 | 2012-11-26 | $2.14 | $2.15 | -1.00% | 2 | |
| 2012-02-23 | 2012-04-10 | $2.30 | $2.16 | 0.83% | 33 |