LongTermTrend_V1710
ARCHIVEDhybridllmStronger trend requirement and relaxed momentum thresholds: require sma_200_slope > 0 for trend leg; lower ret_20d entry threshold to 0.03 and reduce 1y cumret barrier to 0.02 to increase trade frequency. Added volatility and shorter-term momentum filters (vol_pctile < 0.8, sma_50_slope > 0) to avoid entry into high-volatility or weakening setups. Improved exits: multi-condition exit (20d loss < -3%, negative sma_50_slope, or price crossing below sma_50) to cut losses earlier. Added regime gates to prevent trading in high-volatility or bubble states and reduced base position to 0.8 for risk control.
Lineage
changed sma_200_slope threshold -0.0024 -> -0.0041
Strategy Logic (pseudocode)
# LongTermTrend_V1710 [hybrid]
require regime.trend in ['UPTREND', 'SIDEWAYS']
require regime.volatility in ['LOW_VOLATILITY', 'MEDIUM_VOLATILITY']
require regime.bubble in ['NORMAL']
if flat and (((close > sma_200 and sma_200_slope > 0.0) or ret_20d > 0.085) and ret_20d > 0.03 and cumret_252d > 0.02 and vol_pctile < 0.8 and sma_50_slope > 0.0):
position = 0.8
if long and (ret_20d < -0.03 or sma_50_slope < -0.0005 or close < sma_50):
position = 0.0 # exit to cashBacktest Metrics
| Metric | Train | Validation | Hidden Test | Full |
|---|---|---|---|---|
| CAGR | -0.4% | 0.9% | -2.7% | -0.7% |
| Total Return | -3.1% | 2.6% | -9.7% | -10.3% |
| Sharpe | 0.03 | 0.13 | -0.14 | 0.01 |
| Sortino | 0.02 | 0.06 | -0.06 | 0.01 |
| Calmar | -0.01 | 0.02 | -0.12 | -0.02 |
| Volatility | 12.3% | 15.8% | 13.1% | 13.3% |
| Max DD | -27.2% | -35.0% | -22.7% | -42.0% |
| Win Rate | 42.1% | 33.3% | 42.9% | 40.6% |
| Avg Win | 5.8% | 18.7% | 7.7% | 8.3% |
| Avg Loss | -4.2% | -6.9% | -7.6% | -5.5% |
| Payoff | 1.38 | 2.70 | 1.01 | 1.50 |
| Expectancy | 0.0% | 1.6% | -1.1% | 0.1% |
| Profit Factor | 1.00 | 1.35 | 0.76 | 1.02 |
| Trades | 19 | 6 | 7 | 32 |
| Avg Holding Days | 15.7 | 19.5 | 13.9 | 16.0 |
| Turnover | 3.8 | 3.2 | 3.0 | 3.5 |
| Exposure | 11.1% | 11.7% | 7.6% | 10.3% |
Growth of $100
Walk-Forward Years
| Year | CAGR | Sharpe | Max DD | Trades |
|---|---|---|---|---|
| 2016 | 1.5% | 0.21 | -10.1% | 1 |
| 2017 | 9.8% | 2.07 | -0.9% | 2 |
| 2018 | -14.2% | -1.23 | -14.9% | 3 |
| 2019 | 5.9% | 0.73 | -5.9% | 1 |
| 2020 | 0.0% | 0.00 | 0.0% | 0 |
| 2021 | 26.5% | 1.20 | -18.7% | 3 |
| 2022 | -19.0% | -1.16 | -22.3% | 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 | 34.2% | 2.44 | 2% |
| hidden test | EXTREME | 48 | 0.0% | 0.00 | 0% |
| hidden test | HIGH VOLATILITY | 254 | -11.4% | -1.00 | 0% |
| hidden test | LOW VOLATILITY | 445 | 3.4% | 0.25 | 13% |
| hidden test | MEDIUM VOLATILITY | 251 | -1.5% | -0.11 | 5% |
| hidden test | NORMAL | 819 | -5.6% | -0.42 | 9% |
| hidden test | SIDEWAYS | 300 | -17.7% | -1.27 | 7% |
| hidden test | UPTREND | 371 | 9.6% | 0.58 | 14% |
| train | DOWNTREND | 518 | -0.3% | -0.79 | 0% |
| train | EXPENSIVE | 311 | 7.0% | 1.38 | 1% |
| train | EXTREME | 100 | 0.0% | 0.00 | 0% |
| train | HIGH VOLATILITY | 699 | -1.9% | -0.19 | 0% |
| train | LOW VOLATILITY | 745 | 15.5% | 1.08 | 23% |
| train | MEDIUM VOLATILITY | 568 | -16.8% | -1.42 | 8% |
| train | NORMAL | 1,601 | -0.9% | -0.07 | 14% |
| train | SIDEWAYS | 592 | -8.1% | -1.02 | 4% |
| train | UPTREND | 902 | 6.3% | 0.37 | 22% |
| 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.5% | -0.66 | 1% |
| validation | LOW VOLATILITY | 183 | 22.3% | 1.67 | 28% |
| validation | MEDIUM VOLATILITY | 315 | -2.5% | -0.12 | 11% |
| validation | NORMAL | 474 | 3.4% | 0.17 | 19% |
| validation | SIDEWAYS | 206 | -15.1% | -1.03 | 7% |
| validation | UPTREND | 425 | 11.1% | 0.60 | 18% |
Trades (full period)
| Entry | Exit | Entry Px | Exit Px | Return | Days | |
|---|---|---|---|---|---|---|
| 2026-05-14 | 2026-06-08 | $443.30 | $408.95 | -9.93% | 17 | |
| 2025-12-12 | 2026-01-05 | $458.96 | $451.67 | -1.67% | 15 | |
| 2025-08-25 | 2025-09-15 | $346.60 | $410.04 | 12.89% | 15 | |
| 2025-06-02 | 2025-06-06 | $342.69 | $295.14 | -14.50% | 5 | |
| 2025-05-22 | 2025-05-28 | $341.04 | $356.90 | 6.58% | 4 | |
| 2024-01-03 | 2024-01-10 | $238.45 | $233.94 | -4.50% | 6 | |
| 2023-06-13 | 2023-08-02 | $258.71 | $254.11 | 3.73% | 35 | |
| 2022-08-02 | 2022-08-29 | $300.59 | $284.82 | -2.53% | 20 | |
| 2022-04-05 | 2022-04-27 | $363.75 | $293.84 | -19.20% | 16 | |
| 2022-01-12 | 2022-01-13 | $368.74 | $343.85 | 2.98% | 2 | |
| 2021-12-09 | 2021-12-10 | $334.60 | $339.01 | -5.03% | 2 | |
| 2021-11-23 | 2021-12-01 | $369.68 | $365.00 | -0.96% | 6 | |
| 2021-08-03 | 2021-11-10 | $236.58 | $355.98 | 34.50% | 71 | |
| 2019-11-22 | 2019-12-17 | $22.20 | $25.27 | 5.89% | 17 | |
| 2018-11-27 | 2018-12-19 | $22.93 | $22.20 | -2.18% | 16 | |
| 2018-03-13 | 2018-03-15 | $22.79 | $21.71 | -4.53% | 3 | |
| 2018-01-22 | 2018-02-09 | $23.44 | $20.69 | -8.08% | 15 | |
| 2017-01-31 | 2017-02-03 | $16.80 | $16.76 | 0.14% | 4 | |
| 2017-01-06 | 2017-01-25 | $15.27 | $16.96 | 9.57% | 13 | |
| 2016-03-28 | 2016-05-04 | $15.35 | $14.84 | 1.54% | 28 | |
| 2015-12-30 | 2016-01-05 | $15.87 | $14.90 | -4.79% | 4 | |
| 2015-08-06 | 2015-08-07 | $16.41 | $16.17 | -7.26% | 2 | |
| 2015-04-29 | 2015-07-28 | $15.50 | $17.65 | 7.77% | 63 | |
| 2015-04-14 | 2015-04-21 | $13.83 | $13.96 | -1.88% | 6 | |
| 2014-09-19 | 2014-09-23 | $17.29 | $16.69 | -4.35% | 3 | |
| 2014-08-05 | 2014-09-16 | $15.90 | $17.38 | 5.11% | 30 | |
| 2014-06-23 | 2014-07-17 | $15.81 | $14.36 | -4.44% | 18 | |
| 2013-03-26 | 2013-04-02 | $2.52 | $2.96 | 13.44% | 5 | |
| 2013-02-15 | 2013-02-22 | $2.47 | $2.41 | -6.61% | 5 | |
| 2013-02-12 | 2013-02-14 | $2.53 | $2.55 | -0.10% | 3 | |
| 2012-11-28 | 2013-01-11 | $2.22 | $2.19 | 3.33% | 31 | |
| 2012-02-23 | 2012-04-10 | $2.30 | $2.16 | -2.46% | 33 |