LongTermTrend_V0437
ARCHIVEDhybridllm1) Added regime gates: only enter in UPTREND, medium volatility, and normal bubble to reduce regime overfitting. 2) Reworked entry: require momentum confirmation (macd_hist>0) and avoid overbought (rsi_14<70); use sma_50 cross + positive sma_50_slope or 20d return breakout for more robust trend signal. 3) Improved exit: multi-condition exit (negative 20d return OR price crossing below sma_50 OR drawdown>10%) to cut losses earlier. 4) Introduced volatility-based position sizing via vol_pctile to reduce size in higher-volatility regimes and set base_position to 0.8 to temper leverage.
Lineage
Parents (1)
changed ret_20d threshold 0.05 -> 0.1
Strategy Logic (pseudocode)
# LongTermTrend_V0437 [hybrid]
if flat and (((close > sma_50 and sma_50_slope > 0.0) or ret_20d > 0.05) and cumret_252d > -0.1997 and macd_hist > 0.0 and rsi_14 < 70.0):
position = 0.8
if long and (ret_20d < 0.0 or close < sma_50 or drawdown > 0.1):
position = 0.0 # exit to cashBacktest Metrics
| Metric | Train | Validation | Hidden Test | Full |
|---|
| CAGR | 16.8% | 77.7% | 2.7% | 23.4% |
| Total Return | 246.1% | 461.2% | 10.2% | 2090.5% |
| Sharpe | 0.73 | 1.68 | 0.23 | 0.86 |
| Sortino | 0.77 | 1.75 | 0.22 | 0.87 |
| Calmar | 0.31 | 2.72 | 0.07 | 0.44 |
| Volatility | 25.9% | 38.7% | 28.1% | 29.5% |
| Max DD | -53.5% | -28.5% | -37.2% | -53.5% |
| Win Rate | 32.9% | 50.0% | 37.5% | 37.3% |
| Avg Win | 12.1% | 22.2% | 7.2% | 14.3% |
| Avg Loss | -3.0% | -4.0% | -3.4% | -3.3% |
| Payoff | 4.02 | 5.57 | 2.14 | 4.40 |
| Expectancy | 2.0% | 9.1% | 0.6% | 3.3% |
| Profit Factor | 1.97 | 5.57 | 1.28 | 2.62 |
| Trades | 76 | 26 | 48 | 150 |
| Avg Holding Days | 11.8 | 15.7 | 8.3 | 11.7 |
| Turnover | 15.3 | 13.9 | 21.0 | 16.4 |
| Exposure | 34.9% | 40.4% | 30.8% | 35.0% |
Growth of $100
LongTermTrend_V0437 vs TSLA Buy & Hold
LongTermTrend_V0437 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 | 21.9% | 1.50 | -10.7% | 5 |
| 2017 | 2.3% | 0.21 | -22.8% | 14 |
| 2018 | -16.2% | -0.70 | -26.1% | 11 |
| 2019 | 7.8% | 0.42 | -28.6% | 7 |
| 2020 | 247.8% | 2.52 | -28.5% | 5 |
| 2021 | 56.6% | 1.70 | -14.2% | 11 |
| 2022 | -0.3% | 0.10 | -14.3% | 10 |
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 | 267 | -17.3% | -0.94 | 16% |
| hidden test | EXPENSIVE | 83 | 77.8% | 1.86 | 59% |
| hidden test | EXTREME | 48 | 147.1% | 3.27 | 53% |
| hidden test | HIGH VOLATILITY | 254 | -19.3% | -0.52 | 32% |
| hidden test | LOW VOLATILITY | 429 | 48.9% | 2.36 | 30% |
| hidden test | MEDIUM VOLATILITY | 248 | -40.2% | -1.42 | 31% |
| hidden test | NORMAL | 800 | -9.2% | -0.37 | 27% |
| hidden test | SIDEWAYS | 293 | -16.5% | -0.74 | 26% |
| hidden test | UPTREND | 371 | 41.9% | 1.14 | 45% |
| train | DOWNTREND | 518 | -10.4% | -0.91 | 9% |
| train | EXPENSIVE | 311 | 48.4% | 1.54 | 58% |
| train | EXTREME | 100 | 307.5% | 5.30 | 75% |
| train | HIGH VOLATILITY | 699 | 48.2% | 1.44 | 32% |
| train | LOW VOLATILITY | 745 | 22.3% | 1.17 | 43% |
| train | MEDIUM VOLATILITY | 568 | -21.9% | -0.98 | 28% |
| train | NORMAL | 1,601 | -4.9% | -0.24 | 28% |
| train | SIDEWAYS | 592 | -3.6% | -0.19 | 27% |
| train | UPTREND | 902 | 50.3% | 1.47 | 55% |
| validation | DOWNTREND | 125 | 41.9% | 2.56 | 8% |
| validation | EXPENSIVE | 138 | 49.6% | 1.15 | 43% |
| validation | EXTREME | 144 | 229.8% | 3.62 | 67% |
| validation | HIGH VOLATILITY | 258 | 52.2% | 1.02 | 33% |
| validation | LOW VOLATILITY | 183 | 33.0% | 1.64 | 48% |
| validation | MEDIUM VOLATILITY | 315 | 94.1% | 2.70 | 42% |
| validation | NORMAL | 474 | 19.4% | 0.80 | 32% |
| validation | SIDEWAYS | 206 | 3.4% | 0.14 | 30% |
| validation | UPTREND | 425 | 101.6% | 2.12 | 55% |
Trades (full period)
latest 100 of 151
| Entry | Exit | Entry Px | Exit Px | Return | Days | |
|---|
| 2026-09-09 | — | $367.81 | — | -0.50% | 8 | OPEN |
| 2026-09-03 | 2026-09-08 | $376.37 | $368.16 | -0.76% | 3 | |
| 2026-08-31 | 2026-09-02 | $367.95 | $357.01 | 1.55% | 3 | |
| 2026-08-27 | 2026-08-28 | $354.81 | $348.75 | 1.92% | 2 | |
| 2026-08-25 | 2026-08-26 | $350.25 | $345.82 | 0.14% | 2 | |
| 2026-08-21 | 2026-08-24 | $362.86 | $348.95 | 3.95% | 2 | |
| 2026-07-13 | 2026-07-14 | $394.76 | $396.18 | -2.71% | 2 | |
| 2026-07-07 | 2026-07-08 | $402.90 | $394.06 | -3.37% | 2 | |
| 2026-07-01 | 2026-07-06 | $425.30 | $419.77 | -5.30% | 3 | |
| 2026-05-04 | 2026-06-08 | $392.51 | $408.95 | 0.03% | 25 | |
| 2026-04-29 | 2026-04-30 | $372.80 | $381.63 | -0.84% | 2 | |
| 2026-04-20 | 2026-04-22 | $392.50 | $387.51 | -3.00% | 3 | |
| 2025-12-11 | 2026-01-05 | $446.89 | $451.67 | -2.46% | 16 | |
| 2025-12-08 | 2025-12-10 | $439.58 | $451.45 | -1.88% | 3 | |
| 2025-12-04 | 2025-12-05 | $454.53 | $455.00 | 1.23% | 2 | |
| 2025-11-04 | 2025-11-13 | $444.26 | $401.99 | -6.59% | 8 | |
| 2025-08-25 | 2025-10-23 | $346.60 | $448.98 | 22.85% | 43 | |
| 2025-08-11 | 2025-08-20 | $339.03 | $323.90 | -0.23% | 8 | |
| 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-24 | 2025-07-25 | $305.30 | $316.06 | -6.71% | 2 | |
| 2025-07-21 | 2025-07-23 | $328.49 | $332.56 | 0.44% | 3 | |
| 2025-06-25 | 2025-06-26 | $327.55 | $325.78 | -3.19% | 2 | |
| 2025-05-05 | 2025-06-06 | $280.26 | $295.14 | -0.49% | 24 | |
| 2025-04-29 | 2025-05-02 | $292.03 | $287.21 | -1.65% | 4 | |
| 2025-04-15 | 2025-04-16 | $254.11 | $241.55 | 0.40% | 2 | |
| 2025-04-10 | 2025-04-11 | $252.40 | $252.31 | -5.97% | 2 | |
| 2025-04-08 | 2025-04-09 | $221.86 | $272.20 | -4.08% | 2 | |
| 2024-11-05 | 2025-01-13 | $251.44 | $403.31 | 48.43% | 46 | |
| 2024-10-25 | 2024-11-04 | $269.19 | $242.84 | -3.68% | 7 | |
| 2024-09-10 | 2024-10-14 | $226.17 | $219.16 | 0.62% | 25 | |
| 2024-09-06 | 2024-09-09 | $210.73 | $216.27 | -6.91% | 2 | |
| 2024-09-04 | 2024-09-05 | $219.41 | $230.17 | 3.18% | 2 | |
| 2024-08-26 | 2024-08-27 | $213.21 | $209.21 | -2.74% | 2 | |
| 2024-08-22 | 2024-08-23 | $210.66 | $220.32 | -4.67% | 2 | |
| 2024-08-20 | 2024-08-21 | $221.10 | $223.27 | -0.74% | 2 | |
| 2024-06-27 | 2024-08-02 | $197.42 | $207.67 | 8.63% | 26 | |
| 2024-05-14 | 2024-05-29 | $177.55 | $176.19 | 2.17% | 11 | |
| 2024-04-30 | 2024-05-10 | $183.28 | $168.47 | -9.32% | 9 | |
| 2024-04-15 | 2024-04-16 | $161.48 | $157.11 | -4.63% | 2 | |
| 2024-03-04 | 2024-03-05 | $188.14 | $180.74 | -5.88% | 2 | |
| 2024-02-29 | 2024-03-01 | $201.88 | $202.64 | -0.22% | 2 | |
| 2024-02-26 | 2024-02-27 | $199.40 | $199.73 | 2.93% | 2 | |
| 2023-11-29 | 2024-01-05 | $244.14 | $237.49 | -2.93% | 26 | |
| 2023-11-27 | 2023-11-28 | $236.08 | $246.72 | 0.05% | 2 | |
| 2023-11-21 | 2023-11-24 | $241.20 | $235.45 | -0.62% | 3 | |
| 2023-11-17 | 2023-11-20 | $234.30 | $235.60 | 0.08% | 2 | |
| 2023-09-12 | 2023-09-22 | $267.48 | $244.88 | -5.39% | 9 | |
| 2023-05-24 | 2023-07-24 | $182.90 | $269.06 | 31.11% | 41 | |
| 2022-09-19 | 2022-09-23 | $309.07 | $275.33 | -4.04% | 5 | |
| 2022-09-15 | 2022-09-16 | $303.75 | $303.35 | 0.14% | 2 | |
| 2022-09-13 | 2022-09-14 | $292.13 | $302.61 | -3.39% | 2 | |
| 2022-07-19 | 2022-08-29 | $245.53 | $284.82 | 15.63% | 30 | |
| 2022-07-14 | 2022-07-15 | $238.31 | $240.07 | 0.27% | 2 | |
| 2022-06-24 | 2022-06-27 | $245.71 | $244.92 | 3.46% | 2 | |
| 2022-06-22 | 2022-06-23 | $236.09 | $235.07 | -0.48% | 2 | |
| 2022-03-22 | 2022-04-21 | $331.33 | $336.26 | 4.92% | 22 | |
| 2022-01-13 | 2022-01-14 | $343.85 | $349.87 | -5.55% | 2 | |
| 2022-01-04 | 2022-01-07 | $383.20 | $342.32 | -9.22% | 4 | |
| 2021-12-30 | 2021-12-31 | $356.78 | $352.26 | -1.33% | 2 | |
| 2021-12-28 | 2021-12-29 | $362.82 | $362.06 | -0.56% | 2 | |
| 2021-08-02 | 2021-12-01 | $236.56 | $365.00 | 51.10% | 86 | |
| 2021-06-24 | 2021-07-23 | $226.61 | $214.46 | -0.99% | 21 | |
| 2021-06-22 | 2021-06-23 | $207.90 | $218.86 | 0.21% | 2 | |
| 2021-06-18 | 2021-06-21 | $207.77 | $206.94 | 0.71% | 2 | |
| 2021-06-14 | 2021-06-15 | $205.90 | $199.79 | 0.86% | 2 | |
| 2021-04-14 | 2021-04-30 | $244.08 | $236.48 | -9.14% | 13 | |
| 2021-04-07 | 2021-04-08 | $223.66 | $227.93 | -2.55% | 2 | |
| 2021-04-05 | 2021-04-06 | $230.35 | $230.54 | 3.38% | 2 | |
| 2020-11-19 | 2021-02-09 | $166.42 | $283.15 | 58.94% | 55 | |
| 2020-11-09 | 2020-11-10 | $140.42 | $136.79 | -1.78% | 2 | |
| 2020-10-14 | 2020-10-19 | $153.77 | $143.61 | -1.39% | 4 | |
| 2020-09-03 | 2020-09-24 | $135.67 | $129.26 | -11.49% | 15 | |
| 2020-04-14 | 2020-08-10 | $47.33 | $94.57 | 92.26% | 83 | |
| 2019-10-15 | 2020-03-04 | $17.19 | $49.97 | 138.37% | 97 | |
| 2019-10-02 | 2019-10-07 | $16.21 | $15.85 | -4.50% | 4 | |
| 2019-09-11 | 2019-09-25 | $16.47 | $15.25 | -4.29% | 11 | |
| 2019-04-04 | 2019-04-05 | $17.85 | $18.33 | -6.74% | 2 | |
| 2019-02-28 | 2019-03-04 | $21.33 | $19.02 | -5.20% | 3 | |
| 2019-01-18 | 2019-01-22 | $20.15 | $19.93 | -10.53% | 2 | |
| 2019-01-16 | 2019-01-17 | $23.07 | $23.15 | 0.22% | 2 | |
| 2019-01-11 | 2019-01-14 | $23.15 | $22.29 | 0.37% | 2 | |
| 2018-10-29 | 2018-12-18 | $22.32 | $22.47 | 4.21% | 35 | |
| 2018-10-04 | 2018-10-05 | $18.79 | $17.46 | -3.68% | 2 | |
| 2018-08-03 | 2018-08-20 | $23.21 | $20.56 | -10.18% | 12 | |
| 2018-06-07 | 2018-07-06 | $21.07 | $20.59 | -2.60% | 21 | |
| 2018-05-01 | 2018-05-02 | $19.99 | $20.08 | 1.48% | 2 | |
| 2018-04-27 | 2018-04-30 | $19.61 | $19.59 | 2.25% | 2 | |
| 2018-03-14 | 2018-03-15 | $21.78 | $21.71 | -3.72% | 2 | |
| 2018-03-05 | 2018-03-06 | $22.22 | $21.88 | -0.58% | 2 | |
| 2018-02-23 | 2018-03-01 | $23.47 | $22.06 | -0.87% | 5 | |
| 2018-01-18 | 2018-02-07 | $22.97 | $23.00 | -3.18% | 15 | |
| 2018-01-09 | 2018-01-12 | $22.25 | $22.41 | 0.21% | 4 | |
| 2017-12-12 | 2017-12-27 | $22.74 | $20.78 | -2.96% | 11 | |
| 2017-10-18 | 2017-10-19 | $23.98 | $23.45 | 0.72% | 2 | |
| 2017-10-16 | 2017-10-17 | $23.37 | $23.72 | -1.28% | 2 | |
| 2017-10-12 | 2017-10-13 | $23.71 | $23.70 | 0.08% | 2 | |
| 2017-09-18 | 2017-09-25 | $25.67 | $23.00 | -6.22% | 6 | |
| 2017-08-04 | 2017-08-21 | $23.79 | $22.52 | -0.04% | 12 | |
| 2017-07-27 | 2017-07-28 | $22.30 | $22.34 | -2.34% | 2 | |