Strategy Zoo / S1239
LongTermTrend_V1239
ARCHIVEDhybridllmAdded regime gates to avoid downtrends, high volatility, and bubble-expensive conditions; required trend confirmation (sma_50>sma_200 or positive MACD histogram) in entry to reduce false signals; strengthened exits by adding price-based exit (close < sma_50), an absolute drawdown exit, and a short-term momentum exit (5d loss with negative MACD); reduced base position to 0.6 and added volatility-based position scaling (increase in low vol, cut in high vol) plus a momentum+volume scale-up rule to improve risk control and reduce drawdown.
Fitness
0.1057
Generation
57
Complexity
36
Created
2026-10-07
Lineage
Parents (1)
changed macd_hist threshold 0.0 -> 1.2086
Children (0)
None
Strategy Logic (pseudocode)
# LongTermTrend_V1239 [hybrid]
require regime.trend in ['UPTREND', 'SIDEWAYS']
require regime.volatility in ['LOW_VOLATILITY', 'MEDIUM_VOLATILITY']
require regime.bubble in ['NORMAL']
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.0541) or ((macd_hist > 0.0 and close > sma_50) or ((breakout_50 == 1 and rel_volume > 1.5045) or ((macd_hist > 1.2086 and close > sma_50) and sma_50 > sma_200)))) and (sma_50 > sma_200 or macd_hist > 0.0)):
position = 0.6
if long and (ret_20d < -0.025 or close < sma_50 or drawdown > 0.08 or (ret_5d < -0.07 and macd_hist < 0.0)):
position = 0.0 # exit to cashBacktest Metrics
| Metric | Train | Validation | Hidden Test | Full |
|---|---|---|---|---|
| CAGR | -0.3% | 0.1% | -0.3% | -0.2% |
| Total Return | -2.6% | 0.3% | -1.3% | -3.6% |
| Sharpe | 0.03 | 0.07 | 0.05 | 0.04 |
| Sortino | 0.02 | 0.05 | 0.03 | 0.03 |
| Calmar | -0.01 | 0.00 | -0.02 | -0.01 |
| Volatility | 11.9% | 13.4% | 14.2% | 12.8% |
| Max DD | -30.0% | -24.9% | -21.9% | -32.2% |
| Win Rate | 42.9% | 35.3% | 38.2% | 40.0% |
| Avg Win | 3.4% | 6.0% | 4.3% | 4.1% |
| Avg Loss | -2.5% | -2.9% | -2.5% | -2.6% |
| Payoff | 1.35 | 2.09 | 1.70 | 1.58 |
| Expectancy | 0.0% | 0.3% | 0.1% | 0.1% |
| Profit Factor | 1.01 | 1.14 | 1.05 | 1.05 |
| Trades | 49 | 17 | 34 | 100 |
| Avg Holding Days | 9.4 | 10.8 | 6.6 | 8.7 |
| Turnover | 7.4 | 6.8 | 10.9 | 8.1 |
| Exposure | 12.3% | 13.2% | 12.2% | 12.4% |
Growth of $100
LongTermTrend_V1239 vs TSLA Buy & Hold
LongTermTrend_V1239 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 | -3.4% | -0.36 | -9.5% | 4 |
| 2017 | 12.7% | 2.01 | -3.3% | 8 |
| 2018 | -9.9% | -1.15 | -12.8% | 3 |
| 2019 | -2.1% | -0.06 | -14.9% | 5 |
| 2020 | 0.0% | 0.00 | 0.0% | 0 |
| 2021 | 13.3% | 0.79 | -13.8% | 9 |
| 2022 | -11.5% | -0.74 | -24.9% | 7 |
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.37 | 0% |
| hidden test | EXPENSIVE | 83 | 25.7% | 2.44 | 1% |
| hidden test | EXTREME | 48 | 0.0% | 0.00 | 0% |
| hidden test | HIGH VOLATILITY | 254 | -15.0% | -1.12 | 1% |
| hidden test | LOW VOLATILITY | 439 | 16.8% | 1.22 | 19% |
| hidden test | MEDIUM VOLATILITY | 250 | -11.7% | -0.76 | 12% |
| hidden test | NORMAL | 812 | -1.9% | -0.12 | 14% |
| hidden test | SIDEWAYS | 294 | -24.3% | -1.43 | 21% |
| hidden test | UPTREND | 371 | 22.5% | 1.36 | 14% |
| train | DOWNTREND | 518 | -6.4% | -1.39 | 1% |
| train | EXPENSIVE | 311 | 8.2% | 1.92 | 1% |
| train | EXTREME | 100 | 0.0% | 0.00 | 0% |
| train | HIGH VOLATILITY | 699 | 0.4% | 0.04 | 1% |
| train | LOW VOLATILITY | 745 | 12.2% | 1.00 | 24% |
| train | MEDIUM VOLATILITY | 568 | -15.2% | -1.23 | 11% |
| train | NORMAL | 1,601 | -1.1% | -0.08 | 15% |
| train | SIDEWAYS | 592 | -6.0% | -0.48 | 14% |
| train | UPTREND | 902 | 8.5% | 0.60 | 18% |
| validation | DOWNTREND | 125 | 0.0% | 0.00 | 0% |
| validation | EXPENSIVE | 138 | 0.0% | 0.00 | 0% |
| validation | EXTREME | 144 | 0.0% | 0.00 | 0% |
| validation | HIGH VOLATILITY | 258 | -5.0% | -0.66 | 0% |
| validation | LOW VOLATILITY | 183 | 12.3% | 0.95 | 32% |
| validation | MEDIUM VOLATILITY | 315 | -0.7% | -0.04 | 13% |
| validation | NORMAL | 474 | 1.6% | 0.09 | 21% |
| validation | SIDEWAYS | 206 | -15.8% | -0.97 | 19% |
| validation | UPTREND | 425 | 9.4% | 0.68 | 14% |
Trades (full period)
100 trades
| Entry | Exit | Entry Px | Exit Px | Return | Days | |
|---|---|---|---|---|---|---|
| 2026-07-01 | 2026-07-06 | $425.30 | $419.77 | -3.97% | 3 | |
| 2026-05-08 | 2026-06-08 | $428.35 | $408.95 | -2.97% | 21 | |
| 2026-04-20 | 2026-04-21 | $392.50 | $386.42 | -1.34% | 2 | |
| 2025-12-04 | 2025-12-31 | $454.53 | $449.72 | 1.03% | 19 | |
| 2025-08-25 | 2025-09-15 | $346.60 | $410.04 | 9.60% | 15 | |
| 2025-08-11 | 2025-08-21 | $339.03 | $320.11 | -1.14% | 9 | |
| 2025-07-29 | 2025-07-30 | $321.20 | $319.04 | -0.93% | 2 | |
| 2025-07-24 | 2025-07-25 | $305.30 | $316.06 | -5.04% | 2 | |
| 2025-07-21 | 2025-07-23 | $328.49 | $332.56 | 0.33% | 3 | |
| 2025-06-02 | 2025-06-06 | $342.69 | $295.14 | -10.95% | 5 | |
| 2025-05-22 | 2025-05-28 | $341.04 | $356.90 | 4.92% | 4 | |
| 2025-05-12 | 2025-05-13 | $318.38 | $334.07 | 3.93% | 2 | |
| 2024-09-23 | 2024-10-08 | $250.00 | $244.50 | 0.64% | 12 | |
| 2024-09-16 | 2024-09-20 | $226.78 | $238.25 | 3.45% | 5 | |
| 2024-09-06 | 2024-09-09 | $210.73 | $216.27 | -5.18% | 2 | |
| 2024-06-24 | 2024-07-12 | $182.58 | $248.23 | 18.24% | 14 | |
| 2024-06-17 | 2024-06-21 | $187.44 | $183.01 | 1.11% | 4 | |
| 2024-05-29 | 2024-05-30 | $176.19 | $178.79 | -0.31% | 2 | |
| 2023-11-29 | 2024-01-04 | $244.14 | $237.93 | -2.02% | 25 | |
| 2023-11-27 | 2023-11-28 | $236.08 | $246.72 | 0.04% | 2 | |
| 2023-11-22 | 2023-11-24 | $234.21 | $235.45 | -1.86% | 2 | |
| 2023-11-20 | 2023-11-21 | $235.60 | $241.20 | 0.21% | 2 | |
| 2023-11-16 | 2023-11-17 | $233.59 | $234.30 | -2.40% | 2 | |
| 2023-10-13 | 2023-10-16 | $251.12 | $253.92 | -1.92% | 2 | |
| 2023-10-11 | 2023-10-12 | $262.99 | $258.87 | -0.26% | 2 | |
| 2023-10-06 | 2023-10-10 | $260.53 | $263.62 | -0.21% | 3 | |
| 2023-09-12 | 2023-09-22 | $267.48 | $244.88 | -4.05% | 9 | |
| 2023-09-06 | 2023-09-07 | $251.92 | $251.49 | -1.19% | 2 | |
| 2023-08-30 | 2023-09-05 | $256.90 | $256.49 | -2.95% | 4 | |
| 2023-06-30 | 2023-07-24 | $261.77 | $269.06 | 0.68% | 16 | |
| 2023-05-31 | 2023-06-27 | $203.93 | $250.21 | 11.59% | 19 | |
| 2023-03-30 | 2023-04-06 | $195.28 | $185.06 | -2.62% | 6 | |
| 2023-03-28 | 2023-03-29 | $189.19 | $193.88 | -0.94% | 2 | |
| 2023-03-24 | 2023-03-27 | $190.41 | $191.81 | -0.68% | 2 | |
| 2022-09-15 | 2022-09-23 | $303.75 | $275.33 | -2.89% | 7 | |
| 2022-09-13 | 2022-09-14 | $292.13 | $302.61 | -2.54% | 2 | |
| 2022-08-16 | 2022-08-29 | $306.56 | $284.82 | -4.26% | 10 | |
| 2022-08-02 | 2022-08-12 | $300.59 | $300.03 | -2.19% | 9 | |
| 2022-04-13 | 2022-04-27 | $340.79 | $293.84 | -6.72% | 10 | |
| 2022-03-21 | 2022-04-12 | $307.05 | $328.98 | 4.77% | 17 | |
| 2022-01-12 | 2022-01-13 | $368.74 | $343.85 | 2.24% | 2 | |
| 2021-12-30 | 2022-01-03 | $356.78 | $399.93 | -1.75% | 3 | |
| 2021-12-28 | 2021-12-29 | $362.82 | $362.06 | -0.42% | 2 | |
| 2021-11-23 | 2021-12-01 | $369.68 | $365.00 | -0.69% | 6 | |
| 2021-08-02 | 2021-11-10 | $236.56 | $355.98 | 27.83% | 72 | |
| 2021-06-24 | 2021-07-26 | $226.61 | $219.21 | -1.24% | 22 | |
| 2021-06-22 | 2021-06-23 | $207.90 | $218.86 | 0.16% | 2 | |
| 2021-06-18 | 2021-06-21 | $207.77 | $206.94 | 0.53% | 2 | |
| 2021-06-14 | 2021-06-15 | $205.90 | $199.79 | 0.65% | 2 | |
| 2021-05-03 | 2021-05-04 | $228.30 | $224.53 | -2.19% | 2 | |
| 2021-04-14 | 2021-04-30 | $244.08 | $236.48 | -6.89% | 13 | |
| 2019-12-16 | 2019-12-17 | $25.43 | $25.27 | 3.75% | 2 | |
| 2019-10-15 | 2019-10-25 | $17.19 | $21.88 | 9.89% | 9 | |
| 2019-09-11 | 2019-09-25 | $16.47 | $15.25 | -3.18% | 11 | |
| 2019-07-22 | 2019-07-26 | $17.05 | $15.20 | -6.85% | 5 | |
| 2019-03-01 | 2019-03-04 | $19.65 | $19.02 | -4.82% | 2 | |
| 2018-12-06 | 2018-12-19 | $24.20 | $22.20 | -3.88% | 10 | |
| 2018-03-14 | 2018-03-15 | $21.78 | $21.71 | -2.79% | 2 | |
| 2018-01-11 | 2018-02-09 | $22.53 | $20.69 | -3.50% | 21 | |
| 2017-12-12 | 2017-12-26 | $22.74 | $21.15 | -0.76% | 10 | |
| 2017-10-18 | 2017-10-19 | $23.98 | $23.45 | 0.54% | 2 | |
| 2017-10-16 | 2017-10-17 | $23.37 | $23.72 | -0.96% | 2 | |
| 2017-10-12 | 2017-10-13 | $23.71 | $23.70 | 0.06% | 2 | |
| 2017-03-24 | 2017-03-28 | $17.54 | $18.50 | 3.49% | 3 | |
| 2017-03-20 | 2017-03-21 | $17.46 | $16.71 | -0.02% | 2 | |
| 2017-01-31 | 2017-02-03 | $16.80 | $16.76 | 0.10% | 4 | |
| 2016-12-28 | 2017-01-25 | $14.65 | $16.96 | 9.25% | 19 | |
| 2016-07-22 | 2016-08-23 | $14.82 | $14.99 | 0.58% | 23 | |
| 2016-06-08 | 2016-06-10 | $15.70 | $14.59 | -0.88% | 3 | |
| 2016-03-28 | 2016-05-04 | $15.35 | $14.84 | 1.23% | 28 | |
| 2016-03-21 | 2016-03-24 | $15.89 | $15.18 | -2.72% | 4 | |
| 2015-12-29 | 2016-01-05 | $15.81 | $14.90 | -1.50% | 5 | |
| 2015-09-21 | 2015-09-29 | $17.61 | $16.44 | -2.92% | 7 | |
| 2015-08-06 | 2015-08-07 | $16.41 | $16.17 | -5.45% | 2 | |
| 2015-07-15 | 2015-07-28 | $17.54 | $17.65 | -2.91% | 10 | |
| 2015-04-28 | 2015-07-13 | $15.37 | $17.48 | 7.05% | 53 | |
| 2015-04-14 | 2015-04-21 | $13.83 | $13.96 | -1.41% | 6 | |
| 2014-11-25 | 2014-12-02 | $16.54 | $15.43 | -3.79% | 5 | |
| 2014-11-11 | 2014-11-24 | $16.74 | $16.45 | 0.15% | 10 | |
| 2014-10-08 | 2014-10-09 | $17.29 | $17.13 | -0.19% | 2 | |
| 2014-08-04 | 2014-09-16 | $15.90 | $17.38 | 5.33% | 31 | |
| 2014-07-31 | 2014-08-01 | $14.89 | $15.55 | -1.59% | 2 | |
| 2014-07-10 | 2014-07-17 | $14.63 | $14.36 | -1.68% | 6 | |
| 2014-06-16 | 2014-07-09 | $14.97 | $14.87 | 3.68% | 17 | |
| 2014-06-12 | 2014-06-13 | $13.57 | $13.76 | -0.40% | 2 | |
| 2014-06-06 | 2014-06-11 | $13.88 | $13.63 | -1.45% | 4 | |
| 2014-05-28 | 2014-06-03 | $14.02 | $13.66 | -2.07% | 5 | |
| 2014-01-07 | 2014-01-08 | $9.96 | $10.09 | 0.84% | 2 | |
| 2013-03-26 | 2013-04-02 | $2.52 | $2.96 | 10.06% | 5 | |
| 2013-03-12 | 2013-03-15 | $2.61 | $2.35 | -3.57% | 4 | |
| 2013-03-08 | 2013-03-11 | $2.56 | $2.61 | 0.26% | 2 | |
| 2013-02-15 | 2013-02-22 | $2.47 | $2.41 | -4.92% | 5 | |
| 2013-02-12 | 2013-02-14 | $2.53 | $2.55 | -0.07% | 3 | |
| 2013-01-23 | 2013-01-24 | $2.40 | $2.47 | 1.26% | 2 | |
| 2012-11-06 | 2013-01-10 | $2.08 | $2.24 | 4.08% | 45 | |
| 2012-09-18 | 2012-09-21 | $2.09 | $2.00 | -3.16% | 4 | |
| 2012-07-06 | 2012-07-20 | $2.07 | $2.12 | 2.03% | 11 | |
| 2012-06-27 | 2012-07-03 | $2.13 | $2.04 | -2.42% | 5 | |
| 2012-06-19 | 2012-06-25 | $2.14 | $2.21 | 3.60% | 5 | |
| 2012-02-15 | 2012-04-05 | $2.24 | $2.30 | 3.48% | 36 |