LongTermTrend_V1119
ARCHIVEDhybridllmTightened momentum filter and added volatility and SMA alignment; strengthened exit rules and reduced base size. - tightened macd_hist requirement to > 0 to force positive momentum - added vol_pctile < 0.9 to avoid extreme volatility entries - require sma_20 > sma_50 (short-term trend confirmation) while keeping close > sma_20 - replaced weak single-day exit with multi-condition exit: 20d loss < -6% OR drawdown > 12% OR close crossing below sma_50 - set regime gate to UPTREND and MEDIUM_VOLATILITY to avoid bad market regimes - reduced base_position from 1.0 to 0.6 to lower exposure and drawdown risk
Lineage
entry from LongTermTrend_V1037, exit from PriceMomentum_V0690
Strategy Logic (pseudocode)
# LongTermTrend_V1119 [hybrid]
if flat and (((((close > sma_200 and sma_200_slope > -0.0024) or ret_20d > 0.085) and ret_20d > 0.05 and cumret_252d > 0.2692 and dist_sma_50 > -0.0774) 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 macd_hist > 0.0 and vol_pctile < 0.9 and sma_20 > sma_50):
position = 0.6
if long and (ret_20d < -0.06 or drawdown > 0.12 or close < sma_50):
position = 0.0 # exit to cashBacktest Metrics
| Metric | Train | Validation | Hidden Test | Full |
|---|---|---|---|---|
| CAGR | 18.3% | 40.4% | 3.7% | 18.6% |
| Total Return | 282.7% | 176.9% | 14.6% | 1136.1% |
| Sharpe | 0.98 | 1.32 | 0.29 | 0.91 |
| Sortino | 0.99 | 1.34 | 0.25 | 0.86 |
| Calmar | 0.81 | 1.91 | 0.19 | 0.82 |
| Volatility | 18.9% | 28.9% | 18.9% | 21.3% |
| Max DD | -22.7% | -21.2% | -19.9% | -22.7% |
| Win Rate | 43.3% | 50.0% | 35.3% | 42.4% |
| Avg Win | 14.1% | 26.6% | 8.7% | 18.1% |
| Avg Loss | -3.0% | -5.6% | -3.0% | -3.4% |
| Payoff | 4.73 | 4.76 | 2.92 | 5.28 |
| Expectancy | 4.4% | 10.5% | 1.1% | 5.7% |
| Profit Factor | 3.62 | 4.76 | 1.59 | 3.88 |
| Trades | 30 | 12 | 17 | 59 |
| Avg Holding Days | 25.8 | 32.1 | 18.6 | 26.0 |
| Turnover | 4.6 | 4.8 | 5.6 | 4.9 |
| Exposure | 23.9% | 29.6% | 20.0% | 24.1% |
Growth of $100
Walk-Forward Years
| Year | CAGR | Sharpe | Max DD | Trades |
|---|---|---|---|---|
| 2016 | 2.8% | 0.35 | -10.2% | 2 |
| 2017 | 12.5% | 0.85 | -12.1% | 5 |
| 2018 | -8.3% | -0.48 | -14.3% | 4 |
| 2019 | 33.0% | 1.65 | -11.2% | 2 |
| 2020 | 137.1% | 2.28 | -21.2% | 5 |
| 2021 | 28.7% | 1.29 | -15.7% | 4 |
| 2022 | -11.5% | -0.67 | -14.6% | 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 | 277 | 0.2% | 0.02 | 5% |
| hidden test | EXPENSIVE | 83 | 37.5% | 1.44 | 40% |
| hidden test | EXTREME | 48 | 96.5% | 3.03 | 39% |
| hidden test | HIGH VOLATILITY | 254 | -4.3% | -0.19 | 16% |
| hidden test | LOW VOLATILITY | 436 | 25.0% | 1.78 | 21% |
| hidden test | MEDIUM VOLATILITY | 251 | -18.7% | -0.85 | 23% |
| hidden test | NORMAL | 810 | -3.2% | -0.19 | 17% |
| hidden test | SIDEWAYS | 293 | -4.7% | -0.26 | 22% |
| hidden test | UPTREND | 371 | 17.4% | 0.70 | 30% |
| train | DOWNTREND | 518 | -0.9% | -0.13 | 4% |
| train | EXPENSIVE | 311 | 37.1% | 1.60 | 40% |
| train | EXTREME | 100 | 228.2% | 5.23 | 58% |
| train | HIGH VOLATILITY | 699 | 37.4% | 1.54 | 20% |
| train | LOW VOLATILITY | 745 | 24.8% | 1.70 | 31% |
| train | MEDIUM VOLATILITY | 568 | -12.7% | -0.80 | 19% |
| train | NORMAL | 1,601 | 1.9% | 0.13 | 19% |
| train | SIDEWAYS | 592 | 1.7% | 0.13 | 13% |
| train | UPTREND | 902 | 40.8% | 1.60 | 43% |
| validation | DOWNTREND | 125 | 23.1% | 2.00 | 3% |
| validation | EXPENSIVE | 138 | 6.5% | 0.20 | 38% |
| validation | EXTREME | 144 | 176.0% | 3.71 | 51% |
| validation | HIGH VOLATILITY | 258 | 47.9% | 1.27 | 23% |
| validation | LOW VOLATILITY | 183 | 3.9% | 0.24 | 38% |
| validation | MEDIUM VOLATILITY | 315 | 50.0% | 1.92 | 30% |
| validation | NORMAL | 474 | 5.4% | 0.31 | 21% |
| validation | SIDEWAYS | 206 | -29.2% | -1.70 | 17% |
| validation | UPTREND | 425 | 75.2% | 2.10 | 44% |
Trades (full period)
| Entry | Exit | Entry Px | Exit Px | Return | Days | |
|---|---|---|---|---|---|---|
| 2026-09-14 | — | $358.97 | — | -1.88% | 15 | OPEN |
| 2026-05-11 | 2026-06-08 | $445.00 | $408.95 | -5.26% | 20 | |
| 2025-12-18 | 2026-01-05 | $483.37 | $451.67 | -3.87% | 11 | |
| 2025-08-25 | 2025-11-14 | $346.60 | $404.35 | 11.23% | 59 | |
| 2025-08-12 | 2025-08-22 | $340.84 | $340.01 | -3.49% | 9 | |
| 2025-06-25 | 2025-06-26 | $327.55 | $325.78 | -2.40% | 2 | |
| 2025-05-09 | 2025-06-06 | $298.26 | $295.14 | 0.38% | 20 | |
| 2024-11-22 | 2025-01-17 | $352.56 | $426.50 | 13.27% | 37 | |
| 2024-09-24 | 2024-10-14 | $254.27 | $219.16 | -7.88% | 15 | |
| 2024-06-17 | 2024-08-02 | $187.44 | $207.67 | 13.37% | 33 | |
| 2024-05-17 | 2024-05-29 | $177.46 | $176.19 | 0.63% | 8 | |
| 2023-12-08 | 2024-01-10 | $243.84 | $233.94 | -1.91% | 22 | |
| 2023-10-06 | 2023-10-13 | $260.53 | $251.12 | -0.39% | 6 | |
| 2023-09-21 | 2023-09-22 | $255.70 | $244.88 | -1.69% | 2 | |
| 2023-06-05 | 2023-08-02 | $217.61 | $254.11 | 13.12% | 41 | |
| 2023-03-29 | 2023-04-06 | $193.88 | $185.06 | -1.17% | 7 | |
| 2023-03-24 | 2023-03-28 | $190.41 | $189.19 | -0.25% | 3 | |
| 2023-02-08 | 2023-03-09 | $201.29 | $172.92 | -4.37% | 21 | |
| 2022-09-13 | 2022-09-26 | $292.13 | $276.01 | -5.87% | 10 | |
| 2022-07-21 | 2022-08-31 | $271.71 | $275.61 | 7.44% | 30 | |
| 2022-03-30 | 2022-04-27 | $364.66 | $293.84 | -12.46% | 20 | |
| 2021-08-02 | 2021-12-02 | $236.56 | $361.53 | 33.35% | 87 | |
| 2021-07-06 | 2021-07-28 | $219.86 | $215.66 | -3.09% | 17 | |
| 2021-04-27 | 2021-04-30 | $234.91 | $236.48 | -5.14% | 4 | |
| 2020-11-24 | 2021-02-19 | $185.13 | $260.43 | 29.03% | 59 | |
| 2020-11-09 | 2020-11-10 | $140.42 | $136.79 | -1.33% | 2 | |
| 2020-10-14 | 2020-10-29 | $153.77 | $136.94 | -5.61% | 12 | |
| 2020-08-18 | 2020-09-24 | $125.81 | $129.26 | 3.84% | 27 | |
| 2020-04-29 | 2020-08-12 | $53.37 | $103.65 | 43.76% | 74 | |
| 2019-10-11 | 2020-03-05 | $16.53 | $48.30 | 100.94% | 100 | |
| 2019-10-02 | 2019-10-07 | $16.21 | $15.85 | -3.38% | 4 | |
| 2019-07-08 | 2019-08-13 | $15.36 | $15.67 | -0.80% | 27 | |
| 2018-11-06 | 2018-12-21 | $22.74 | $21.32 | -4.51% | 32 | |
| 2018-06-05 | 2018-07-06 | $19.41 | $20.59 | 2.72% | 23 | |
| 2018-03-14 | 2018-03-15 | $21.78 | $21.71 | -2.79% | 2 | |
| 2018-01-09 | 2018-02-09 | $22.25 | $20.69 | -3.78% | 23 | |
| 2017-10-13 | 2017-10-16 | $23.70 | $23.37 | -0.14% | 2 | |
| 2017-09-12 | 2017-09-26 | $24.18 | $23.02 | -3.18% | 11 | |
| 2017-04-03 | 2017-07-06 | $19.90 | $20.59 | 10.59% | 66 | |
| 2017-03-17 | 2017-03-22 | $17.43 | $17.00 | -2.72% | 4 | |
| 2016-12-22 | 2017-03-09 | $13.90 | $16.33 | 11.05% | 52 | |
| 2016-07-26 | 2016-08-29 | $15.30 | $14.35 | -2.72% | 25 | |
| 2016-03-16 | 2016-05-04 | $14.80 | $14.84 | 3.90% | 35 | |
| 2015-12-18 | 2016-01-05 | $15.36 | $14.90 | -2.62% | 11 | |
| 2015-12-10 | 2015-12-14 | $15.14 | $14.57 | -2.11% | 3 | |
| 2015-09-28 | 2015-09-29 | $16.56 | $16.44 | -2.10% | 2 | |
| 2015-04-23 | 2015-07-28 | $14.57 | $17.65 | 9.12% | 67 | |
| 2015-02-23 | 2015-02-24 | $13.82 | $13.61 | -2.82% | 2 | |
| 2014-11-25 | 2014-12-02 | $16.54 | $15.43 | -3.79% | 5 | |
| 2014-07-31 | 2014-09-23 | $14.89 | $16.69 | 5.62% | 38 | |
| 2014-06-16 | 2014-07-17 | $14.97 | $14.36 | 3.18% | 23 | |
| 2014-01-15 | 2014-03-26 | $10.94 | $14.20 | 21.29% | 49 | |
| 2014-01-02 | 2014-01-14 | $10.01 | $10.75 | -4.57% | 9 | |
| 2013-07-02 | 2013-10-24 | $7.85 | $11.54 | 24.02% | 81 | |
| 2013-04-01 | 2013-06-26 | $2.93 | $7.05 | 85.52% | 62 | |
| 2013-03-08 | 2013-03-18 | $2.56 | $2.34 | -4.74% | 7 | |
| 2013-01-23 | 2013-02-22 | $2.40 | $2.41 | 0.05% | 22 | |
| 2012-11-14 | 2013-01-14 | $2.09 | $2.22 | 2.48% | 41 | |
| 2012-07-13 | 2012-07-24 | $2.28 | $1.99 | -3.75% | 8 | |
| 2012-02-14 | 2012-04-10 | $2.21 | $2.16 | 3.39% | 39 |