LongTermTrend_V0636
ARCHIVEDhybridllm- Added a strict uptrend regime gate and disallowed high-volatility/bubble environments to reduce false entries in poor regimes.
- Strengthened long-term branch by requiring sma_50 > sma_200 and capping RSI (<75) to avoid overbought entries.
- Made breakout branch more accessible by lowering rel_volume threshold (1.5) to increase valid breakout captures while keeping MACD confirmation.
- Improved exit logic: exit on MACD flip OR volatility spike (true_range crossing above atr_14) OR large drawdown (>15%) to limit big losses.
- Reduced base_position from 1.0 to 0.7 to lower overall risk and drawdown.
Lineage
Parents (1)
changed rel_volume threshold 1.5045 -> 2.0784
Strategy Logic (pseudocode)
# LongTermTrend_V0636 [hybrid]
require regime.volatility in ['LOW_VOLATILITY', 'MEDIUM_VOLATILITY']
if flat and ((((close > sma_200 and sma_200_slope > -0.0024) or ret_20d > 0.085) and ret_20d > 0.05 and cumret_252d > -0.1997 and dist_sma_50 > -0.0774 and sma_50 > sma_200 and rsi_14 < 75.0) or ((macd_hist > 0.0 and close > sma_50) or (breakout_50 == 1 and rel_volume > 1.5) or ((macd_hist > 0.0 and close > sma_50) and sma_50 > sma_200))):
position = 0.7
if long and (macd_hist < 0.0 or true_range > atr_14 or drawdown > 0.15):
position = 0.0 # exit to cashBacktest Metrics
| Metric | Train | Validation | Hidden Test | Full |
|---|
| CAGR | 0.9% | 28.1% | -2.0% | 5.3% |
| Total Return | 7.7% | 110.1% | -7.3% | 114.0% |
| Sharpe | 0.14 | 1.33 | -0.06 | 0.40 |
| Sortino | 0.10 | 1.62 | -0.05 | 0.34 |
| Calmar | 0.03 | 2.25 | -0.07 | 0.18 |
| Volatility | 14.8% | 20.2% | 15.2% | 16.1% |
| Max DD | -29.5% | -12.5% | -27.1% | -29.5% |
| Win Rate | 51.2% | 58.4% | 48.1% | 52.2% |
| Avg Win | 2.1% | 2.9% | 2.4% | 2.4% |
| Avg Loss | -2.0% | -2.2% | -2.2% | -2.1% |
| Payoff | 1.03 | 1.32 | 1.05 | 1.12 |
| Expectancy | 0.1% | 0.8% | -0.0% | 0.2% |
| Profit Factor | 1.08 | 1.85 | 0.97 | 1.22 |
| Trades | 213 | 101 | 104 | 418 |
| Avg Holding Days | 2.9 | 2.8 | 2.8 | 2.8 |
| Turnover | 37.3 | 47.1 | 39.5 | 39.9 |
| Exposure | 14.1% | 16.4% | 14.2% | 14.6% |
Growth of $100
LongTermTrend_V0636 vs TSLA Buy & Hold
LongTermTrend_V0636 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.1% | 1.10 | -5.1% | 17 |
| 2017 | 7.4% | 0.61 | -9.4% | 44 |
| 2018 | -4.5% | -0.66 | -7.5% | 11 |
| 2019 | 12.4% | 0.73 | -10.3% | 22 |
| 2020 | 65.2% | 2.27 | -7.8% | 36 |
| 2021 | 3.3% | 0.27 | -12.5% | 43 |
| 2022 | 12.4% | 0.79 | -10.3% | 20 |
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 | 270 | -4.5% | -0.58 | 5% |
| hidden test | EXPENSIVE | 83 | 22.4% | 1.39 | 16% |
| hidden test | EXTREME | 48 | 44.8% | 3.50 | 6% |
| hidden test | HIGH VOLATILITY | 254 | -7.7% | -0.64 | 1% |
| hidden test | LOW VOLATILITY | 430 | 19.0% | 1.30 | 19% |
| hidden test | MEDIUM VOLATILITY | 250 | -28.3% | -1.53 | 18% |
| hidden test | NORMAL | 803 | -6.0% | -0.40 | 15% |
| hidden test | SIDEWAYS | 293 | -21.6% | -1.34 | 21% |
| hidden test | UPTREND | 371 | 18.2% | 1.00 | 15% |
| train | DOWNTREND | 518 | -7.9% | -0.83 | 7% |
| train | EXPENSIVE | 311 | 0.9% | 0.05 | 19% |
| train | EXTREME | 100 | 54.5% | 3.26 | 14% |
| train | HIGH VOLATILITY | 699 | 1.2% | 0.09 | 1% |
| train | LOW VOLATILITY | 745 | 10.1% | 0.70 | 24% |
| train | MEDIUM VOLATILITY | 568 | -7.7% | -0.47 | 17% |
| train | NORMAL | 1,601 | -1.0% | -0.07 | 13% |
| train | SIDEWAYS | 592 | 6.3% | 0.48 | 14% |
| train | UPTREND | 902 | 4.9% | 0.27 | 18% |
| validation | DOWNTREND | 125 | 17.5% | 1.16 | 4% |
| validation | EXPENSIVE | 138 | 15.8% | 0.69 | 23% |
| validation | EXTREME | 144 | 92.4% | 3.89 | 11% |
| validation | HIGH VOLATILITY | 258 | 25.0% | 1.62 | 2% |
| validation | LOW VOLATILITY | 183 | 11.9% | 0.85 | 25% |
| validation | MEDIUM VOLATILITY | 315 | 36.8% | 1.42 | 24% |
| validation | NORMAL | 474 | 10.0% | 0.56 | 16% |
| validation | SIDEWAYS | 206 | -0.8% | -0.05 | 13% |
| validation | UPTREND | 425 | 42.8% | 1.83 | 21% |
Trades (full period)
latest 100 of 419
| Entry | Exit | Entry Px | Exit Px | Return | Days | |
|---|
| 2026-09-23 | — | — | — | -0.07% | 1 | OPEN |
| 2026-09-18 | 2026-09-22 | $364.27 | $378.90 | 1.60% | 3 | |
| 2026-09-09 | 2026-09-17 | $367.81 | $366.20 | -2.06% | 7 | |
| 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-01 | 2026-07-06 | $425.30 | $419.77 | -4.63% | 3 | |
| 2026-05-28 | 2026-06-02 | $442.10 | $423.74 | -4.03% | 4 | |
| 2026-05-19 | 2026-05-21 | $404.11 | $417.85 | 1.11% | 3 | |
| 2026-05-14 | 2026-05-18 | $443.30 | $409.99 | -3.76% | 3 | |
| 2026-05-12 | 2026-05-13 | $433.45 | $445.27 | -1.96% | 2 | |
| 2026-05-08 | 2026-05-11 | $428.35 | $445.00 | 2.67% | 2 | |
| 2026-05-04 | 2026-05-07 | $392.51 | $411.79 | 1.28% | 4 | |
| 2026-04-21 | 2026-04-24 | $386.42 | $376.30 | -3.49% | 4 | |
| 2026-04-16 | 2026-04-20 | $388.90 | $392.50 | 1.41% | 3 | |
| 2025-12-31 | 2026-01-02 | $449.72 | $438.07 | -0.86% | 2 | |
| 2025-12-22 | 2025-12-30 | $488.73 | $454.43 | -3.27% | 6 | |
| 2025-12-18 | 2025-12-19 | $483.37 | $481.20 | 2.27% | 2 | |
| 2025-12-16 | 2025-12-17 | $489.88 | $467.26 | 2.00% | 2 | |
| 2025-12-10 | 2025-12-15 | $451.45 | $475.31 | 2.03% | 4 | |
| 2025-12-04 | 2025-12-09 | $454.53 | $445.17 | -1.25% | 4 | |
| 2025-11-06 | 2025-11-07 | $445.91 | $429.52 | -2.59% | 2 | |
| 2025-11-03 | 2025-11-04 | $468.37 | $444.26 | 1.67% | 2 | |
| 2025-10-24 | 2025-10-27 | $433.72 | $452.42 | -2.52% | 2 | |
| 2025-10-14 | 2025-10-15 | $429.24 | $435.15 | -1.21% | 2 | |
| 2025-10-09 | 2025-10-10 | $435.54 | $413.49 | -0.64% | 2 | |
| 2025-10-07 | 2025-10-08 | $433.09 | $438.69 | -3.25% | 2 | |
| 2025-10-03 | 2025-10-06 | $429.83 | $453.25 | -1.13% | 2 | |
| 2025-09-30 | 2025-10-02 | $444.72 | $436.00 | 2.42% | 3 | |
| 2025-09-26 | 2025-09-29 | $440.40 | $443.21 | 2.67% | 2 | |
| 2025-09-24 | 2025-09-25 | $442.79 | $423.39 | 2.64% | 2 | |
| 2025-09-19 | 2025-09-23 | $426.07 | $425.85 | 2.76% | 3 | |
| 2025-09-17 | 2025-09-18 | $425.86 | $416.85 | 0.56% | 2 | |
| 2025-09-15 | 2025-09-16 | $410.04 | $421.62 | 2.35% | 2 | |
| 2025-09-10 | 2025-09-12 | $347.79 | $395.94 | 4.26% | 3 | |
| 2025-09-08 | 2025-09-09 | $346.40 | $346.97 | -1.03% | 2 | |
| 2025-09-02 | 2025-09-03 | $329.36 | $334.09 | -1.08% | 2 | |
| 2025-08-27 | 2025-08-29 | $349.60 | $333.87 | -1.27% | 3 | |
| 2025-08-25 | 2025-08-26 | $346.60 | $351.67 | 1.22% | 2 | |
| 2025-08-21 | 2025-08-22 | $320.11 | $340.01 | -0.96% | 2 | |
| 2025-08-12 | 2025-08-20 | $340.84 | $323.90 | -2.14% | 7 | |
| 2025-08-08 | 2025-08-11 | $329.65 | $339.03 | 1.46% | 2 | |
| 2025-07-29 | 2025-08-01 | $321.20 | $302.63 | -3.88% | 4 | |
| 2025-07-24 | 2025-07-25 | $305.30 | $316.06 | -5.87% | 2 | |
| 2025-07-21 | 2025-07-23 | $328.49 | $332.56 | 0.38% | 3 | |
| 2025-05-29 | 2025-06-02 | $358.43 | $342.69 | -2.18% | 3 | |
| 2025-05-19 | 2025-05-28 | $342.09 | $356.90 | 2.49% | 7 | |
| 2025-05-12 | 2025-05-13 | $318.38 | $334.07 | 4.58% | 2 | |
| 2024-12-19 | 2024-12-20 | $436.17 | $421.06 | -0.77% | 2 | |
| 2024-12-17 | 2024-12-18 | $479.86 | $440.13 | 2.40% | 2 | |
| 2024-12-13 | 2024-12-16 | $436.23 | $463.02 | 2.89% | 2 | |
| 2024-12-11 | 2024-12-12 | $424.77 | $418.10 | 4.01% | 2 | |
| 2024-10-09 | 2024-10-10 | $241.05 | $238.77 | -1.13% | 2 | |
| 2024-10-07 | 2024-10-08 | $240.83 | $244.50 | -2.73% | 2 | |
| 2024-10-03 | 2024-10-04 | $240.66 | $250.08 | -2.49% | 2 | |
| 2024-09-30 | 2024-10-02 | $261.63 | $249.02 | -0.79% | 3 | |
| 2024-09-25 | 2024-09-27 | $257.02 | $260.46 | -0.15% | 3 | |
| 2024-09-23 | 2024-09-24 | $250.00 | $254.27 | 3.31% | 2 | |
| 2024-09-16 | 2024-09-20 | $226.78 | $238.25 | 4.02% | 5 | |
| 2024-09-06 | 2024-09-09 | $210.73 | $216.27 | -6.05% | 2 | |
| 2024-09-04 | 2024-09-05 | $219.41 | $230.17 | 2.79% | 2 | |
| 2024-07-11 | 2024-07-12 | $241.03 | $248.23 | -6.05% | 2 | |
| 2024-07-09 | 2024-07-10 | $262.33 | $263.26 | 2.46% | 2 | |
| 2024-07-05 | 2024-07-08 | $251.52 | $252.94 | 1.32% | 2 | |
| 2024-07-02 | 2024-07-03 | $231.26 | $246.39 | 6.99% | 2 | |
| 2024-06-28 | 2024-07-01 | $197.88 | $209.86 | 0.02% | 2 | |
| 2024-06-20 | 2024-06-27 | $181.57 | $197.42 | 4.21% | 6 | |
| 2024-06-17 | 2024-06-18 | $187.44 | $184.86 | 3.57% | 2 | |
| 2024-05-29 | 2024-05-30 | $176.19 | $178.79 | -0.36% | 2 | |
| 2023-12-22 | 2023-12-29 | $252.54 | $248.48 | -0.49% | 5 | |
| 2023-12-15 | 2023-12-21 | $253.50 | $254.50 | -1.21% | 5 | |
| 2023-12-07 | 2023-12-14 | $242.64 | $251.05 | -0.16% | 6 | |
| 2023-11-30 | 2023-12-06 | $240.08 | $239.37 | -1.69% | 5 | |
| 2023-11-27 | 2023-11-29 | $236.08 | $244.14 | 3.20% | 3 | |
| 2023-11-20 | 2023-11-24 | $235.60 | $235.45 | -0.15% | 4 | |
| 2023-11-16 | 2023-11-17 | $233.59 | $234.30 | -2.80% | 2 | |
| 2023-10-12 | 2023-10-17 | $258.87 | $254.85 | -2.55% | 4 | |
| 2023-10-10 | 2023-10-11 | $263.62 | $262.99 | 0.92% | 2 | |
| 2023-10-06 | 2023-10-09 | $260.53 | $259.67 | -0.01% | 2 | |
| 2023-09-22 | 2023-09-25 | $244.88 | $246.99 | -3.10% | 2 | |
| 2023-09-12 | 2023-09-21 | $267.48 | $255.70 | -2.94% | 8 | |
| 2023-09-06 | 2023-09-07 | $251.92 | $251.49 | -1.39% | 2 | |
| 2023-08-30 | 2023-09-05 | $256.90 | $256.49 | -3.44% | 4 | |
| 2023-07-26 | 2023-07-27 | $264.35 | $255.71 | -0.39% | 2 | |
| 2023-07-20 | 2023-07-21 | $262.90 | $260.02 | -6.95% | 2 | |
| 2023-07-18 | 2023-07-19 | $293.34 | $291.26 | 0.57% | 2 | |
| 2023-07-14 | 2023-07-17 | $281.38 | $290.38 | 0.74% | 2 | |
| 2023-07-12 | 2023-07-13 | $271.99 | $277.90 | 0.43% | 2 | |
| 2023-07-10 | 2023-07-11 | $269.61 | $269.79 | -1.37% | 2 | |
| 2023-07-05 | 2023-07-07 | $282.48 | $274.43 | -0.95% | 3 | |
| 2023-06-30 | 2023-07-03 | $261.77 | $279.82 | 1.02% | 2 | |
| 2023-06-28 | 2023-06-29 | $256.24 | $257.50 | 1.55% | 2 | |
| 2023-06-26 | 2023-06-27 | $241.05 | $250.21 | -4.38% | 2 | |
| 2023-06-22 | 2023-06-23 | $264.61 | $256.60 | 1.25% | 2 | |
| 2023-06-20 | 2023-06-21 | $274.45 | $259.46 | 3.59% | 2 | |
| 2023-06-15 | 2023-06-16 | $255.90 | $260.54 | -0.38% | 2 | |
| 2023-06-12 | 2023-06-14 | $249.83 | $256.79 | 3.94% | 3 | |
| 2023-06-08 | 2023-06-09 | $234.86 | $244.40 | 3.07% | 2 | |
| 2023-06-06 | 2023-06-07 | $221.31 | $224.57 | 1.05% | 2 | |
| 2023-06-02 | 2023-06-05 | $213.97 | $217.61 | 2.03% | 2 | |
| 2023-05-31 | 2023-06-01 | $203.93 | $207.52 | 0.82% | 2 | |