Strategy Zoo / S1374
LongTermTrend_V1374
ARCHIVEDhybridllmAdded regime gate to avoid entering in strong downtrends and extreme bubble states; introduced volatility-based position scaling (vol_pctile) to reduce size in high-volatility periods; strengthened entry by blocking very negative MACD pulses (not macd_hist < -1.5); improved exit to include either negative MACD, sharp drawdown (drawdown < -15%), or price crossing below sma_50 to limit large losses.
Fitness
0.2589
Generation
63
Complexity
35
Created
2026-10-09
Lineage
Parents (1)
changed cumret_252d threshold -0.1997 -> -0.4599
Children (0)
None
Strategy Logic (pseudocode)
# LongTermTrend_V1374 [hybrid]
require regime.trend in ['UPTREND', 'SIDEWAYS']
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.4599 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 macd_hist > -2.6055) and not macd_hist < -1.5):
position = 1.0
if long and (macd_hist < 0.0 or drawdown < -0.15 or close < sma_50):
position = 0.0 # exit to cashBacktest Metrics
| Metric | Train | Validation | Hidden Test | Full |
|---|---|---|---|---|
| CAGR | -1.0% | 27.8% | -7.7% | 2.6% |
| Total Return | -7.7% | 108.6% | -26.1% | 46.6% |
| Sharpe | 0.07 | 1.12 | -0.23 | 0.23 |
| Sortino | 0.06 | 0.98 | -0.19 | 0.19 |
| Calmar | -0.02 | 0.80 | -0.18 | 0.04 |
| Volatility | 23.3% | 24.6% | 23.2% | 23.6% |
| Max DD | -58.2% | -34.8% | -43.7% | -62.5% |
| Win Rate | 40.6% | 54.3% | 44.4% | 44.4% |
| Avg Win | 3.5% | 4.5% | 3.1% | 3.7% |
| Avg Loss | -2.4% | -2.5% | -2.7% | -2.5% |
| Payoff | 1.44 | 1.83 | 1.11 | 1.47 |
| Expectancy | -0.0% | 1.3% | -0.2% | 0.2% |
| Profit Factor | 0.99 | 2.17 | 0.89 | 1.17 |
| Trades | 187 | 70 | 124 | 381 |
| Avg Holding Days | 3.8 | 3.3 | 2.3 | 3.3 |
| Turnover | 47.0 | 46.7 | 66.1 | 51.7 |
| Exposure | 26.9% | 20.9% | 17.5% | 23.3% |
Growth of $100
LongTermTrend_V1374 vs TSLA Buy & Hold
LongTermTrend_V1374 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 | -6.9% | -0.53 | -12.9% | 24 |
| 2017 | 4.5% | 0.31 | -15.1% | 28 |
| 2018 | -19.2% | -0.77 | -25.7% | 12 |
| 2019 | 2.3% | 0.22 | -23.4% | 20 |
| 2020 | 96.6% | 2.66 | -8.8% | 12 |
| 2021 | 30.0% | 1.06 | -19.8% | 38 |
| 2022 | -18.5% | -1.16 | -18.6% | 18 |
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 | 278 | -2.1% | -1.04 | 0% |
| hidden test | EXPENSIVE | 83 | 88.5% | 2.06 | 39% |
| hidden test | EXTREME | 48 | 46.8% | 3.10 | 4% |
| hidden test | HIGH VOLATILITY | 254 | -20.3% | -0.66 | 13% |
| hidden test | LOW VOLATILITY | 441 | 15.2% | 0.80 | 22% |
| hidden test | MEDIUM VOLATILITY | 250 | -26.7% | -1.26 | 15% |
| hidden test | NORMAL | 814 | -18.0% | -0.88 | 16% |
| hidden test | SIDEWAYS | 296 | -28.3% | -1.19 | 23% |
| hidden test | UPTREND | 371 | 10.4% | 0.34 | 26% |
| train | DOWNTREND | 518 | -9.4% | -1.35 | 1% |
| train | EXPENSIVE | 311 | 60.7% | 1.95 | 53% |
| train | EXTREME | 100 | 56.1% | 2.31 | 4% |
| train | HIGH VOLATILITY | 699 | 12.0% | 0.43 | 24% |
| train | LOW VOLATILITY | 745 | 12.3% | 0.63 | 34% |
| train | MEDIUM VOLATILITY | 568 | -24.9% | -1.17 | 22% |
| train | NORMAL | 1,601 | -13.2% | -0.62 | 23% |
| train | SIDEWAYS | 592 | 0.4% | 0.02 | 27% |
| train | UPTREND | 902 | 8.9% | 0.29 | 42% |
| validation | DOWNTREND | 125 | 0.0% | 0.00 | 0% |
| validation | EXPENSIVE | 138 | 117.5% | 3.29 | 40% |
| validation | EXTREME | 144 | 47.1% | 2.61 | 3% |
| validation | HIGH VOLATILITY | 258 | -26.5% | -1.69 | 3% |
| validation | LOW VOLATILITY | 183 | 9.4% | 0.50 | 33% |
| validation | MEDIUM VOLATILITY | 315 | 82.3% | 2.56 | 28% |
| validation | NORMAL | 474 | -4.6% | -0.21 | 21% |
| validation | SIDEWAYS | 206 | 3.3% | 0.26 | 15% |
| validation | UPTREND | 425 | 47.3% | 1.50 | 30% |
Trades (full period)
latest 100 of 381
| Entry | Exit | Entry Px | Exit Px | Return | Days | |
|---|---|---|---|---|---|---|
| 2026-10-07 | 2026-10-08 | $377.81 | $375.00 | -0.95% | 2 | |
| 2026-07-07 | 2026-07-08 | $402.90 | $394.06 | -4.21% | 2 | |
| 2026-07-01 | 2026-07-06 | $425.30 | $419.77 | -6.64% | 3 | |
| 2026-05-27 | 2026-06-02 | $440.36 | $423.74 | -4.27% | 5 | |
| 2026-05-22 | 2026-05-26 | $426.01 | $433.59 | 1.75% | 2 | |
| 2026-05-20 | 2026-05-21 | $417.26 | $417.85 | 3.05% | 2 | |
| 2026-05-08 | 2026-05-19 | $428.35 | $404.11 | -0.63% | 8 | |
| 2026-04-20 | 2026-04-21 | $392.50 | $386.42 | -2.22% | 2 | |
| 2025-12-04 | 2025-12-30 | $454.53 | $454.43 | 2.68% | 18 | |
| 2025-11-06 | 2025-11-07 | $445.91 | $429.52 | -3.69% | 2 | |
| 2025-11-03 | 2025-11-05 | $468.37 | $462.07 | -2.89% | 3 | |
| 2025-10-07 | 2025-10-08 | $433.09 | $438.69 | -4.64% | 2 | |
| 2025-09-15 | 2025-10-06 | $410.04 | $453.25 | 8.35% | 16 | |
| 2025-09-11 | 2025-09-12 | $368.81 | $395.94 | 5.84% | 2 | |
| 2025-09-09 | 2025-09-10 | $346.97 | $347.79 | -0.04% | 2 | |
| 2025-09-05 | 2025-09-08 | $350.84 | $346.40 | 3.43% | 2 | |
| 2025-08-29 | 2025-09-02 | $333.87 | $329.36 | -3.70% | 2 | |
| 2025-08-27 | 2025-08-28 | $349.60 | $345.98 | -0.79% | 2 | |
| 2025-08-25 | 2025-08-26 | $346.60 | $351.67 | 1.74% | 2 | |
| 2025-08-19 | 2025-08-20 | $329.31 | $323.90 | -1.94% | 2 | |
| 2025-08-15 | 2025-08-18 | $330.56 | $335.16 | -1.69% | 2 | |
| 2025-08-13 | 2025-08-14 | $339.38 | $335.58 | -0.63% | 2 | |
| 2025-08-11 | 2025-08-12 | $339.03 | $340.84 | 2.64% | 2 | |
| 2025-07-29 | 2025-07-30 | $321.20 | $319.04 | -1.55% | 2 | |
| 2025-07-23 | 2025-07-24 | $332.56 | $305.30 | -0.06% | 2 | |
| 2025-07-21 | 2025-07-22 | $328.49 | $332.11 | -0.55% | 2 | |
| 2025-06-25 | 2025-06-26 | $327.55 | $325.78 | -3.99% | 2 | |
| 2025-06-04 | 2025-06-05 | $332.05 | $284.70 | -3.75% | 2 | |
| 2025-06-02 | 2025-06-03 | $342.69 | $344.27 | -1.29% | 2 | |
| 2025-05-29 | 2025-05-30 | $358.43 | $346.46 | 0.23% | 2 | |
| 2025-05-27 | 2025-05-28 | $362.89 | $356.90 | 6.73% | 2 | |
| 2025-05-22 | 2025-05-23 | $341.04 | $339.34 | 1.72% | 2 | |
| 2025-05-20 | 2025-05-21 | $343.82 | $334.62 | 0.31% | 2 | |
| 2025-05-16 | 2025-05-19 | $349.98 | $342.09 | 1.89% | 2 | |
| 2025-05-14 | 2025-05-15 | $347.68 | $342.82 | 3.87% | 2 | |
| 2025-05-12 | 2025-05-13 | $318.38 | $334.07 | 6.54% | 2 | |
| 2024-11-29 | 2024-12-02 | $345.16 | $357.09 | 3.48% | 2 | |
| 2024-11-26 | 2024-11-27 | $338.23 | $332.89 | -0.31% | 2 | |
| 2024-11-22 | 2024-11-25 | $352.56 | $338.59 | 3.60% | 2 | |
| 2024-11-18 | 2024-11-19 | $338.74 | $346.00 | 5.41% | 2 | |
| 2024-11-14 | 2024-11-15 | $311.18 | $320.72 | -5.97% | 2 | |
| 2024-11-08 | 2024-11-11 | $321.22 | $350.00 | 7.98% | 2 | |
| 2024-11-06 | 2024-11-07 | $288.53 | $296.91 | 14.54% | 2 | |
| 2024-11-04 | 2024-11-05 | $242.84 | $251.44 | -2.66% | 2 | |
| 2024-10-31 | 2024-11-01 | $249.85 | $248.98 | -3.19% | 2 | |
| 2024-10-29 | 2024-10-30 | $259.52 | $257.55 | -1.34% | 2 | |
| 2024-10-25 | 2024-10-28 | $269.19 | $262.51 | 3.14% | 2 | |
| 2024-10-07 | 2024-10-08 | $240.83 | $244.50 | -3.90% | 2 | |
| 2024-10-02 | 2024-10-03 | $249.02 | $240.66 | -3.68% | 2 | |
| 2024-09-30 | 2024-10-01 | $261.63 | $258.02 | 0.25% | 2 | |
| 2024-09-26 | 2024-09-27 | $254.22 | $260.46 | -1.29% | 2 | |
| 2024-09-24 | 2024-09-25 | $254.27 | $257.02 | 1.51% | 2 | |
| 2024-09-20 | 2024-09-23 | $238.25 | $250.00 | -2.52% | 2 | |
| 2024-09-18 | 2024-09-19 | $227.20 | $243.92 | -0.49% | 2 | |
| 2024-09-16 | 2024-09-17 | $226.78 | $227.87 | -1.72% | 2 | |
| 2024-09-12 | 2024-09-13 | $229.81 | $230.29 | 0.54% | 2 | |
| 2024-09-10 | 2024-09-11 | $226.17 | $228.13 | 4.37% | 2 | |
| 2024-09-06 | 2024-09-09 | $210.73 | $216.27 | -8.64% | 2 | |
| 2024-09-04 | 2024-09-05 | $219.41 | $230.17 | 3.98% | 2 | |
| 2024-08-26 | 2024-08-27 | $213.21 | $209.21 | -3.42% | 2 | |
| 2024-08-22 | 2024-08-23 | $210.66 | $220.32 | -5.84% | 2 | |
| 2024-08-20 | 2024-08-21 | $221.10 | $223.27 | -0.93% | 2 | |
| 2024-07-23 | 2024-07-24 | $246.38 | $215.99 | -2.24% | 2 | |
| 2024-07-19 | 2024-07-22 | $239.20 | $251.51 | -4.22% | 2 | |
| 2024-07-17 | 2024-07-18 | $248.50 | $249.23 | -3.34% | 2 | |
| 2024-07-15 | 2024-07-16 | $252.64 | $256.56 | 1.57% | 2 | |
| 2024-07-11 | 2024-07-12 | $241.03 | $248.23 | -8.64% | 2 | |
| 2024-07-09 | 2024-07-10 | $262.33 | $263.26 | 3.51% | 2 | |
| 2024-07-05 | 2024-07-08 | $251.52 | $252.94 | 1.88% | 2 | |
| 2024-07-02 | 2024-07-03 | $231.26 | $246.39 | 9.99% | 2 | |
| 2024-06-28 | 2024-07-01 | $197.88 | $209.86 | 0.03% | 2 | |
| 2024-06-26 | 2024-06-27 | $196.37 | $197.42 | 4.61% | 2 | |
| 2024-06-24 | 2024-06-25 | $182.58 | $187.35 | -0.43% | 2 | |
| 2024-06-20 | 2024-06-21 | $181.57 | $183.01 | -1.98% | 2 | |
| 2024-06-17 | 2024-06-18 | $187.44 | $184.86 | 5.09% | 2 | |
| 2023-12-28 | 2023-12-29 | $253.18 | $248.48 | -3.36% | 2 | |
| 2023-12-26 | 2023-12-27 | $256.61 | $261.44 | 1.41% | 2 | |
| 2023-12-21 | 2023-12-22 | $254.50 | $252.54 | 2.78% | 2 | |
| 2023-12-19 | 2023-12-20 | $257.22 | $247.14 | 1.84% | 2 | |
| 2023-12-15 | 2023-12-18 | $253.50 | $252.08 | 0.78% | 2 | |
| 2023-12-11 | 2023-12-12 | $239.74 | $237.01 | -1.88% | 2 | |
| 2023-12-07 | 2023-12-08 | $242.64 | $243.84 | 1.16% | 2 | |
| 2023-12-05 | 2023-12-06 | $238.72 | $239.37 | 1.13% | 2 | |
| 2023-12-01 | 2023-12-04 | $238.83 | $235.58 | -0.72% | 2 | |
| 2023-11-29 | 2023-11-30 | $244.14 | $240.08 | -1.24% | 2 | |
| 2023-11-27 | 2023-11-28 | $236.08 | $246.72 | 0.07% | 2 | |
| 2023-11-22 | 2023-11-24 | $234.21 | $235.45 | -3.10% | 2 | |
| 2023-11-20 | 2023-11-21 | $235.60 | $241.20 | 0.35% | 2 | |
| 2023-11-16 | 2023-11-17 | $233.59 | $234.30 | -4.01% | 2 | |
| 2023-10-12 | 2023-10-13 | $258.87 | $251.12 | -1.76% | 2 | |
| 2023-10-10 | 2023-10-11 | $263.62 | $262.99 | 1.32% | 2 | |
| 2023-10-06 | 2023-10-09 | $260.53 | $259.67 | -0.02% | 2 | |
| 2023-09-20 | 2023-09-21 | $262.59 | $255.70 | -1.67% | 2 | |
| 2023-09-18 | 2023-09-19 | $265.28 | $266.50 | -3.52% | 2 | |
| 2023-09-14 | 2023-09-15 | $276.04 | $274.39 | 1.55% | 2 | |
| 2023-09-12 | 2023-09-13 | $267.48 | $271.30 | -2.43% | 2 | |
| 2023-09-06 | 2023-09-07 | $251.92 | $251.49 | -1.98% | 2 | |
| 2023-09-01 | 2023-09-05 | $245.01 | $256.49 | -5.26% | 2 | |
| 2023-08-30 | 2023-08-31 | $256.90 | $258.08 | -0.31% | 2 | |
| 2023-07-19 | 2023-07-20 | $291.26 | $262.90 | -0.91% | 2 |