Strategy Zoo / S0989
LongTermTrend_V0989
ARCHIVEDhybridllmAdded regime gates to limit trading to uptrends and non-extreme volatility/bubble conditions; introduced a multi-factor exit (20d loss threshold, close below SMA50, and portfolio drawdown trigger) for stronger risk control; implemented position scaling rules to reduce size in high volatility or near-52w-high states and to allow full size when long-term slope is strongly positive; lowered base position to be more conservative.
Fitness
0.2952
Generation
45
Complexity
33
Created
2026-10-01
Lineage
Parents (1)
entry from LongTermTrend_V0663, exit from PriceMomentum_V0640
Children (0)
None
Strategy Logic (pseudocode)
# LongTermTrend_V0989 [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_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) or ((macd_hist > 0.0 and close > sma_50) or ((breakout_50 == 1 and rel_volume > 1.5045) or ((macd_hist > 0.0 and close > sma_50) and sma_50 > sma_200)))) and sma_20 < close and rsi_14 > 34.4934):
position = 0.8
if long and (ret_20d < -0.02 or close < sma_50 or drawdown < -0.12):
position = 0.0 # exit to cashBacktest Metrics
| Metric | Train | Validation | Hidden Test | Full |
|---|---|---|---|---|
| CAGR | 1.6% | 25.7% | -3.3% | 5.0% |
| Total Return | 13.7% | 98.4% | -11.7% | 103.9% |
| Sharpe | 0.18 | 1.30 | -0.15 | 0.39 |
| Sortino | 0.12 | 0.99 | -0.08 | 0.25 |
| Calmar | 0.07 | 0.77 | -0.16 | 0.12 |
| Volatility | 14.3% | 19.0% | 14.7% | 15.5% |
| Max DD | -23.4% | -33.1% | -20.8% | -41.4% |
| Win Rate | 38.8% | 45.9% | 47.9% | 43.4% |
| Avg Win | 3.2% | 7.1% | 2.4% | 4.2% |
| Avg Loss | -1.9% | -1.9% | -2.6% | -2.1% |
| Payoff | 1.71 | 3.66 | 0.92 | 2.00 |
| Expectancy | 0.1% | 2.2% | -0.2% | 0.6% |
| Profit Factor | 1.08 | 3.11 | 0.85 | 1.54 |
| Trades | 67 | 37 | 48 | 152 |
| Avg Holding Days | 5.6 | 4.7 | 3.1 | 4.7 |
| Turnover | 13.5 | 19.7 | 20.6 | 16.5 |
| Exposure | 12.8% | 14.4% | 8.8% | 12.1% |
Growth of $100
LongTermTrend_V0989 vs TSLA Buy & Hold
LongTermTrend_V0989 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.5% | -0.85 | -10.7% | 11 |
| 2017 | 12.7% | 0.81 | -10.3% | 21 |
| 2018 | -7.5% | -0.99 | -8.6% | 2 |
| 2019 | 6.1% | 0.69 | -6.2% | 2 |
| 2020 | 70.6% | 2.69 | -7.1% | 5 |
| 2021 | 35.5% | 1.41 | -19.8% | 22 |
| 2022 | -16.7% | -1.90 | -19.1% | 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 | 275 | 0.0% | 0.00 | 0% |
| hidden test | EXPENSIVE | 83 | 33.7% | 1.11 | 40% |
| hidden test | EXTREME | 48 | 0.0% | 0.00 | 0% |
| hidden test | HIGH VOLATILITY | 254 | -14.0% | -1.45 | 1% |
| hidden test | LOW VOLATILITY | 434 | 6.0% | 0.52 | 9% |
| hidden test | MEDIUM VOLATILITY | 251 | -4.7% | -0.21 | 16% |
| hidden test | NORMAL | 808 | -6.1% | -0.48 | 6% |
| hidden test | SIDEWAYS | 293 | -5.0% | -1.26 | 1% |
| hidden test | UPTREND | 371 | -1.7% | -0.08 | 22% |
| train | DOWNTREND | 518 | 0.0% | 0.00 | 0% |
| train | EXPENSIVE | 311 | 39.4% | 1.69 | 30% |
| train | EXTREME | 100 | 9.3% | 1.55 | 1% |
| train | HIGH VOLATILITY | 699 | 8.2% | 0.67 | 1% |
| train | LOW VOLATILITY | 745 | 13.5% | 0.88 | 24% |
| train | MEDIUM VOLATILITY | 568 | -18.5% | -1.20 | 12% |
| train | NORMAL | 1,601 | -4.9% | -0.40 | 10% |
| train | SIDEWAYS | 592 | -3.4% | -1.06 | 1% |
| train | UPTREND | 902 | 8.1% | 0.38 | 28% |
| validation | DOWNTREND | 125 | 0.0% | 0.00 | 0% |
| validation | EXPENSIVE | 138 | 95.3% | 3.13 | 41% |
| validation | EXTREME | 144 | 37.8% | 2.61 | 2% |
| validation | HIGH VOLATILITY | 258 | -6.5% | -0.66 | 1% |
| validation | LOW VOLATILITY | 183 | 14.8% | 1.14 | 21% |
| validation | MEDIUM VOLATILITY | 315 | 55.9% | 2.14 | 22% |
| validation | NORMAL | 474 | 0.1% | 0.00 | 10% |
| validation | SIDEWAYS | 206 | -11.0% | -1.58 | 1% |
| validation | UPTREND | 425 | 49.2% | 1.98 | 25% |
Trades (full period)
latest 100 of 152
| Entry | Exit | Entry Px | Exit Px | Return | Days | |
|---|---|---|---|---|---|---|
| 2026-07-01 | 2026-07-02 | $425.30 | $393.45 | 0.73% | 2 | |
| 2026-05-29 | 2026-06-01 | $435.79 | $415.88 | -1.30% | 2 | |
| 2025-12-04 | 2026-01-05 | $454.53 | $451.67 | -1.63% | 21 | |
| 2025-10-14 | 2025-11-14 | $429.24 | $404.35 | -6.25% | 24 | |
| 2025-09-22 | 2025-10-13 | $434.21 | $435.90 | -2.39% | 16 | |
| 2025-09-18 | 2025-09-19 | $416.85 | $426.07 | -1.85% | 2 | |
| 2025-09-16 | 2025-09-17 | $421.62 | $425.86 | 2.10% | 2 | |
| 2025-09-12 | 2025-09-15 | $395.94 | $410.04 | 5.72% | 2 | |
| 2025-07-29 | 2025-07-30 | $321.20 | $319.04 | -1.24% | 2 | |
| 2025-07-23 | 2025-07-24 | $332.56 | $305.30 | -0.05% | 2 | |
| 2025-07-21 | 2025-07-22 | $328.49 | $332.11 | -0.44% | 2 | |
| 2025-06-04 | 2025-06-05 | $332.05 | $284.70 | -3.00% | 2 | |
| 2025-06-02 | 2025-06-03 | $342.69 | $344.27 | -1.03% | 2 | |
| 2025-05-29 | 2025-05-30 | $358.43 | $346.46 | 0.18% | 2 | |
| 2025-05-27 | 2025-05-28 | $362.89 | $356.90 | 5.39% | 2 | |
| 2025-05-22 | 2025-05-23 | $341.04 | $339.34 | 1.37% | 2 | |
| 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-25 | 2024-09-26 | $257.02 | $254.22 | 0.70% | 2 | |
| 2024-09-23 | 2024-09-24 | $250.00 | $254.27 | 3.78% | 2 | |
| 2024-09-18 | 2024-09-19 | $227.20 | $243.92 | -0.40% | 2 | |
| 2024-09-16 | 2024-09-17 | $226.78 | $227.87 | -1.38% | 2 | |
| 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-07-11 | 2024-07-12 | $241.03 | $248.23 | -6.91% | 2 | |
| 2024-07-09 | 2024-07-10 | $262.33 | $263.26 | 2.81% | 2 | |
| 2024-07-05 | 2024-07-08 | $251.52 | $252.94 | 1.50% | 2 | |
| 2024-07-02 | 2024-07-03 | $231.26 | $246.39 | 7.99% | 2 | |
| 2023-09-01 | 2023-09-05 | $245.01 | $256.49 | -4.21% | 2 | |
| 2023-08-30 | 2023-08-31 | $256.90 | $258.08 | -0.25% | 2 | |
| 2023-07-20 | 2023-07-21 | $262.90 | $260.02 | -7.94% | 2 | |
| 2023-07-18 | 2023-07-19 | $293.34 | $291.26 | 0.65% | 2 | |
| 2023-07-14 | 2023-07-17 | $281.38 | $290.38 | 0.84% | 2 | |
| 2023-07-12 | 2023-07-13 | $271.99 | $277.90 | 0.49% | 2 | |
| 2023-07-10 | 2023-07-11 | $269.61 | $269.79 | -1.56% | 2 | |
| 2023-07-06 | 2023-07-07 | $276.54 | $274.43 | -1.84% | 2 | |
| 2023-07-03 | 2023-07-05 | $279.82 | $282.48 | 5.35% | 2 | |
| 2023-06-29 | 2023-06-30 | $257.50 | $261.77 | 0.23% | 2 | |
| 2023-06-27 | 2023-06-28 | $250.21 | $256.24 | 2.88% | 2 | |
| 2023-06-23 | 2023-06-26 | $256.60 | $241.05 | -2.58% | 2 | |
| 2023-06-21 | 2023-06-22 | $259.46 | $264.61 | -4.53% | 2 | |
| 2023-06-16 | 2023-06-20 | $260.54 | $274.45 | 1.29% | 2 | |
| 2023-06-14 | 2023-06-15 | $256.79 | $255.90 | -0.75% | 2 | |
| 2023-06-12 | 2023-06-13 | $249.83 | $258.71 | 1.62% | 2 | |
| 2023-06-08 | 2023-06-09 | $234.86 | $244.40 | 3.50% | 2 | |
| 2023-06-06 | 2023-06-07 | $221.31 | $224.57 | 1.20% | 2 | |
| 2023-06-02 | 2023-06-05 | $213.97 | $217.61 | 2.32% | 2 | |
| 2022-09-21 | 2022-09-22 | $300.80 | $288.59 | -2.21% | 2 | |
| 2022-09-19 | 2022-09-20 | $309.07 | $308.73 | 1.35% | 2 | |
| 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-08-18 | 2022-08-19 | $302.87 | $296.67 | -0.46% | 2 | |
| 2022-08-16 | 2022-08-17 | $306.56 | $304.00 | -0.87% | 2 | |
| 2022-08-05 | 2022-08-08 | $288.17 | $290.42 | -5.46% | 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-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-11-23 | 2021-11-29 | $369.68 | $379.00 | -5.35% | 4 | |
| 2021-10-04 | 2021-11-10 | $260.51 | $355.98 | 25.18% | 28 | |
| 2021-09-27 | 2021-10-01 | $263.79 | $258.41 | -0.04% | 5 | |
| 2021-09-23 | 2021-09-24 | $251.21 | $258.13 | 0.02% | 2 | |
| 2021-09-17 | 2021-09-20 | $253.16 | $243.39 | 0.10% | 2 | |
| 2021-09-15 | 2021-09-16 | $251.94 | $252.33 | 1.06% | 2 | |
| 2021-09-13 | 2021-09-14 | $247.67 | $248.16 | 0.57% | 2 | |
| 2021-09-09 | 2021-09-10 | $251.62 | $245.42 | -0.06% | 2 | |
| 2021-09-07 | 2021-09-08 | $250.97 | $251.29 | 1.95% | 2 | |
| 2021-09-02 | 2021-09-03 | $244.13 | $244.52 | -0.35% | 2 | |
| 2021-08-31 | 2021-09-01 | $245.24 | $244.70 | 0.37% | 2 | |
| 2021-08-26 | 2021-08-27 | $233.72 | $237.31 | -1.29% | 2 | |
| 2021-08-24 | 2021-08-25 | $236.16 | $237.07 | 0.09% | 2 | |
| 2021-08-19 | 2021-08-20 | $224.49 | $226.75 | -1.96% | 2 | |
| 2021-08-13 | 2021-08-16 | $239.06 | $228.72 | -0.72% | 2 | |
| 2021-08-11 | 2021-08-12 | $235.94 | $240.75 | -0.40% | 2 | |
| 2021-08-09 | 2021-08-10 | $237.92 | $236.66 | 1.52% | 2 | |
| 2021-08-05 | 2021-08-06 | $238.21 | $233.03 | 0.26% | 2 | |
| 2021-01-12 | 2021-02-11 | $283.15 | $270.55 | -0.64% | 22 | |
| 2020-12-10 | 2021-01-11 | $209.02 | $270.40 | 35.18% | 21 | |
| 2020-11-19 | 2020-12-08 | $166.42 | $216.63 | 24.77% | 13 | |
| 2020-11-09 | 2020-11-10 | $140.42 | $136.79 | -1.78% | 2 | |
| 2020-10-13 | 2020-10-20 | $148.88 | $140.65 | -2.21% | 6 | |
| 2020-06-25 | 2020-06-30 | $65.73 | $71.99 | 3.89% | 4 | |
| 2019-12-16 | 2020-01-22 | $25.43 | $37.97 | 40.42% | 25 | |
| 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-29 | 2018-12-19 | $22.74 | $22.20 | -2.60% | 14 | |
| 2018-02-01 | 2018-02-06 | $23.28 | $22.26 | -4.95% | 4 | |
| 2017-10-18 | 2017-10-19 | $23.98 | $23.45 | 0.72% | 2 | |
| 2017-10-13 | 2017-10-16 | $23.70 | $23.37 | -0.18% | 2 | |
| 2017-09-18 | 2017-09-26 | $25.67 | $23.02 | -7.53% | 7 | |
| 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-05 | 2017-06-14 | $23.15 | $25.38 | 8.28% | 8 | |
| 2017-05-12 | 2017-05-19 | $21.65 | $20.72 | -2.63% | 6 | |
| 2017-04-24 | 2017-05-10 | $20.54 | $21.68 | 3.99% | 13 | |
| 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-21 | $17.46 | $16.71 | -0.03% | 2 |