PriceMomentum_V1181
ARCHIVEDhybridllm['Replaced redundant dual ret_20d checks with a clearer momentum + confirmation entry: ret_20d > 8%, macd_hist > 0, price above sma_50.', 'Tightened exits to include short-term stop (ret_1d < -5%), 20-day momentum failure (ret_20d < -8%), and price falling below sma_50 by >2% to limit drawdown.', 'Added regime gates to avoid extreme downtrends and high volatility: allow only UPTREND or SIDEWAYS and only LOW/MEDIUM volatility; exclude EXTREME bubble.', 'Introduced volatility-based position sizing: full size in LOW_VOLATILITY, reduced (0.70) in MEDIUM_VOLATILITY to mitigate risk.']
Lineage
entry = PriceMomentum_V0267 AND PriceMomentum_V0567
Strategy Logic (pseudocode)
# PriceMomentum_V1181 [hybrid]
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.08 and macd_hist > 0.0 and dist_sma_50 > 0.0):
position = 1.0
if long and (ret_20d < -0.08 or ret_1d < -0.05 or dist_sma_50 < -0.02):
position = 0.0 # exit to cash
if regime.volatility == "LOW_VOLATILITY": position *= 1.0
if regime.volatility == "MEDIUM_VOLATILITY": position *= 0.7Backtest Metrics
| Metric | Train | Validation | Hidden Test | Full |
|---|---|---|---|---|
| CAGR | 6.2% | 30.1% | -2.0% | 8.7% |
| Total Return | 61.6% | 120.2% | -7.4% | 239.3% |
| Sharpe | 0.40 | 1.32 | 0.00 | 0.51 |
| Sortino | 0.29 | 1.18 | 0.00 | 0.37 |
| Calmar | 0.13 | 1.16 | -0.05 | 0.18 |
| Volatility | 20.1% | 21.6% | 20.6% | 20.6% |
| Max DD | -48.0% | -26.0% | -41.6% | -48.0% |
| Win Rate | 45.5% | 50.0% | 28.6% | 42.1% |
| Avg Win | 10.7% | 24.5% | 19.1% | 15.6% |
| Avg Loss | -6.0% | -5.0% | -7.3% | -6.2% |
| Payoff | 1.80 | 4.88 | 2.61 | 2.51 |
| Expectancy | 1.6% | 9.7% | 0.2% | 3.0% |
| Profit Factor | 1.50 | 4.88 | 1.04 | 1.83 |
| Trades | 33 | 10 | 14 | 57 |
| Avg Holding Days | 15.4 | 21.7 | 13.7 | 16.3 |
| Turnover | 8.2 | 5.3 | 7.3 | 7.3 |
| Exposure | 22.7% | 23.2% | 17.5% | 21.5% |
Growth of $100
Walk-Forward Years
| Year | CAGR | Sharpe | Max DD | Trades |
|---|---|---|---|---|
| 2016 | -15.1% | -1.12 | -20.4% | 4 |
| 2017 | 8.8% | 0.57 | -15.9% | 9 |
| 2018 | -18.9% | -1.61 | -21.4% | 3 |
| 2019 | 2.7% | 0.23 | -22.2% | 3 |
| 2020 | 60.0% | 2.59 | -4.6% | 3 |
| 2021 | 63.5% | 1.92 | -15.3% | 4 |
| 2022 | -16.0% | -0.96 | -23.9% | 3 |
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 | -1.5% | -0.95 | 0% |
| hidden test | EXPENSIVE | 83 | 63.2% | 2.43 | 22% |
| hidden test | EXTREME | 48 | 0.0% | 0.00 | 0% |
| hidden test | HIGH VOLATILITY | 254 | -17.4% | -1.26 | 1% |
| hidden test | LOW VOLATILITY | 438 | 24.8% | 1.12 | 30% |
| hidden test | MEDIUM VOLATILITY | 250 | -25.5% | -1.10 | 13% |
| hidden test | NORMAL | 811 | -6.4% | -0.31 | 18% |
| hidden test | SIDEWAYS | 293 | -19.6% | -0.95 | 26% |
| hidden test | UPTREND | 371 | 16.8% | 0.62 | 24% |
| train | DOWNTREND | 518 | -6.6% | -1.26 | 1% |
| train | EXPENSIVE | 311 | 38.0% | 1.69 | 28% |
| train | EXTREME | 100 | 8.1% | 1.55 | 1% |
| train | HIGH VOLATILITY | 699 | 7.5% | 0.40 | 1% |
| train | LOW VOLATILITY | 745 | 29.7% | 1.29 | 51% |
| train | MEDIUM VOLATILITY | 568 | -19.8% | -1.16 | 12% |
| train | NORMAL | 1,601 | 2.2% | 0.11 | 23% |
| train | SIDEWAYS | 592 | -16.6% | -0.89 | 17% |
| train | UPTREND | 902 | 32.6% | 1.27 | 39% |
| validation | DOWNTREND | 125 | 0.0% | 0.00 | 0% |
| validation | EXPENSIVE | 138 | 83.3% | 3.16 | 25% |
| validation | EXTREME | 144 | 26.9% | 2.28 | 1% |
| validation | HIGH VOLATILITY | 258 | -8.3% | -1.00 | 0% |
| validation | LOW VOLATILITY | 183 | 48.3% | 2.10 | 55% |
| validation | MEDIUM VOLATILITY | 315 | 47.4% | 1.73 | 24% |
| validation | NORMAL | 474 | 13.2% | 0.59 | 29% |
| validation | SIDEWAYS | 206 | -11.2% | -0.53 | 29% |
| validation | UPTREND | 425 | 56.4% | 2.28 | 27% |
Trades (full period)
| Entry | Exit | Entry Px | Exit Px | Return | Days | |
|---|---|---|---|---|---|---|
| 2026-05-08 | 2026-06-08 | $428.35 | $408.95 | -5.23% | 21 | |
| 2025-12-15 | 2026-01-07 | $475.31 | $431.41 | -5.85% | 16 | |
| 2025-08-27 | 2025-10-03 | $349.60 | $429.83 | 21.99% | 27 | |
| 2025-08-13 | 2025-08-21 | $339.38 | $320.11 | -5.16% | 7 | |
| 2025-05-19 | 2025-06-06 | $342.09 | $295.14 | -12.57% | 14 | |
| 2025-05-12 | 2025-05-13 | $318.38 | $334.07 | 4.58% | 2 | |
| 2024-09-23 | 2024-10-14 | $250.00 | $219.16 | -10.01% | 16 | |
| 2024-09-06 | 2024-09-09 | $210.73 | $216.27 | -6.05% | 2 | |
| 2024-06-27 | 2024-07-12 | $197.42 | $248.23 | 21.16% | 11 | |
| 2023-11-22 | 2024-01-12 | $234.21 | $218.89 | -5.99% | 35 | |
| 2023-09-12 | 2023-09-25 | $267.48 | $246.99 | -7.55% | 10 | |
| 2023-07-06 | 2023-07-21 | $276.54 | $260.02 | -5.82% | 12 | |
| 2023-06-23 | 2023-06-27 | $256.60 | $250.21 | -9.09% | 3 | |
| 2023-05-31 | 2023-06-22 | $203.93 | $264.61 | 28.73% | 16 | |
| 2022-08-09 | 2022-09-01 | $283.33 | $277.16 | -6.42% | 18 | |
| 2022-08-02 | 2022-08-08 | $300.59 | $290.42 | -2.24% | 5 | |
| 2022-03-23 | 2022-04-27 | $333.04 | $293.84 | -8.16% | 25 | |
| 2021-06-24 | 2021-11-10 | $226.61 | $355.98 | 56.15% | 98 | |
| 2021-04-15 | 2021-05-07 | $246.28 | $224.12 | -6.69% | 17 | |
| 2021-01-12 | 2021-02-01 | $283.15 | $279.94 | -1.57% | 14 | |
| 2021-01-05 | 2021-01-11 | $245.04 | $270.40 | 13.99% | 5 | |
| 2020-12-10 | 2020-12-22 | $209.02 | $213.45 | 5.22% | 9 | |
| 2020-11-19 | 2020-12-08 | $166.42 | $216.63 | 21.45% | 13 | |
| 2019-12-17 | 2020-01-22 | $25.27 | $37.97 | 41.47% | 24 | |
| 2019-10-23 | 2019-10-25 | $16.98 | $21.88 | 17.02% | 3 | |
| 2019-09-13 | 2019-09-25 | $16.35 | $15.25 | -9.40% | 9 | |
| 2019-07-22 | 2019-07-26 | $17.05 | $15.20 | -11.55% | 5 | |
| 2018-12-13 | 2018-12-21 | $25.12 | $21.32 | -9.36% | 7 | |
| 2018-03-14 | 2018-03-15 | $21.78 | $21.71 | -3.25% | 2 | |
| 2018-01-29 | 2018-02-09 | $23.30 | $20.69 | -7.49% | 10 | |
| 2017-12-12 | 2017-12-26 | $22.74 | $21.15 | -2.07% | 10 | |
| 2017-09-19 | 2017-09-28 | $25.01 | $22.64 | -9.49% | 8 | |
| 2017-08-15 | 2017-08-18 | $24.16 | $23.16 | -2.42% | 4 | |
| 2017-08-04 | 2017-08-07 | $23.79 | $23.68 | 1.84% | 2 | |
| 2017-06-05 | 2017-06-14 | $23.15 | $25.38 | 6.94% | 8 | |
| 2017-05-02 | 2017-05-05 | $21.26 | $20.56 | -8.32% | 4 | |
| 2017-04-20 | 2017-04-21 | $20.17 | $20.37 | -0.83% | 2 | |
| 2017-03-28 | 2017-04-04 | $18.50 | $20.25 | 7.92% | 6 | |
| 2016-12-28 | 2017-02-24 | $14.65 | $17.13 | 16.34% | 40 | |
| 2016-07-22 | 2016-08-30 | $14.82 | $14.09 | -2.60% | 28 | |
| 2016-06-08 | 2016-06-13 | $15.70 | $14.52 | -6.02% | 4 | |
| 2016-03-28 | 2016-05-04 | $15.35 | $14.84 | 0.68% | 28 | |
| 2016-03-21 | 2016-03-24 | $15.89 | $15.18 | -5.23% | 4 | |
| 2015-09-22 | 2015-10-02 | $17.40 | $16.50 | -8.62% | 9 | |
| 2015-04-28 | 2015-07-22 | $15.37 | $17.86 | 16.98% | 60 | |
| 2015-04-14 | 2015-04-21 | $13.83 | $13.96 | -2.35% | 6 | |
| 2014-11-12 | 2014-12-02 | $16.61 | $15.43 | -7.56% | 14 | |
| 2014-06-09 | 2014-09-16 | $13.69 | $17.38 | 21.70% | 70 | |
| 2014-02-13 | 2014-02-26 | $13.31 | $16.87 | 17.45% | 9 | |
| 2014-01-08 | 2014-01-14 | $10.09 | $10.75 | -6.89% | 5 | |
| 2013-09-09 | 2013-10-03 | $10.71 | $11.55 | 8.15% | 19 | |
| 2013-03-27 | 2013-04-02 | $2.54 | $2.96 | 15.80% | 4 | |
| 2012-11-09 | 2013-02-22 | $2.02 | $2.41 | 12.07% | 71 | |
| 2012-09-18 | 2012-09-21 | $2.09 | $2.00 | -3.68% | 4 | |
| 2012-07-02 | 2012-07-18 | $2.03 | $2.14 | 5.65% | 12 | |
| 2012-06-19 | 2012-06-25 | $2.14 | $2.21 | 4.18% | 5 | |
| 2012-02-15 | 2012-04-05 | $2.24 | $2.30 | 8.02% | 36 |