LongTermTrend_V1602
ARCHIVEDhybridllmSimplified and regularized the entry to robust trend+momentum signals: require price breakout or being above 50/200 SMA with positive slopes, plus positive MACD histogram and modest 20d momentum. Added multi-condition exit (20d loss, price drop below SMA50, or MACD turn negative) for more reliable cutoffs. Introduced regime gates to trade only in UPTREND and non-high volatility periods and avoid bubble extremes. Added position scaling: reduce size in high volatility and force cash on short sharp 20d losses. Lowered base position to 0.7 to reduce risk/exposure and combat overfitting.
Lineage
entry from LongTermTrend_V1383, exit from PriceMomentum_V0690
Strategy Logic (pseudocode)
# LongTermTrend_V1602 [hybrid]
require regime.trend in ['UPTREND']
require regime.volatility in ['LOW_VOLATILITY', 'MEDIUM_VOLATILITY']
require regime.bubble in ['NORMAL']
if flat and (((close > sma_50 and sma_50_slope > 0.0) or (close > sma_200 and sma_200_slope > 0.0) or breakout_20 > 0.5) and macd_hist > 0.0 and ret_20d > 0.03):
position = 0.7
if long and (ret_20d < -0.03 or close < sma_50 or macd_hist < 0.0):
position = 0.0 # exit to cashBacktest Metrics
| Metric | Train | Validation | Hidden Test | Full |
|---|---|---|---|---|
| CAGR | 0.9% | -2.3% | 6.9% | 1.7% |
| Total Return | 7.5% | -6.9% | 28.8% | 28.9% |
| Sharpe | 0.16 | -0.17 | 0.72 | 0.24 |
| Sortino | 0.07 | -0.07 | 0.27 | 0.10 |
| Calmar | 0.09 | -0.09 | 0.55 | 0.06 |
| Volatility | 7.1% | 10.5% | 9.9% | 8.7% |
| Max DD | -10.3% | -27.4% | -12.7% | -27.4% |
| Win Rate | 36.4% | 11.1% | 58.3% | 37.2% |
| Avg Win | 4.4% | 18.7% | 5.6% | 5.8% |
| Avg Loss | -1.9% | -3.0% | -2.4% | -2.3% |
| Payoff | 2.34 | 6.32 | 2.30 | 2.53 |
| Expectancy | 0.4% | -0.6% | 2.2% | 0.7% |
| Profit Factor | 1.34 | 0.79 | 3.21 | 1.50 |
| Trades | 22 | 9 | 12 | 43 |
| Avg Holding Days | 6.9 | 7.7 | 5.2 | 6.6 |
| Turnover | 3.9 | 4.2 | 4.5 | 4.1 |
| Exposure | 4.5% | 5.6% | 3.7% | 4.5% |
Growth of $100
Walk-Forward Years
| Year | CAGR | Sharpe | Max DD | Trades |
|---|---|---|---|---|
| 2016 | 1.5% | 0.29 | -4.7% | 3 |
| 2017 | 7.7% | 1.90 | -0.8% | 2 |
| 2018 | -5.5% | -1.20 | -5.5% | 2 |
| 2019 | -1.1% | -1.07 | -1.1% | 1 |
| 2020 | 0.0% | 0.00 | 0.0% | 0 |
| 2021 | 12.9% | 0.81 | -12.0% | 5 |
| 2022 | -17.6% | -2.49 | -17.5% | 4 |
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 | 0.0% | 0.00 | 0% |
| hidden test | EXPENSIVE | 83 | 29.7% | 2.44 | 2% |
| hidden test | EXTREME | 48 | 0.0% | 0.00 | 0% |
| hidden test | HIGH VOLATILITY | 254 | -6.8% | -0.69 | 1% |
| hidden test | LOW VOLATILITY | 445 | 9.4% | 1.00 | 5% |
| hidden test | MEDIUM VOLATILITY | 250 | 17.6% | 1.62 | 5% |
| hidden test | NORMAL | 818 | 5.3% | 0.54 | 4% |
| hidden test | SIDEWAYS | 300 | -1.7% | -1.38 | 0% |
| hidden test | UPTREND | 371 | 19.8% | 1.25 | 9% |
| train | DOWNTREND | 518 | 0.0% | 0.00 | 0% |
| train | EXPENSIVE | 311 | 2.0% | 1.18 | 0% |
| train | EXTREME | 100 | 0.0% | 0.00 | 0% |
| train | HIGH VOLATILITY | 699 | 4.0% | 0.60 | 0% |
| train | LOW VOLATILITY | 745 | 2.8% | 0.36 | 11% |
| train | MEDIUM VOLATILITY | 568 | -4.5% | -0.68 | 2% |
| train | NORMAL | 1,601 | 1.1% | 0.13 | 6% |
| train | SIDEWAYS | 592 | -2.8% | -1.05 | 1% |
| train | UPTREND | 902 | 4.4% | 0.43 | 10% |
| 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 | -8.3% | -1.00 | 0% |
| validation | LOW VOLATILITY | 183 | -2.0% | -0.21 | 16% |
| validation | MEDIUM VOLATILITY | 315 | 3.6% | 0.28 | 4% |
| validation | NORMAL | 474 | -2.9% | -0.22 | 9% |
| validation | SIDEWAYS | 206 | -9.5% | -1.56 | 1% |
| validation | UPTREND | 425 | 1.4% | 0.10 | 10% |
Trades (full period)
| Entry | Exit | Entry Px | Exit Px | Return | Days | |
|---|---|---|---|---|---|---|
| 2026-05-29 | 2026-06-01 | $435.79 | $415.88 | -1.14% | 2 | |
| 2025-12-12 | 2025-12-30 | $458.96 | $454.43 | 1.93% | 12 | |
| 2025-09-12 | 2025-09-15 | $395.94 | $410.04 | 5.01% | 2 | |
| 2025-06-02 | 2025-06-03 | $342.69 | $344.27 | -0.90% | 2 | |
| 2025-05-22 | 2025-05-28 | $341.04 | $356.90 | 5.75% | 4 | |
| 2024-10-03 | 2024-10-04 | $240.66 | $250.08 | -2.49% | 2 | |
| 2024-09-24 | 2024-09-27 | $254.27 | $260.46 | 1.04% | 4 | |
| 2024-09-16 | 2024-09-20 | $226.78 | $238.25 | 4.02% | 5 | |
| 2024-09-06 | 2024-09-09 | $210.73 | $216.27 | -6.05% | 2 | |
| 2024-07-02 | 2024-07-12 | $231.26 | $248.23 | 10.30% | 8 | |
| 2023-07-06 | 2023-07-07 | $276.54 | $274.43 | -1.61% | 2 | |
| 2023-06-02 | 2023-06-27 | $213.97 | $250.21 | 11.12% | 17 | |
| 2022-09-20 | 2022-09-23 | $308.73 | $275.33 | -4.80% | 4 | |
| 2022-08-16 | 2022-08-19 | $306.56 | $296.67 | -1.60% | 4 | |
| 2022-08-05 | 2022-08-08 | $288.17 | $290.42 | -4.78% | 2 | |
| 2022-04-05 | 2022-04-11 | $363.75 | $325.31 | -7.53% | 5 | |
| 2021-10-13 | 2021-11-10 | $270.36 | $355.98 | 18.67% | 21 | |
| 2021-10-08 | 2021-10-11 | $261.83 | $263.98 | -0.86% | 2 | |
| 2021-09-28 | 2021-10-07 | $259.19 | $264.54 | -0.90% | 8 | |
| 2021-09-01 | 2021-09-21 | $244.70 | $246.46 | -0.63% | 14 | |
| 2021-08-05 | 2021-08-17 | $238.21 | $221.90 | -2.55% | 9 | |
| 2019-10-21 | 2019-10-22 | $16.90 | $17.04 | -1.08% | 2 | |
| 2018-12-11 | 2018-12-18 | $24.45 | $22.47 | -3.32% | 6 | |
| 2018-02-01 | 2018-02-05 | $23.28 | $22.21 | -2.23% | 3 | |
| 2017-01-31 | 2017-02-02 | $16.80 | $16.77 | -0.53% | 3 | |
| 2017-01-05 | 2017-01-25 | $15.12 | $16.96 | 8.25% | 14 | |
| 2016-07-26 | 2016-08-09 | $15.30 | $15.27 | -1.29% | 11 | |
| 2016-06-08 | 2016-06-09 | $15.70 | $15.29 | 0.82% | 2 | |
| 2016-04-05 | 2016-04-14 | $17.03 | $16.79 | 2.04% | 8 | |
| 2015-07-21 | 2015-07-22 | $17.78 | $17.86 | -3.98% | 2 | |
| 2015-06-22 | 2015-07-09 | $17.32 | $17.19 | -2.08% | 13 | |
| 2015-05-11 | 2015-05-22 | $15.97 | $16.52 | 2.52% | 10 | |
| 2015-04-29 | 2015-05-01 | $15.50 | $15.07 | -1.48% | 3 | |
| 2014-09-02 | 2014-09-12 | $18.94 | $18.61 | 2.65% | 9 | |
| 2014-08-05 | 2014-08-25 | $15.90 | $17.50 | 5.20% | 15 | |
| 2014-06-23 | 2014-07-07 | $15.81 | $14.84 | -0.20% | 10 | |
| 2013-03-27 | 2013-04-02 | $2.54 | $2.96 | 11.07% | 4 | |
| 2013-02-12 | 2013-02-14 | $2.53 | $2.55 | -0.08% | 3 | |
| 2012-11-23 | 2012-12-14 | $2.14 | $2.25 | 2.36% | 16 | |
| 2012-03-28 | 2012-04-05 | $2.52 | $2.30 | -5.53% | 7 | |
| 2012-03-14 | 2012-03-16 | $2.35 | $2.35 | -2.26% | 3 | |
| 2012-02-23 | 2012-02-29 | $2.30 | $2.23 | -0.97% | 5 | |
| 2012-02-21 | 2012-02-22 | $2.30 | $2.28 | -1.08% | 2 |