LongTermTrend_V0880
ARCHIVEDhybridllmSimplified and diversified entry: require trend/short-term momentum (close>50SMA with positive slope or strong 20d return) plus MACD or RSI confirmation and avoid entries extremely close to 52-week high. Added defensive regime gates to allow entries only in UPTREND and non-high volatility, and to avoid EXTREME bubble. Improved exits: faster 5d stop and a tighter 20d stop to limit drawdowns. Position sizing scaled by vol_pctile with an additional rule to cut size on large drawdowns; reduced base position to 0.8 to lower turnover and overfitting risk.
Lineage
Parents (1)
changed cumret_252d threshold -0.1997 -> -0.4102
Strategy Logic (pseudocode)
# LongTermTrend_V0880 [hybrid]
require regime.trend in ['UPTREND']
require regime.volatility in ['LOW_VOLATILITY', 'MEDIUM_VOLATILITY']
require regime.bubble in ['NORMAL', 'EXPENSIVE']
if flat and (((close > sma_50 and sma_50_slope > 0.0) or ret_20d > 0.06) and (macd_hist > 0.0 or rsi_14 > 50.0) and dist_52w_high < 0.9):
position = 0.8
if long and (ret_5d < -0.03 or ret_20d < -0.08):
position = 0.0 # exit to cashBacktest Metrics
| Metric | Train | Validation | Hidden Test | Full |
|---|
| CAGR | -0.4% | 18.2% | -2.8% | 2.7% |
| Total Return | -3.0% | 64.9% | -9.9% | 47.7% |
| Sharpe | 0.05 | 0.89 | -0.07 | 0.24 |
| Sortino | 0.03 | 0.76 | -0.04 | 0.16 |
| Calmar | -0.01 | 0.53 | -0.09 | 0.07 |
| Volatility | 15.2% | 21.4% | 17.4% | 17.2% |
| Max DD | -32.2% | -34.2% | -30.1% | -40.7% |
| Win Rate | 32.8% | 33.3% | 35.7% | 33.6% |
| Avg Win | 5.6% | 14.5% | 6.1% | 8.7% |
| Avg Loss | -3.1% | -3.8% | -3.7% | -3.4% |
| Payoff | 1.84 | 3.83 | 1.65 | 2.57 |
| Expectancy | -0.2% | 2.3% | -0.2% | 0.7% |
| Profit Factor | 0.90 | 1.92 | 0.91 | 1.30 |
| Trades | 58 | 30 | 28 | 116 |
| Avg Holding Days | 7.9 | 7.0 | 5.8 | 7.3 |
| Turnover | 11.7 | 16.0 | 12.0 | 12.6 |
| Exposure | 16.7% | 19.2% | 11.4% | 15.9% |
Growth of $100
LongTermTrend_V0880 vs TSLA Buy & Hold
LongTermTrend_V0880 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 | -5.8% | -0.67 | -11.0% | 4 |
| 2017 | 4.4% | 0.34 | -15.5% | 15 |
| 2018 | -11.3% | -1.15 | -12.7% | 3 |
| 2019 | 9.3% | 0.94 | -9.5% | 4 |
| 2020 | 51.4% | 2.04 | -15.2% | 10 |
| 2021 | 37.3% | 1.48 | -16.0% | 10 |
| 2022 | -30.6% | -2.32 | -32.5% | 9 |
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 | 273 | 0.0% | 0.00 | 0% |
| hidden test | EXPENSIVE | 83 | 12.7% | 0.44 | 40% |
| hidden test | EXTREME | 48 | 0.0% | 0.00 | 0% |
| hidden test | HIGH VOLATILITY | 254 | -25.2% | -1.48 | 2% |
| hidden test | LOW VOLATILITY | 433 | 17.0% | 1.24 | 13% |
| hidden test | MEDIUM VOLATILITY | 250 | -8.5% | -0.37 | 19% |
| hidden test | NORMAL | 806 | -2.8% | -0.17 | 9% |
| hidden test | SIDEWAYS | 293 | -24.4% | -1.78 | 2% |
| hidden test | UPTREND | 371 | 16.1% | 0.65 | 27% |
| train | DOWNTREND | 518 | 0.0% | 0.00 | 0% |
| train | EXPENSIVE | 311 | 18.3% | 0.73 | 31% |
| train | EXTREME | 100 | 9.3% | 1.55 | 1% |
| train | HIGH VOLATILITY | 699 | 0.7% | 0.05 | 1% |
| train | LOW VOLATILITY | 745 | 11.0% | 0.69 | 33% |
| train | MEDIUM VOLATILITY | 568 | -12.4% | -0.81 | 15% |
| train | NORMAL | 1,601 | -3.2% | -0.25 | 15% |
| train | SIDEWAYS | 592 | -8.1% | -1.39 | 1% |
| train | UPTREND | 902 | 7.1% | 0.32 | 37% |
| validation | DOWNTREND | 125 | 0.0% | 0.00 | 0% |
| validation | EXPENSIVE | 138 | 64.6% | 2.07 | 44% |
| validation | EXTREME | 144 | 35.3% | 2.53 | 2% |
| validation | HIGH VOLATILITY | 258 | 13.3% | 1.19 | 1% |
| validation | LOW VOLATILITY | 183 | 7.8% | 0.46 | 34% |
| validation | MEDIUM VOLATILITY | 315 | 30.0% | 1.04 | 26% |
| validation | NORMAL | 474 | 0.7% | 0.03 | 17% |
| validation | SIDEWAYS | 206 | -28.9% | -2.17 | 2% |
| validation | UPTREND | 425 | 47.7% | 1.78 | 33% |
Trades (full period)
latest 100 of 116
| Entry | Exit | Entry Px | Exit Px | Return | Days | |
|---|
| 2026-07-01 | 2026-07-06 | $425.30 | $419.77 | -5.30% | 3 | |
| 2026-05-29 | 2026-06-01 | $435.79 | $415.88 | -1.30% | 2 | |
| 2025-12-04 | 2025-12-30 | $454.53 | $454.43 | 2.22% | 18 | |
| 2025-11-11 | 2025-11-13 | $439.62 | $401.99 | -2.79% | 3 | |
| 2025-11-06 | 2025-11-10 | $445.91 | $445.23 | -5.81% | 3 | |
| 2025-10-14 | 2025-11-05 | $429.24 | $462.07 | 1.47% | 17 | |
| 2025-10-10 | 2025-10-13 | $413.49 | $435.90 | -4.21% | 2 | |
| 2025-09-12 | 2025-10-09 | $395.94 | $435.54 | 14.92% | 20 | |
| 2025-09-04 | 2025-09-05 | $338.53 | $350.84 | 0.90% | 2 | |
| 2025-07-31 | 2025-08-01 | $308.27 | $302.63 | -2.86% | 2 | |
| 2025-07-29 | 2025-07-30 | $321.20 | $319.04 | -1.24% | 2 | |
| 2025-07-21 | 2025-07-25 | $328.49 | $316.06 | -6.05% | 5 | |
| 2025-06-05 | 2025-06-06 | $284.70 | $295.14 | -11.56% | 2 | |
| 2025-05-28 | 2025-06-04 | $356.90 | $332.05 | -4.27% | 6 | |
| 2025-05-22 | 2025-05-27 | $341.04 | $362.89 | 0.97% | 3 | |
| 2024-10-09 | 2024-10-10 | $241.05 | $238.77 | -1.29% | 2 | |
| 2024-10-07 | 2024-10-08 | $240.83 | $244.50 | -3.12% | 2 | |
| 2024-10-03 | 2024-10-04 | $240.66 | $250.08 | -2.84% | 2 | |
| 2024-09-23 | 2024-09-27 | $250.00 | $260.46 | 5.19% | 5 | |
| 2024-09-16 | 2024-09-20 | $226.78 | $238.25 | 4.58% | 5 | |
| 2024-09-05 | 2024-09-09 | $230.17 | $216.27 | -3.25% | 3 | |
| 2024-07-02 | 2024-07-12 | $231.26 | $248.23 | 11.75% | 8 | |
| 2024-01-03 | 2024-01-04 | $238.45 | $237.93 | -3.37% | 2 | |
| 2023-07-27 | 2023-08-03 | $255.71 | $259.32 | -3.24% | 6 | |
| 2023-07-25 | 2023-07-26 | $265.28 | $264.35 | -1.28% | 2 | |
| 2023-07-13 | 2023-07-21 | $277.90 | $260.02 | -2.74% | 7 | |
| 2023-06-28 | 2023-07-12 | $256.24 | $271.99 | 6.10% | 10 | |
| 2023-06-02 | 2023-06-27 | $213.97 | $250.21 | 12.72% | 17 | |
| 2022-09-15 | 2022-09-23 | $303.75 | $275.33 | -3.86% | 7 | |
| 2022-09-12 | 2022-09-14 | $304.42 | $302.61 | -2.16% | 3 | |
| 2022-08-16 | 2022-08-22 | $306.56 | $289.91 | -3.44% | 5 | |
| 2022-08-05 | 2022-08-08 | $288.17 | $290.42 | -5.46% | 2 | |
| 2022-04-19 | 2022-04-27 | $342.72 | $293.84 | -10.31% | 7 | |
| 2022-04-14 | 2022-04-18 | $328.33 | $334.76 | -3.08% | 2 | |
| 2022-04-08 | 2022-04-11 | $341.83 | $325.31 | -2.56% | 2 | |
| 2022-04-05 | 2022-04-07 | $363.75 | $352.42 | -7.15% | 3 | |
| 2022-01-12 | 2022-01-13 | $368.74 | $343.85 | 2.98% | 2 | |
| 2021-12-27 | 2022-01-04 | $364.65 | $383.20 | 9.81% | 7 | |
| 2021-12-09 | 2021-12-10 | $334.60 | $339.01 | -5.03% | 2 | |
| 2021-11-23 | 2021-12-03 | $369.68 | $338.32 | -5.13% | 8 | |
| 2021-08-24 | 2021-11-09 | $236.16 | $341.17 | 49.25% | 55 | |
| 2021-08-19 | 2021-08-20 | $224.49 | $226.75 | -1.96% | 2 | |
| 2021-08-05 | 2021-08-17 | $238.21 | $221.90 | -2.92% | 9 | |
| 2021-02-12 | 2021-02-16 | $272.04 | $265.41 | 0.28% | 2 | |
| 2021-02-02 | 2021-02-11 | $290.93 | $270.55 | -3.46% | 8 | |
| 2021-01-20 | 2021-02-01 | $283.48 | $279.94 | -4.97% | 9 | |
| 2021-01-12 | 2021-01-19 | $283.15 | $281.52 | 1.34% | 5 | |
| 2020-12-30 | 2021-01-11 | $231.59 | $270.40 | 24.93% | 8 | |
| 2020-12-10 | 2020-12-29 | $209.02 | $222.00 | 7.73% | 13 | |
| 2020-11-19 | 2020-12-08 | $166.42 | $216.63 | 24.77% | 13 | |
| 2020-11-04 | 2020-11-11 | $140.33 | $139.04 | -2.70% | 6 | |
| 2020-10-28 | 2020-10-29 | $135.34 | $136.94 | -3.67% | 2 | |
| 2020-10-23 | 2020-10-26 | $140.21 | $140.09 | -1.13% | 2 | |
| 2020-10-13 | 2020-10-21 | $148.88 | $140.88 | -3.83% | 7 | |
| 2020-08-11 | 2020-08-12 | $91.63 | $103.65 | -2.65% | 2 | |
| 2020-06-25 | 2020-06-29 | $65.73 | $67.29 | -0.24% | 3 | |
| 2020-05-29 | 2020-06-01 | $55.67 | $59.87 | 2.74% | 2 | |
| 2019-12-03 | 2020-01-22 | $22.41 | $37.97 | 48.27% | 34 | |
| 2019-11-29 | 2019-12-02 | $22.00 | $22.32 | -0.49% | 2 | |
| 2019-11-26 | 2019-11-27 | $21.93 | $22.09 | -1.92% | 2 | |
| 2019-11-22 | 2019-11-25 | $22.20 | $22.42 | -5.07% | 2 | |
| 2019-10-21 | 2019-10-22 | $16.90 | $17.04 | -1.23% | 2 | |
| 2018-11-27 | 2018-12-18 | $22.93 | $22.47 | 0.45% | 15 | |
| 2018-02-08 | 2018-02-09 | $21.02 | $20.69 | -7.06% | 2 | |
| 2018-02-01 | 2018-02-06 | $23.28 | $22.26 | -4.95% | 4 | |
| 2017-10-18 | 2017-10-24 | $23.98 | $22.49 | -4.38% | 5 | |
| 2017-10-05 | 2017-10-17 | $23.69 | $23.72 | -1.13% | 9 | |
| 2017-09-18 | 2017-09-25 | $25.67 | $23.00 | -6.22% | 6 | |
| 2017-08-15 | 2017-08-18 | $24.16 | $23.16 | -2.77% | 4 | |
| 2017-08-04 | 2017-08-07 | $23.79 | $23.68 | 2.10% | 2 | |
| 2017-06-30 | 2017-07-03 | $24.11 | $23.51 | 0.03% | 2 | |
| 2017-06-05 | 2017-06-14 | $23.15 | $25.38 | 8.28% | 8 | |
| 2017-05-12 | 2017-05-18 | $21.65 | $20.87 | -4.37% | 5 | |
| 2017-05-08 | 2017-05-09 | $20.48 | $21.42 | -0.46% | 2 | |
| 2017-04-24 | 2017-05-05 | $20.54 | $20.56 | -2.78% | 10 | |
| 2017-04-20 | 2017-04-21 | $20.17 | $20.37 | -0.95% | 2 | |
| 2017-03-24 | 2017-04-04 | $17.54 | $20.25 | 13.40% | 8 | |
| 2017-03-20 | 2017-03-22 | $17.46 | $17.00 | -3.46% | 3 | |
| 2017-03-15 | 2017-03-16 | $17.05 | $17.47 | -0.86% | 2 | |
| 2017-01-05 | 2017-02-24 | $15.12 | $17.13 | 10.04% | 35 | |
| 2016-07-26 | 2016-08-30 | $15.30 | $14.09 | -5.31% | 26 | |
| 2016-06-08 | 2016-06-09 | $15.70 | $15.29 | 0.93% | 2 | |
| 2016-04-15 | 2016-05-02 | $16.97 | $16.12 | -3.67% | 12 | |
| 2016-04-05 | 2016-04-14 | $17.03 | $16.79 | 2.32% | 8 | |
| 2015-07-29 | 2015-08-07 | $17.59 | $16.17 | -5.76% | 8 | |
| 2015-07-14 | 2015-07-27 | $17.71 | $16.87 | 0.87% | 10 | |
| 2015-05-11 | 2015-07-09 | $15.97 | $17.19 | 6.09% | 42 | |
| 2015-04-29 | 2015-05-01 | $15.50 | $15.07 | -1.69% | 3 | |
| 2014-10-07 | 2014-10-10 | $17.30 | $15.79 | -1.27% | 4 | |
| 2014-07-15 | 2014-09-16 | $14.64 | $17.38 | 9.51% | 45 | |
| 2014-07-10 | 2014-07-11 | $14.63 | $14.54 | -1.45% | 2 | |
| 2014-07-07 | 2014-07-08 | $14.84 | $14.60 | -2.46% | 2 | |
| 2014-06-23 | 2014-07-03 | $15.81 | $15.28 | -0.18% | 9 | |
| 2014-04-03 | 2014-04-04 | $15.03 | $14.15 | -1.86% | 2 | |
| 2014-03-20 | 2014-03-25 | $15.66 | $14.70 | -5.49% | 4 | |
| 2014-02-13 | 2014-02-26 | $13.31 | $16.87 | 21.13% | 9 | |
| 2013-11-05 | 2013-11-07 | $11.79 | $9.32 | -11.10% | 3 | |
| 2013-10-14 | 2013-10-22 | $11.98 | $11.44 | -2.86% | 7 | |
| 2013-10-09 | 2013-10-10 | $11.25 | $11.53 | -2.88% | 2 | |
| 2013-10-07 | 2013-10-08 | $12.20 | $11.65 | 0.76% | 2 | |