LongTermTrend_V1580
ARCHIVEDhybridllmSimplified and regularized entry: require either price above 200sma with a non-negative 200sma slope or a 20-day breakout, plus modest 20-day momentum, positive 50sma slope, not too far below 20sma, and relaxed 252d drawdown filter — to reduce overfitting and improve generalization. Exit broadened to earlier stop (ret_20d < -8%) or weakness vs 50sma to cut losses sooner. Added regime gates to allow only UPTREND and non-HIGH volatility regimes. Position sizing scaled down in high volatility (vol_pctile > 0.75 -> 50%) and full size in very low volatility to control risk. Lowered base_position to 0.85 to reduce leverage/exposure.
Lineage
Parents (1)
added entry filter: dist_sma_20 > -0.0187
Strategy Logic (pseudocode)
# LongTermTrend_V1580 [hybrid]
require regime.trend in ['UPTREND']
require regime.volatility in ['LOW_VOLATILITY', 'MEDIUM_VOLATILITY']
if flat and (((close > sma_200 and sma_200_slope > -0.0005) or breakout_20 > 0.5) and ret_20d > 0.035 and sma_50_slope > 0.0 and dist_sma_20 > -0.05 and cumret_252d > -0.3):
position = 0.85
if long and (ret_20d < -0.08 or dist_sma_50 < -0.06):
position = 0.0 # exit to cashBacktest Metrics
| Metric | Train | Validation | Hidden Test | Full |
|---|
| CAGR | 3.4% | 32.1% | 3.7% | 8.9% |
| Total Return | 30.7% | 130.4% | 14.5% | 253.5% |
| Sharpe | 0.28 | 1.15 | 0.28 | 0.51 |
| Sortino | 0.19 | 0.99 | 0.16 | 0.36 |
| Calmar | 0.10 | 0.65 | 0.17 | 0.18 |
| Volatility | 18.0% | 27.6% | 20.1% | 20.8% |
| Max DD | -33.7% | -49.7% | -22.0% | -49.7% |
| Win Rate | 44.0% | 46.7% | 58.3% | 48.1% |
| Avg Win | 6.5% | 25.0% | 7.1% | 12.9% |
| Avg Loss | -3.8% | -7.8% | -6.3% | -5.5% |
| Payoff | 1.71 | 3.20 | 1.12 | 2.35 |
| Expectancy | 0.7% | 7.5% | 1.5% | 3.3% |
| Profit Factor | 1.34 | 2.80 | 1.57 | 2.18 |
| Trades | 25 | 15 | 12 | 52 |
| Avg Holding Days | 19.7 | 16.1 | 14.3 | 17.9 |
| Turnover | 5.4 | 8.5 | 5.4 | 6.0 |
| Exposure | 20.8% | 25.5% | 14.3% | 20.1% |
Growth of $100
LongTermTrend_V1580 vs TSLA Buy & Hold
LongTermTrend_V1580 TSLA Buy & HoldIn-sampleValidationHidden test
Growth of $100 · log scale · in-sample, validation and hidden-test segments are shaded separately and must not be compared as one out-of-sample track record.
Walk-Forward Years
year-by-year stability matters more than any single year
| Year | CAGR | Sharpe | Max DD | Trades |
|---|
| 2016 | -10.5% | -1.12 | -15.8% | 2 |
| 2017 | 4.6% | 0.32 | -21.2% | 9 |
| 2018 | -12.6% | -1.40 | -14.1% | 2 |
| 2019 | 15.0% | 1.36 | -6.3% | 0 |
| 2020 | 191.7% | 3.45 | -10.3% | 5 |
| 2021 | 8.7% | 0.43 | -28.4% | 5 |
| 2022 | -29.8% | -2.05 | -31.9% | 5 |
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 | 65.9% | 1.95 | 47% |
| hidden test | EXTREME | 48 | 25.1% | 0.93 | 14% |
| hidden test | HIGH VOLATILITY | 254 | -23.3% | -1.36 | 2% |
| hidden test | LOW VOLATILITY | 443 | 25.1% | 1.55 | 16% |
| hidden test | MEDIUM VOLATILITY | 251 | 0.6% | 0.02 | 23% |
| hidden test | NORMAL | 817 | -1.6% | -0.09 | 11% |
| hidden test | SIDEWAYS | 298 | -12.3% | -1.07 | 1% |
| hidden test | UPTREND | 371 | 24.3% | 0.80 | 35% |
| train | DOWNTREND | 518 | 0.0% | 0.00 | 0% |
| train | EXPENSIVE | 311 | 24.3% | 0.85 | 37% |
| train | EXTREME | 100 | 44.6% | 1.83 | 25% |
| train | HIGH VOLATILITY | 699 | -1.6% | -0.10 | 2% |
| train | LOW VOLATILITY | 745 | 23.5% | 1.29 | 38% |
| train | MEDIUM VOLATILITY | 568 | -11.2% | -0.56 | 22% |
| train | NORMAL | 1,601 | -1.3% | -0.09 | 17% |
| train | SIDEWAYS | 592 | -4.7% | -1.29 | 1% |
| train | UPTREND | 902 | 14.2% | 0.53 | 46% |
| validation | DOWNTREND | 125 | 0.0% | 0.00 | 0% |
| validation | EXPENSIVE | 138 | 64.9% | 1.81 | 52% |
| validation | EXTREME | 144 | 156.5% | 4.70 | 21% |
| validation | HIGH VOLATILITY | 258 | 23.5% | 1.22 | 2% |
| validation | LOW VOLATILITY | 183 | 16.8% | 0.86 | 39% |
| validation | MEDIUM VOLATILITY | 315 | 46.9% | 1.30 | 37% |
| validation | NORMAL | 474 | -16.0% | -0.73 | 19% |
| validation | SIDEWAYS | 206 | -25.4% | -1.85 | 2% |
| validation | UPTREND | 425 | 68.5% | 1.94 | 44% |
Trades (full period)
52 trades
| Entry | Exit | Entry Px | Exit Px | Return | Days | |
|---|
| 2026-05-29 | 2026-06-01 | $435.79 | $415.88 | -1.38% | 2 | |
| 2025-12-12 | 2026-01-13 | $458.96 | $447.20 | 0.30% | 21 | |
| 2025-09-12 | 2025-11-14 | $395.94 | $404.35 | 7.78% | 46 | |
| 2025-09-04 | 2025-09-05 | $338.53 | $350.84 | 0.96% | 2 | |
| 2025-05-22 | 2025-06-06 | $341.04 | $295.14 | -12.80% | 11 | |
| 2024-12-11 | 2024-12-23 | $424.77 | $430.60 | 4.19% | 9 | |
| 2024-10-03 | 2024-10-18 | $240.66 | $220.70 | -9.77% | 12 | |
| 2024-09-16 | 2024-09-20 | $226.78 | $238.25 | 4.86% | 5 | |
| 2024-09-04 | 2024-09-09 | $219.41 | $216.27 | -0.04% | 4 | |
| 2024-07-02 | 2024-07-12 | $231.26 | $248.23 | 12.47% | 8 | |
| 2024-01-03 | 2024-01-12 | $238.45 | $218.89 | -7.44% | 8 | |
| 2023-06-02 | 2023-08-03 | $213.97 | $259.32 | 18.92% | 43 | |
| 2022-09-20 | 2022-09-23 | $308.73 | $275.33 | -5.81% | 4 | |
| 2022-08-16 | 2022-08-22 | $306.56 | $289.91 | -3.65% | 5 | |
| 2022-08-05 | 2022-08-08 | $288.17 | $290.42 | -5.80% | 2 | |
| 2022-04-05 | 2022-04-27 | $363.75 | $293.84 | -20.33% | 16 | |
| 2022-01-12 | 2022-01-13 | $368.74 | $343.85 | 3.17% | 2 | |
| 2021-12-09 | 2021-12-17 | $334.60 | $310.86 | -11.51% | 7 | |
| 2021-11-23 | 2021-12-03 | $369.68 | $338.32 | -5.45% | 8 | |
| 2021-08-24 | 2021-11-10 | $236.16 | $355.98 | 37.32% | 56 | |
| 2021-08-05 | 2021-08-23 | $238.21 | $235.43 | -3.80% | 13 | |
| 2020-11-19 | 2021-02-23 | $166.42 | $232.95 | 39.17% | 64 | |
| 2020-10-13 | 2020-10-30 | $148.88 | $129.35 | -6.21% | 14 | |
| 2020-08-31 | 2020-09-01 | $166.11 | $158.35 | 10.50% | 2 | |
| 2020-08-26 | 2020-08-27 | $143.54 | $149.25 | 5.28% | 2 | |
| 2020-05-28 | 2020-07-06 | $53.72 | $91.44 | 39.20% | 27 | |
| 2019-11-22 | 2020-01-31 | $22.20 | $43.37 | 65.51% | 47 | |
| 2018-11-27 | 2018-12-21 | $22.93 | $21.32 | -7.67% | 18 | |
| 2018-02-01 | 2018-02-06 | $23.28 | $22.26 | -5.26% | 4 | |
| 2017-09-18 | 2017-10-17 | $25.67 | $23.72 | -6.69% | 22 | |
| 2017-08-15 | 2017-08-18 | $24.16 | $23.16 | -2.94% | 4 | |
| 2017-08-04 | 2017-08-07 | $23.79 | $23.68 | 2.23% | 2 | |
| 2017-06-05 | 2017-07-06 | $23.15 | $20.59 | -3.27% | 23 | |
| 2017-05-12 | 2017-05-19 | $21.65 | $20.72 | -2.80% | 6 | |
| 2017-04-24 | 2017-05-10 | $20.54 | $21.68 | 4.22% | 13 | |
| 2017-04-20 | 2017-04-21 | $20.17 | $20.37 | -1.01% | 2 | |
| 2017-03-28 | 2017-04-04 | $18.50 | $20.25 | 8.69% | 6 | |
| 2017-01-05 | 2017-02-28 | $15.12 | $16.67 | 7.08% | 37 | |
| 2016-07-26 | 2016-08-30 | $15.30 | $14.09 | -5.64% | 26 | |
| 2016-04-05 | 2016-05-04 | $17.03 | $14.84 | -5.17% | 22 | |
| 2015-05-11 | 2015-08-07 | $15.97 | $16.17 | 3.45% | 63 | |
| 2015-04-29 | 2015-05-01 | $15.50 | $15.07 | -1.80% | 3 | |
| 2014-06-23 | 2014-09-30 | $15.81 | $16.18 | 5.83% | 70 | |
| 2014-03-20 | 2014-03-26 | $15.66 | $14.20 | -5.73% | 5 | |
| 2014-02-13 | 2014-02-26 | $13.31 | $16.87 | 22.52% | 9 | |
| 2013-09-09 | 2013-10-24 | $10.71 | $11.54 | -1.25% | 34 | |
| 2013-06-28 | 2013-07-17 | $7.16 | $8.02 | -0.09% | 13 | |
| 2013-04-30 | 2013-05-08 | $3.60 | $3.72 | 0.79% | 7 | |
| 2013-03-26 | 2013-04-02 | $2.52 | $2.96 | 14.28% | 5 | |
| 2012-12-18 | 2013-02-27 | $2.31 | $2.34 | 0.07% | 48 | |
| 2012-11-23 | 2012-12-14 | $2.14 | $2.25 | 2.84% | 16 | |
| 2012-02-23 | 2012-04-11 | $2.30 | $2.21 | -4.39% | 34 | |