PriceMomentum_V0718
ARCHIVEDhybridllm['Simplified and regularized entry: require moderate 20d momentum (>6%) plus either price above sma_50 or stronger 20d momentum (>8%), positive sma_50 slope, moderate volatility (vol_pctile < 0.75) and non-extreme RSI (<80). This reduces reliance on overfit large ret_20d thresholds and adds trend/volatility confirmation.', 'Improved exits: multi-condition exit (short intraday stop ret_1d<-3%, medium-term deterioration ret_20d<-8%, or MACD histogram turning negative) to cut losses and signals momentum reversal earlier.', 'Added stricter regime gates: only allow entries in UPTREND and non-high-volatility regimes and only in NORMAL bubble environment to reduce overfitting and avoid adverse regimes.', 'Introduced graduated position sizing by volatility (full size in low vol, reduced in medium/high) and bubble penalties (shrink/zero in EXPENSIVE/EXTREME) and lowered base_position to 0.9 to moderate exposures.']
Lineage
changed ret_20d threshold 0.05 -> 0.1275; changed sma_200_slope threshold 0.0 -> 0.001
Strategy Logic (pseudocode)
# PriceMomentum_V0718 [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.06 and (close > sma_50 or ret_20d > 0.08) and sma_50_slope > 0.0 and vol_pctile < 0.75 and rsi_14 < 80.0):
position = 0.9
if long and (ret_1d < -0.03 or ret_20d < -0.08 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.65
if regime.volatility == "HIGH_VOLATILITY": position *= 0.35
if regime.bubble == "EXPENSIVE": position *= 0.4
if regime.bubble == "EXTREME": position *= 0.0Backtest Metrics
| Metric | Train | Validation | Hidden Test | Full |
|---|---|---|---|---|
| CAGR | -0.9% | -1.0% | 7.7% | 1.2% |
| Total Return | -6.7% | -2.9% | 31.6% | 19.3% |
| Sharpe | -0.04 | -0.03 | 0.65 | 0.16 |
| Sortino | -0.02 | -0.02 | 0.29 | 0.08 |
| Calmar | -0.05 | -0.04 | 0.72 | 0.05 |
| Volatility | 9.5% | 11.1% | 12.6% | 10.7% |
| Max DD | -17.3% | -24.3% | -10.7% | -24.3% |
| Win Rate | 35.8% | 40.0% | 50.0% | 40.4% |
| Avg Win | 3.0% | 5.0% | 5.0% | 4.0% |
| Avg Loss | -1.8% | -3.1% | -2.6% | -2.2% |
| Payoff | 1.68 | 1.61 | 1.96 | 1.82 |
| Expectancy | -0.1% | 0.1% | 1.2% | 0.3% |
| Profit Factor | 0.94 | 1.07 | 1.96 | 1.23 |
| Trades | 53 | 20 | 26 | 99 |
| Avg Holding Days | 3.9 | 4.0 | 3.2 | 3.7 |
| Turnover | 11.1 | 9.7 | 11.4 | 10.9 |
| Exposure | 6.7% | 6.2% | 4.8% | 6.1% |
Growth of $100
Walk-Forward Years
| Year | CAGR | Sharpe | Max DD | Trades |
|---|---|---|---|---|
| 2016 | -3.0% | -0.48 | -7.1% | 9 |
| 2017 | 10.0% | 1.90 | -1.1% | 2 |
| 2018 | -5.9% | -1.30 | -5.9% | 3 |
| 2019 | -6.4% | -1.13 | -6.6% | 3 |
| 2020 | 0.0% | 0.00 | 0.0% | 0 |
| 2021 | 11.9% | 0.72 | -12.8% | 11 |
| 2022 | -13.3% | -1.82 | -15.1% | 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 | 271 | 0.0% | 0.00 | 0% |
| hidden test | EXPENSIVE | 83 | 38.1% | 2.44 | 2% |
| hidden test | EXTREME | 48 | 0.0% | 0.00 | 0% |
| hidden test | HIGH VOLATILITY | 254 | -5.7% | -0.70 | 1% |
| hidden test | LOW VOLATILITY | 431 | 12.0% | 1.01 | 7% |
| hidden test | MEDIUM VOLATILITY | 250 | 15.8% | 0.94 | 5% |
| hidden test | NORMAL | 804 | 5.6% | 0.44 | 5% |
| hidden test | SIDEWAYS | 293 | -0.4% | -0.27 | 1% |
| hidden test | UPTREND | 371 | 21.0% | 1.06 | 12% |
| train | DOWNTREND | 518 | 0.0% | 0.00 | 0% |
| train | EXPENSIVE | 311 | 2.6% | 1.18 | 1% |
| train | EXTREME | 100 | 0.0% | 0.00 | 0% |
| train | HIGH VOLATILITY | 699 | 5.1% | 0.60 | 0% |
| train | LOW VOLATILITY | 745 | -2.3% | -0.19 | 16% |
| train | MEDIUM VOLATILITY | 568 | -4.8% | -0.78 | 2% |
| train | NORMAL | 1,601 | -1.0% | -0.10 | 8% |
| train | SIDEWAYS | 592 | -3.3% | -1.04 | 0% |
| train | UPTREND | 902 | 1.2% | 0.09 | 15% |
| 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 | -4.8% | -0.66 | 0% |
| validation | LOW VOLATILITY | 183 | -2.1% | -0.18 | 19% |
| validation | MEDIUM VOLATILITY | 315 | 4.3% | 0.33 | 3% |
| validation | NORMAL | 474 | -0.6% | -0.04 | 10% |
| validation | SIDEWAYS | 206 | -9.5% | -1.61 | 1% |
| validation | UPTREND | 425 | 4.0% | 0.28 | 11% |
Trades (full period)
| Entry | Exit | Entry Px | Exit Px | Return | Days | |
|---|---|---|---|---|---|---|
| 2026-05-29 | 2026-06-01 | $435.79 | $415.88 | -1.46% | 2 | |
| 2025-12-19 | 2025-12-30 | $481.20 | $454.43 | -4.59% | 7 | |
| 2025-12-15 | 2025-12-18 | $475.31 | $483.37 | 1.47% | 4 | |
| 2025-09-12 | 2025-09-15 | $395.94 | $410.04 | 6.43% | 2 | |
| 2025-09-04 | 2025-09-05 | $338.53 | $350.84 | 1.02% | 2 | |
| 2025-06-04 | 2025-06-05 | $332.05 | $284.70 | -2.19% | 2 | |
| 2025-06-02 | 2025-06-03 | $342.69 | $344.27 | -0.75% | 2 | |
| 2025-05-22 | 2025-05-28 | $341.04 | $356.90 | 6.94% | 4 | |
| 2024-10-09 | 2024-10-10 | $241.05 | $238.77 | -1.45% | 2 | |
| 2024-10-07 | 2024-10-08 | $240.83 | $244.50 | -3.51% | 2 | |
| 2024-10-03 | 2024-10-04 | $240.66 | $250.08 | -2.08% | 2 | |
| 2024-09-16 | 2024-09-20 | $226.78 | $238.25 | 3.37% | 5 | |
| 2024-09-05 | 2024-09-09 | $230.17 | $216.27 | -2.33% | 3 | |
| 2024-07-02 | 2024-07-12 | $231.26 | $248.23 | 11.85% | 8 | |
| 2023-07-26 | 2023-07-27 | $264.35 | $255.71 | -0.50% | 2 | |
| 2023-07-20 | 2023-07-21 | $262.90 | $260.02 | -8.94% | 2 | |
| 2023-07-18 | 2023-07-19 | $293.34 | $291.26 | 0.74% | 2 | |
| 2023-07-14 | 2023-07-17 | $281.38 | $290.38 | 0.95% | 2 | |
| 2023-07-12 | 2023-07-13 | $271.99 | $277.90 | 0.55% | 2 | |
| 2023-07-10 | 2023-07-11 | $269.61 | $269.79 | -1.14% | 2 | |
| 2023-07-06 | 2023-07-07 | $276.54 | $274.43 | -1.35% | 2 | |
| 2023-07-03 | 2023-07-05 | $279.82 | $282.48 | 6.02% | 2 | |
| 2023-06-29 | 2023-06-30 | $257.50 | $261.77 | 0.26% | 2 | |
| 2023-06-27 | 2023-06-28 | $250.21 | $256.24 | 3.24% | 2 | |
| 2023-06-23 | 2023-06-26 | $256.60 | $241.05 | -2.90% | 2 | |
| 2023-06-02 | 2023-06-22 | $213.97 | $264.61 | 22.12% | 14 | |
| 2022-09-21 | 2022-09-23 | $300.80 | $275.33 | -6.05% | 3 | |
| 2022-08-16 | 2022-08-19 | $306.56 | $296.67 | -1.34% | 4 | |
| 2022-08-05 | 2022-08-08 | $288.17 | $290.42 | -3.99% | 2 | |
| 2022-04-19 | 2022-04-20 | $342.72 | $325.73 | 1.27% | 2 | |
| 2022-04-14 | 2022-04-18 | $328.33 | $334.76 | -2.25% | 2 | |
| 2022-04-12 | 2022-04-13 | $328.98 | $340.79 | 0.54% | 2 | |
| 2022-04-07 | 2022-04-11 | $352.42 | $325.31 | -1.24% | 3 | |
| 2022-04-05 | 2022-04-06 | $363.75 | $348.59 | -2.88% | 2 | |
| 2022-01-12 | 2022-01-13 | $368.74 | $343.85 | 2.18% | 2 | |
| 2021-11-26 | 2021-11-29 | $360.64 | $379.00 | -1.90% | 2 | |
| 2021-11-23 | 2021-11-24 | $369.68 | $372.00 | -2.53% | 2 | |
| 2021-11-09 | 2021-11-10 | $341.17 | $355.98 | -7.13% | 2 | |
| 2021-10-13 | 2021-11-03 | $270.36 | $404.62 | 34.35% | 16 | |
| 2021-10-11 | 2021-10-12 | $263.98 | $268.57 | 0.56% | 2 | |
| 2021-09-27 | 2021-10-07 | $263.79 | $264.54 | 0.80% | 9 | |
| 2021-09-23 | 2021-09-24 | $251.21 | $258.13 | 0.02% | 2 | |
| 2021-09-09 | 2021-09-21 | $251.62 | $246.46 | -3.00% | 9 | |
| 2021-08-26 | 2021-08-27 | $233.72 | $237.31 | -1.45% | 2 | |
| 2021-08-24 | 2021-08-25 | $236.16 | $237.07 | 0.10% | 2 | |
| 2021-08-05 | 2021-08-17 | $238.21 | $221.90 | -3.30% | 9 | |
| 2019-12-03 | 2019-12-04 | $22.41 | $22.20 | 0.18% | 2 | |
| 2019-11-22 | 2019-11-25 | $22.20 | $22.42 | -5.70% | 2 | |
| 2019-10-21 | 2019-10-22 | $16.90 | $17.04 | -0.90% | 2 | |
| 2018-12-13 | 2018-12-18 | $25.12 | $22.47 | -2.22% | 4 | |
| 2018-12-07 | 2018-12-10 | $23.86 | $24.34 | -0.94% | 2 | |
| 2018-02-01 | 2018-02-05 | $23.28 | $22.21 | -2.86% | 3 | |
| 2017-01-31 | 2017-02-02 | $16.80 | $16.77 | -0.68% | 3 | |
| 2017-01-05 | 2017-01-25 | $15.12 | $16.96 | 10.70% | 14 | |
| 2016-07-26 | 2016-08-09 | $15.30 | $15.27 | -1.68% | 11 | |
| 2016-04-29 | 2016-05-02 | $16.05 | $16.12 | -1.76% | 2 | |
| 2016-04-27 | 2016-04-28 | $16.76 | $16.51 | -0.64% | 2 | |
| 2016-04-25 | 2016-04-26 | $16.79 | $16.92 | -0.56% | 2 | |
| 2016-04-21 | 2016-04-22 | $16.55 | $16.92 | -0.51% | 2 | |
| 2016-04-19 | 2016-04-20 | $16.49 | $16.66 | -1.62% | 2 | |
| 2016-04-15 | 2016-04-18 | $16.97 | $16.93 | 0.50% | 2 | |
| 2016-04-11 | 2016-04-14 | $16.66 | $16.79 | 0.93% | 4 | |
| 2016-04-05 | 2016-04-08 | $17.03 | $16.67 | 2.32% | 4 | |
| 2015-07-21 | 2015-07-22 | $17.78 | $17.86 | -3.33% | 2 | |
| 2015-07-15 | 2015-07-16 | $17.54 | $17.78 | -1.03% | 2 | |
| 2015-06-19 | 2015-07-08 | $17.50 | $17.00 | 1.90% | 13 | |
| 2015-06-09 | 2015-06-10 | $17.07 | $16.71 | -0.28% | 2 | |
| 2015-06-05 | 2015-06-08 | $16.61 | $17.09 | 1.00% | 2 | |
| 2015-06-03 | 2015-06-04 | $16.60 | $16.39 | 0.05% | 2 | |
| 2015-06-01 | 2015-06-02 | $16.63 | $16.56 | -0.66% | 2 | |
| 2015-05-28 | 2015-05-29 | $16.76 | $16.72 | 1.28% | 2 | |
| 2015-05-26 | 2015-05-27 | $16.50 | $16.50 | -0.28% | 2 | |
| 2015-05-11 | 2015-05-22 | $15.97 | $16.52 | 3.24% | 10 | |
| 2015-04-29 | 2015-05-01 | $15.50 | $15.07 | -1.90% | 3 | |
| 2014-09-15 | 2014-09-16 | $16.92 | $17.38 | -8.34% | 2 | |
| 2014-09-09 | 2014-09-12 | $18.57 | $18.61 | -0.75% | 4 | |
| 2014-09-02 | 2014-09-08 | $18.94 | $18.81 | 2.40% | 5 | |
| 2014-08-28 | 2014-08-29 | $17.59 | $17.98 | 0.03% | 2 | |
| 2014-08-26 | 2014-08-27 | $17.45 | $17.55 | -0.46% | 2 | |
| 2014-08-05 | 2014-08-25 | $15.90 | $17.50 | 6.69% | 15 | |
| 2014-07-15 | 2014-07-16 | $14.64 | $14.48 | -3.00% | 2 | |
| 2014-07-11 | 2014-07-14 | $14.54 | $15.11 | -0.72% | 2 | |
| 2014-07-09 | 2014-07-10 | $14.87 | $14.63 | 1.46% | 2 | |
| 2014-07-07 | 2014-07-08 | $14.84 | $14.60 | -2.76% | 2 | |
| 2014-06-23 | 2014-07-03 | $15.81 | $15.28 | -0.22% | 9 | |
| 2013-03-26 | 2013-04-02 | $2.52 | $2.96 | 15.13% | 5 | |
| 2013-02-20 | 2013-02-21 | $2.57 | $2.34 | -1.87% | 2 | |
| 2013-02-15 | 2013-02-19 | $2.47 | $2.62 | -3.07% | 2 | |
| 2013-02-12 | 2013-02-14 | $2.53 | $2.55 | -0.11% | 3 | |
| 2012-12-26 | 2012-12-27 | $2.24 | $2.25 | -1.99% | 2 | |
| 2012-12-21 | 2012-12-24 | $2.27 | $2.29 | -1.30% | 2 | |
| 2012-12-18 | 2012-12-19 | $2.31 | $2.31 | 0.32% | 2 | |
| 2012-11-23 | 2012-12-14 | $2.14 | $2.25 | 2.99% | 16 | |
| 2012-03-27 | 2012-04-05 | $2.53 | $2.30 | -3.40% | 8 | |
| 2012-03-14 | 2012-03-16 | $2.35 | $2.35 | -2.90% | 3 | |
| 2012-03-12 | 2012-03-13 | $2.40 | $2.41 | 3.11% | 2 | |
| 2012-03-05 | 2012-03-06 | $2.25 | $2.21 | -0.89% | 2 | |
| 2012-03-01 | 2012-03-02 | $2.29 | $2.27 | 2.51% | 2 | |
| 2012-02-23 | 2012-02-29 | $2.30 | $2.23 | -1.25% | 5 |