LongTermTrend_V1116
ARCHIVEDhybridllmSimplified and generalized entry rules: replaced stacked ret/cumret constraints with two robust pathways (trend-follow using close>sma_200 + positive sma_200_slope + macd_hist + mild ret_20d threshold; breakout pathway using breakout_20 + vol_chg + close>sma_50). Removed overfitting cumret_252d condition and tightened slope to >0.0 for clearer trend. Broadened breakout signal to 20-day flag. Improved exits: OR of macd_hist<0, short-term stop-loss (ret_5d<-3%), or price dropping below sma_50 for cleaner risk control. Added regime gates (UPTREND, MEDIUM_VOLATILITY, NORMAL) to avoid unfavorable markets and lowered base_position to 0.7 to reduce drawdown and turnover.
Lineage
Parents (1)
swapped indicator rel_volume -> vol_chg
Strategy Logic (pseudocode)
# LongTermTrend_V1116 [hybrid]
if flat and ((close > sma_200 and sma_200_slope > 0.0 and macd_hist > 0.0 and ret_20d > 0.03) or (breakout_20 == 1 and vol_chg > 0.02 and close > sma_50)):
position = 0.7
if long and (macd_hist < 0.0 or ret_5d < -0.03 or close < sma_50):
position = 0.0 # exit to cashBacktest Metrics
| Metric | Train | Validation | Hidden Test | Full |
|---|
| CAGR | 18.1% | 46.7% | 4.7% | 19.9% |
| Total Return | 277.3% | 215.6% | 18.8% | 1343.5% |
| Sharpe | 0.92 | 1.47 | 0.34 | 0.94 |
| Sortino | 0.86 | 1.53 | 0.28 | 0.87 |
| Calmar | 0.68 | 2.63 | 0.17 | 0.71 |
| Volatility | 20.2% | 28.8% | 18.6% | 21.9% |
| Max DD | -26.4% | -17.8% | -27.8% | -27.8% |
| Win Rate | 45.8% | 50.0% | 31.7% | 43.2% |
| Avg Win | 7.6% | 9.5% | 8.2% | 8.6% |
| Avg Loss | -2.5% | -2.9% | -2.9% | -2.7% |
| Payoff | 3.06 | 3.29 | 2.87 | 3.19 |
| Expectancy | 2.1% | 3.3% | 0.6% | 2.2% |
| Profit Factor | 2.59 | 3.29 | 1.33 | 2.43 |
| Trades | 72 | 42 | 41 | 155 |
| Avg Holding Days | 9.5 | 7.1 | 6.7 | 8.2 |
| Turnover | 12.7 | 19.6 | 15.4 | 14.7 |
| Exposure | 21.8% | 23.8% | 17.5% | 21.1% |
Growth of $100
LongTermTrend_V1116 vs TSLA Buy & Hold
LongTermTrend_V1116 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 | 15.4% | 1.49 | -5.4% | 4 |
| 2017 | 18.2% | 1.28 | -9.0% | 11 |
| 2018 | -1.2% | -0.00 | -10.2% | 9 |
| 2019 | 8.9% | 0.48 | -19.7% | 6 |
| 2020 | 178.2% | 2.62 | -17.3% | 13 |
| 2021 | 25.0% | 1.22 | -17.8% | 20 |
| 2022 | -11.8% | -0.70 | -15.6% | 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 | 277 | -1.3% | -0.10 | 8% |
| hidden test | EXPENSIVE | 83 | 15.2% | 0.62 | 32% |
| hidden test | EXTREME | 48 | 91.4% | 2.90 | 23% |
| hidden test | HIGH VOLATILITY | 254 | 11.1% | 0.47 | 17% |
| hidden test | LOW VOLATILITY | 436 | 20.6% | 1.30 | 20% |
| hidden test | MEDIUM VOLATILITY | 251 | -23.2% | -1.33 | 13% |
| hidden test | NORMAL | 810 | 0.4% | 0.02 | 16% |
| hidden test | SIDEWAYS | 293 | -17.0% | -0.97 | 23% |
| hidden test | UPTREND | 371 | 30.5% | 1.36 | 20% |
| train | DOWNTREND | 518 | 3.6% | 0.43 | 8% |
| train | EXPENSIVE | 311 | 32.8% | 1.41 | 34% |
| train | EXTREME | 100 | 201.7% | 4.19 | 49% |
| train | HIGH VOLATILITY | 699 | 34.8% | 1.27 | 20% |
| train | LOW VOLATILITY | 745 | 19.5% | 1.41 | 28% |
| train | MEDIUM VOLATILITY | 568 | -2.4% | -0.15 | 16% |
| train | NORMAL | 1,601 | 4.4% | 0.28 | 18% |
| train | SIDEWAYS | 592 | 7.9% | 0.48 | 22% |
| train | UPTREND | 902 | 34.3% | 1.31 | 30% |
| validation | DOWNTREND | 125 | 3.6% | 0.31 | 4% |
| validation | EXPENSIVE | 138 | 52.7% | 1.96 | 25% |
| validation | EXTREME | 144 | 165.7% | 3.22 | 45% |
| validation | HIGH VOLATILITY | 258 | 51.2% | 1.37 | 19% |
| validation | LOW VOLATILITY | 183 | 10.8% | 0.74 | 27% |
| validation | MEDIUM VOLATILITY | 315 | 53.6% | 1.99 | 26% |
| validation | NORMAL | 474 | 2.0% | 0.12 | 17% |
| validation | SIDEWAYS | 206 | -6.9% | -0.39 | 18% |
| validation | UPTREND | 425 | 77.7% | 2.18 | 32% |
Trades (full period)
latest 100 of 155
| Entry | Exit | Entry Px | Exit Px | Return | Days | |
|---|
| 2026-09-24 | 2026-09-29 | $377.94 | $352.84 | -4.33% | 4 | |
| 2026-09-04 | 2026-09-08 | $354.08 | $368.16 | -4.28% | 2 | |
| 2026-09-01 | 2026-09-02 | $356.09 | $357.01 | -2.39% | 2 | |
| 2026-07-02 | 2026-07-06 | $393.45 | $419.77 | -5.38% | 2 | |
| 2026-05-28 | 2026-06-02 | $442.10 | $423.74 | -4.03% | 4 | |
| 2026-05-08 | 2026-05-19 | $428.35 | $404.11 | -0.36% | 8 | |
| 2026-04-20 | 2026-04-22 | $392.50 | $387.51 | -2.63% | 3 | |
| 2025-12-08 | 2025-12-30 | $439.58 | $454.43 | 0.67% | 16 | |
| 2025-11-04 | 2025-11-05 | $444.26 | $462.07 | -3.74% | 2 | |
| 2025-10-29 | 2025-10-30 | $461.51 | $440.10 | 0.01% | 2 | |
| 2025-09-08 | 2025-10-06 | $346.40 | $453.25 | 15.37% | 21 | |
| 2025-08-25 | 2025-09-03 | $346.60 | $334.09 | -2.32% | 7 | |
| 2025-08-11 | 2025-08-20 | $339.03 | $323.90 | -0.19% | 8 | |
| 2025-05-28 | 2025-06-03 | $356.90 | $344.27 | -4.05% | 5 | |
| 2025-05-23 | 2025-05-27 | $339.34 | $362.89 | -0.49% | 2 | |
| 2025-05-12 | 2025-05-22 | $318.38 | $341.04 | 8.35% | 9 | |
| 2025-04-28 | 2025-05-07 | $285.88 | $276.22 | -2.47% | 8 | |
| 2024-12-06 | 2024-12-23 | $389.22 | $430.60 | 9.69% | 12 | |
| 2024-11-20 | 2024-11-29 | $342.03 | $345.16 | -2.77% | 7 | |
| 2024-11-07 | 2024-11-19 | $296.91 | $346.00 | 12.03% | 9 | |
| 2024-10-28 | 2024-11-01 | $262.51 | $248.98 | -5.20% | 5 | |
| 2024-09-20 | 2024-10-03 | $238.25 | $240.66 | 1.37% | 10 | |
| 2024-09-06 | 2024-09-09 | $210.73 | $216.27 | -6.05% | 2 | |
| 2024-06-18 | 2024-07-18 | $184.86 | $249.23 | 22.06% | 21 | |
| 2024-04-30 | 2024-05-07 | $183.28 | $177.81 | -3.47% | 6 | |
| 2023-12-15 | 2024-01-02 | $253.50 | $248.42 | -0.80% | 11 | |
| 2023-12-07 | 2023-12-14 | $242.64 | $251.05 | -0.16% | 6 | |
| 2023-11-29 | 2023-12-06 | $244.14 | $239.37 | -2.41% | 6 | |
| 2023-11-27 | 2023-11-28 | $236.08 | $246.72 | 0.05% | 2 | |
| 2023-11-22 | 2023-11-24 | $234.21 | $235.45 | -2.17% | 2 | |
| 2023-11-20 | 2023-11-21 | $235.60 | $241.20 | 0.25% | 2 | |
| 2023-11-16 | 2023-11-17 | $233.59 | $234.30 | -2.80% | 2 | |
| 2023-10-06 | 2023-10-16 | $260.53 | $253.92 | -2.54% | 7 | |
| 2023-09-22 | 2023-09-25 | $244.88 | $246.99 | -3.10% | 2 | |
| 2023-09-20 | 2023-09-21 | $262.59 | $255.70 | -1.17% | 2 | |
| 2023-09-12 | 2023-09-19 | $267.48 | $266.50 | -2.25% | 6 | |
| 2023-09-08 | 2023-09-11 | $248.50 | $273.58 | -0.97% | 2 | |
| 2023-07-18 | 2023-07-19 | $293.34 | $291.26 | 0.57% | 2 | |
| 2023-05-23 | 2023-06-27 | $185.77 | $250.21 | 18.74% | 24 | |
| 2023-04-03 | 2023-04-06 | $194.77 | $185.06 | -7.60% | 4 | |
| 2023-01-27 | 2023-02-23 | $177.90 | $202.07 | 17.43% | 19 | |
| 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-07-22 | 2022-08-08 | $272.24 | $290.42 | 4.21% | 12 | |
| 2022-07-11 | 2022-07-12 | $234.34 | $233.07 | -4.72% | 2 | |
| 2022-04-08 | 2022-04-11 | $341.83 | $325.31 | -2.24% | 2 | |
| 2022-03-21 | 2022-04-07 | $307.05 | $352.42 | 10.69% | 14 | |
| 2022-01-13 | 2022-01-14 | $343.85 | $349.87 | -4.86% | 2 | |
| 2022-01-11 | 2022-01-12 | $354.80 | $368.74 | 0.28% | 2 | |
| 2022-01-04 | 2022-01-07 | $383.20 | $342.32 | -8.10% | 4 | |
| 2021-11-10 | 2021-11-11 | $355.98 | $354.50 | 2.90% | 2 | |
| 2021-10-13 | 2021-11-09 | $270.36 | $341.17 | 29.54% | 20 | |
| 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-02 | 2021-08-17 | $236.56 | $221.90 | -0.20% | 12 | |
| 2021-07-13 | 2021-07-15 | $222.85 | $216.87 | -3.45% | 3 | |
| 2021-07-08 | 2021-07-09 | $217.60 | $218.98 | 0.75% | 2 | |
| 2021-06-24 | 2021-07-07 | $226.61 | $214.88 | 0.21% | 9 | |
| 2021-06-22 | 2021-06-23 | $207.90 | $218.86 | 0.18% | 2 | |
| 2021-06-18 | 2021-06-21 | $207.77 | $206.94 | 0.62% | 2 | |
| 2021-06-15 | 2021-06-16 | $199.79 | $201.62 | -2.22% | 2 | |
| 2021-06-11 | 2021-06-14 | $203.30 | $205.90 | -0.17% | 2 | |
| 2021-04-22 | 2021-04-29 | $239.90 | $225.67 | -4.82% | 6 | |
| 2021-04-14 | 2021-04-21 | $244.08 | $248.04 | -4.12% | 6 | |
| 2021-04-07 | 2021-04-08 | $223.66 | $227.93 | -2.23% | 2 | |
| 2021-04-05 | 2021-04-06 | $230.35 | $230.54 | 2.96% | 2 | |
| 2021-01-26 | 2021-01-27 | $294.36 | $288.05 | 0.04% | 2 | |
| 2021-01-20 | 2021-01-25 | $283.48 | $293.60 | 0.03% | 4 | |
| 2021-01-04 | 2021-01-19 | $243.26 | $281.52 | 11.78% | 11 | |
| 2020-12-18 | 2020-12-23 | $231.67 | $215.33 | -1.72% | 4 | |
| 2020-11-18 | 2020-12-17 | $162.21 | $218.63 | 27.56% | 21 | |
| 2020-10-15 | 2020-10-20 | $149.63 | $140.65 | -4.79% | 4 | |
| 2020-08-17 | 2020-09-04 | $122.38 | $139.44 | 16.24% | 15 | |
| 2020-07-01 | 2020-07-27 | $74.64 | $102.64 | 21.47% | 18 | |
| 2020-06-19 | 2020-06-25 | $66.73 | $65.73 | -3.14% | 5 | |
| 2020-06-02 | 2020-06-18 | $58.77 | $66.93 | 7.28% | 13 | |
| 2020-05-05 | 2020-05-14 | $51.21 | $53.56 | 2.62% | 8 | |
| 2020-04-27 | 2020-05-04 | $53.25 | $50.75 | -2.19% | 6 | |
| 2020-04-23 | 2020-04-24 | $47.04 | $48.34 | -2.67% | 2 | |
| 2020-04-14 | 2020-04-22 | $47.33 | $48.81 | 3.85% | 7 | |
| 2020-02-13 | 2020-02-26 | $53.60 | $51.92 | 3.03% | 9 | |
| 2019-12-13 | 2020-02-12 | $23.89 | $51.15 | 73.14% | 41 | |
| 2019-11-08 | 2019-11-21 | $22.48 | $23.66 | 3.33% | 10 | |
| 2019-10-14 | 2019-11-04 | $17.13 | $21.16 | 18.11% | 16 | |
| 2019-09-12 | 2019-09-25 | $16.39 | $15.25 | -6.93% | 10 | |
| 2019-07-02 | 2019-07-26 | $14.97 | $15.20 | 0.67% | 18 | |
| 2019-03-01 | 2019-03-04 | $19.65 | $19.02 | -5.63% | 2 | |
| 2019-01-18 | 2019-01-22 | $20.15 | $19.93 | -9.21% | 2 | |
| 2018-12-11 | 2018-12-18 | $24.45 | $22.47 | -3.32% | 6 | |
| 2018-12-07 | 2018-12-10 | $23.86 | $24.34 | -1.12% | 2 | |
| 2018-12-04 | 2018-12-06 | $23.98 | $24.20 | 0.10% | 2 | |
| 2018-10-26 | 2018-11-21 | $22.06 | $22.55 | 7.10% | 19 | |
| 2018-08-03 | 2018-08-15 | $23.21 | $22.58 | -0.37% | 9 | |
| 2018-06-07 | 2018-06-25 | $21.07 | $22.20 | 3.06% | 13 | |
| 2018-03-14 | 2018-03-15 | $21.78 | $21.71 | -3.25% | 2 | |
| 2018-02-26 | 2018-03-02 | $23.83 | $22.34 | -4.35% | 5 | |
| 2018-01-09 | 2018-02-05 | $22.25 | $22.21 | 1.42% | 19 | |
| 2017-12-12 | 2017-12-26 | $22.74 | $21.15 | -0.90% | 10 | |
| 2017-09-14 | 2017-09-25 | $25.18 | $23.00 | -3.00% | 8 | |