PriceMomentum_V1713
ARCHIVEDhybridllmAdded regime gates to restrict trading to uptrends and non-bubble environments; tightened position sizing by lowering base_position and adding scaled sizes for LOW/MEDIUM volatility; added momentum (macd_hist) and volatility-percentile confirmation to the main entry leg; added a breakout+momentum alternate entry; replaced the single weak exit with a composite exit: larger fixed 20-day stop, a SMA50 trend exit, and a drawdown-based exit to curb large losses. These structural changes aim to reduce overfitting and drawdown while keeping rules simple.
Lineage
entry from PriceMomentum_V1405, exit from PriceMomentum_V1021
Strategy Logic (pseudocode)
# PriceMomentum_V1713 [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 (((close > sma_200 and sma_200_slope > 0.0) or ret_20d > 0.0923) and ret_20d > -0.1275 and cumret_252d > -0.0062 and macd_hist > 0.0 and vol_pctile < 0.8)) or ret_20d > 0.184 or (breakout_20 > 0.0 and macd_hist > 0.0 and ret_5d > 0.02)):
position = 0.8
if long and (ret_20d < -0.02 or close < sma_50 or drawdown > 0.12):
position = 0.0 # exit to cash
if regime.volatility == "LOW_VOLATILITY": position *= 1.0
if regime.volatility == "MEDIUM_VOLATILITY": position *= 0.65Backtest Metrics
| Metric | Train | Validation | Hidden Test | Full |
|---|---|---|---|---|
| CAGR | 3.6% | 1.2% | 2.9% | 3.0% |
| Total Return | 32.9% | 3.7% | 11.5% | 53.6% |
| Sharpe | 0.41 | 0.16 | 0.28 | 0.32 |
| Sortino | 0.23 | 0.07 | 0.12 | 0.15 |
| Calmar | 0.28 | 0.05 | 0.14 | 0.12 |
| Volatility | 9.9% | 11.2% | 13.3% | 11.1% |
| Max DD | -13.1% | -25.6% | -20.9% | -25.6% |
| Win Rate | 52.9% | 20.0% | 50.0% | 47.1% |
| Avg Win | 5.4% | 31.5% | 8.0% | 8.0% |
| Avg Loss | -2.3% | -5.7% | -5.5% | -4.1% |
| Payoff | 2.39 | 5.54 | 1.46 | 1.96 |
| Expectancy | 1.8% | 1.8% | 1.3% | 1.6% |
| Profit Factor | 2.68 | 1.39 | 1.46 | 1.74 |
| Trades | 17 | 5 | 12 | 34 |
| Avg Holding Days | 14.8 | 17.4 | 8.4 | 12.9 |
| Turnover | 3.4 | 2.3 | 4.6 | 3.5 |
| Exposure | 8.8% | 7.6% | 6.6% | 8.0% |
Growth of $100
Walk-Forward Years
| Year | CAGR | Sharpe | Max DD | Trades |
|---|---|---|---|---|
| 2016 | -3.1% | -0.49 | -6.7% | 3 |
| 2017 | 9.7% | 2.04 | -0.9% | 2 |
| 2018 | -7.4% | -1.63 | -7.4% | 2 |
| 2019 | 5.9% | 0.73 | -5.9% | 1 |
| 2020 | 0.0% | 0.00 | 0.0% | 0 |
| 2021 | 26.8% | 1.50 | -8.9% | 2 |
| 2022 | -18.3% | -2.03 | -18.2% | 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 | 279 | 0.0% | 0.00 | 0% |
| hidden test | EXPENSIVE | 83 | 33.9% | 2.44 | 2% |
| hidden test | EXTREME | 48 | 0.0% | 0.00 | 0% |
| hidden test | HIGH VOLATILITY | 254 | -16.4% | -1.48 | 1% |
| hidden test | LOW VOLATILITY | 445 | 10.4% | 0.84 | 10% |
| hidden test | MEDIUM VOLATILITY | 251 | 12.6% | 0.75 | 6% |
| hidden test | NORMAL | 819 | 0.9% | 0.07 | 7% |
| hidden test | SIDEWAYS | 300 | -11.2% | -1.44 | 1% |
| hidden test | UPTREND | 371 | 18.7% | 0.93 | 16% |
| train | DOWNTREND | 518 | 0.0% | 0.00 | 0% |
| train | EXPENSIVE | 311 | 7.0% | 1.38 | 1% |
| train | EXTREME | 100 | 0.0% | 0.00 | 0% |
| train | HIGH VOLATILITY | 699 | 4.6% | 0.60 | 0% |
| train | LOW VOLATILITY | 745 | 11.7% | 0.87 | 21% |
| train | MEDIUM VOLATILITY | 568 | -6.6% | -1.02 | 3% |
| train | NORMAL | 1,601 | 3.7% | 0.34 | 11% |
| train | SIDEWAYS | 592 | -3.4% | -1.07 | 1% |
| train | UPTREND | 902 | 11.3% | 0.77 | 19% |
| 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.1% | -1.00 | 0% |
| validation | LOW VOLATILITY | 183 | 17.1% | 1.44 | 23% |
| validation | MEDIUM VOLATILITY | 315 | -0.5% | -0.04 | 5% |
| validation | NORMAL | 474 | 2.9% | 0.21 | 12% |
| validation | SIDEWAYS | 206 | -13.3% | -1.61 | 1% |
| validation | UPTREND | 425 | 9.7% | 0.70 | 13% |
Trades (full period)
| Entry | Exit | Entry Px | Exit Px | Return | Days | |
|---|---|---|---|---|---|---|
| 2026-07-02 | 2026-07-06 | $393.45 | $419.77 | -4.00% | 2 | |
| 2026-05-29 | 2026-06-01 | $435.79 | $415.88 | -1.30% | 2 | |
| 2025-12-08 | 2026-01-05 | $439.58 | $451.67 | -3.06% | 19 | |
| 2025-09-12 | 2025-09-15 | $395.94 | $410.04 | 5.72% | 2 | |
| 2025-06-02 | 2025-06-06 | $342.69 | $295.14 | -9.52% | 5 | |
| 2025-05-22 | 2025-05-28 | $341.04 | $356.90 | 6.16% | 4 | |
| 2024-10-07 | 2024-10-14 | $240.83 | $219.16 | -10.54% | 6 | |
| 2024-09-24 | 2024-09-27 | $254.27 | $260.46 | 0.78% | 4 | |
| 2024-09-16 | 2024-09-20 | $226.78 | $238.25 | 3.00% | 5 | |
| 2024-09-06 | 2024-09-09 | $210.73 | $216.27 | -4.49% | 2 | |
| 2024-07-02 | 2024-07-12 | $231.26 | $248.23 | 10.53% | 8 | |
| 2023-06-02 | 2023-08-02 | $213.97 | $254.11 | 21.89% | 42 | |
| 2022-08-16 | 2022-08-22 | $306.56 | $289.91 | -2.86% | 5 | |
| 2022-08-05 | 2022-08-08 | $288.17 | $290.42 | -3.55% | 2 | |
| 2022-04-05 | 2022-04-27 | $363.75 | $293.84 | -12.74% | 16 | |
| 2021-08-31 | 2021-11-10 | $245.24 | $355.98 | 31.50% | 51 | |
| 2021-08-05 | 2021-08-23 | $238.21 | $235.43 | -3.57% | 13 | |
| 2019-11-22 | 2019-12-17 | $22.20 | $25.27 | 5.89% | 17 | |
| 2018-12-11 | 2018-12-19 | $24.45 | $22.20 | -3.44% | 7 | |
| 2018-02-01 | 2018-02-06 | $23.28 | $22.26 | -4.11% | 4 | |
| 2017-01-31 | 2017-02-03 | $16.80 | $16.76 | 0.14% | 4 | |
| 2017-01-05 | 2017-01-25 | $15.12 | $16.96 | 9.47% | 14 | |
| 2016-07-26 | 2016-08-18 | $15.30 | $14.90 | -2.50% | 18 | |
| 2016-06-08 | 2016-06-09 | $15.70 | $15.29 | 0.93% | 2 | |
| 2016-04-05 | 2016-05-03 | $17.03 | $15.49 | -1.58% | 21 | |
| 2015-05-11 | 2015-07-28 | $15.97 | $17.65 | 8.82% | 55 | |
| 2015-04-29 | 2015-05-01 | $15.50 | $15.07 | -1.69% | 3 | |
| 2014-08-04 | 2014-09-16 | $15.90 | $17.38 | 7.00% | 31 | |
| 2014-06-23 | 2014-07-16 | $15.81 | $14.48 | -3.59% | 17 | |
| 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-23 | 2012-12-14 | $2.14 | $2.25 | 2.68% | 16 | |
| 2012-02-23 | 2012-04-10 | $2.30 | $2.16 | 1.39% | 33 | |
| 2012-02-21 | 2012-02-22 | $2.30 | $2.28 | -1.23% | 2 |