Strategy Zoo / S1223
LongTermTrend_V1223
ARCHIVEDhybridllm1) Added trend gate: require UPTREND; 2) Restricted volatility/bubble regimes to avoid high-volatility or bubbly markets; 3) Replaced brittle double ret_20d threshold with sma_50 crossover + sma_50_slope and MACD momentum filter; 4) Added volume/breakout filter (breakout_20/50 or rel_volume>1.2); 5) Tightened cumret guard to avoid buying after large past losses; 6) More robust exit: smaller 20d stop (-7%) or MACD+5d weakness; 7) Introduced position scaling: reduce size to 0.5 when vol_pctile>0.75 and lowered base position to 0.8.
Fitness
0.0945
Generation
56
Complexity
20
Created
2026-10-07
Lineage
Parents (1)
restricted to bubble regimes ['EXPENSIVE', 'EXTREME']
Children (0)
None
Strategy Logic (pseudocode)
# LongTermTrend_V1223 [hybrid]
require regime.trend in ['UPTREND']
require regime.volatility in ['LOW_VOLATILITY', 'MEDIUM_VOLATILITY']
require regime.bubble in ['NORMAL']
if flat and ((close > sma_50 and sma_50_slope > 0.0) and (ret_20d > 0.03 and macd_hist > 0.0) and (breakout_20 == 1 or breakout_50 == 1 or rel_volume > 1.2) and cumret_252d > -0.15):
position = 0.8
if long and (ret_20d < -0.07 or (macd_hist < 0.0 and ret_5d < 0.0)):
position = 0.0 # exit to cashBacktest Metrics
| Metric | Train | Validation | Hidden Test | Full |
|---|---|---|---|---|
| CAGR | -1.2% | -2.2% | 2.0% | -0.6% |
| Total Return | -9.1% | -6.4% | 7.6% | -8.4% |
| Sharpe | -0.15 | -0.12 | 0.26 | -0.02 |
| Sortino | -0.05 | -0.05 | 0.07 | -0.01 |
| Calmar | -0.10 | -0.07 | 0.12 | -0.02 |
| Volatility | 6.6% | 12.1% | 9.4% | 8.7% |
| Max DD | -12.4% | -31.8% | -16.6% | -31.8% |
| Win Rate | 35.3% | 14.3% | 66.7% | 36.7% |
| Avg Win | 4.0% | 23.1% | 4.8% | 6.0% |
| Avg Loss | -2.9% | -4.4% | -5.3% | -3.7% |
| Payoff | 1.37 | 5.22 | 0.89 | 1.65 |
| Expectancy | -0.5% | -0.5% | 1.4% | -0.1% |
| Profit Factor | 0.75 | 0.87 | 1.78 | 0.95 |
| Trades | 17 | 7 | 6 | 30 |
| Avg Holding Days | 8.2 | 10.1 | 7.2 | 8.4 |
| Turnover | 3.4 | 3.7 | 2.6 | 3.3 |
| Exposure | 4.9% | 6.8% | 3.1% | 4.8% |
Growth of $100
LongTermTrend_V1223 vs TSLA Buy & Hold
LongTermTrend_V1223 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 | 0.8% | 0.15 | -5.3% | 2 |
| 2017 | 9.5% | 2.08 | -0.7% | 1 |
| 2018 | -8.6% | -1.51 | -8.6% | 2 |
| 2019 | 0.0% | 0.00 | 0.0% | 0 |
| 2020 | 0.0% | 0.00 | 0.0% | 0 |
| 2021 | 18.7% | 0.99 | -13.6% | 3 |
| 2022 | -21.2% | -2.64 | -21.1% | 4 |
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 | 0.0% | 0.00 | 0% |
| hidden test | EXPENSIVE | 83 | 17.4% | 1.72 | 1% |
| hidden test | EXTREME | 48 | 0.0% | 0.00 | 0% |
| hidden test | HIGH VOLATILITY | 254 | -13.6% | -1.43 | 1% |
| hidden test | LOW VOLATILITY | 439 | 9.2% | 0.88 | 5% |
| hidden test | MEDIUM VOLATILITY | 250 | 6.8% | 1.02 | 3% |
| hidden test | NORMAL | 812 | 1.0% | 0.11 | 4% |
| hidden test | SIDEWAYS | 294 | 0.0% | 0.00 | 0% |
| hidden test | UPTREND | 371 | 6.1% | 0.41 | 8% |
| train | DOWNTREND | 518 | 0.0% | 0.00 | 0% |
| train | EXPENSIVE | 311 | 2.4% | 1.21 | 1% |
| train | EXTREME | 100 | 0.0% | 0.00 | 0% |
| train | HIGH VOLATILITY | 699 | 0.0% | 0.00 | 0% |
| train | LOW VOLATILITY | 745 | 1.9% | 0.22 | 11% |
| train | MEDIUM VOLATILITY | 568 | -5.9% | -0.76 | 3% |
| train | NORMAL | 1,601 | -1.7% | -0.23 | 6% |
| train | SIDEWAYS | 592 | -3.7% | -1.13 | 0% |
| train | UPTREND | 902 | 0.3% | 0.03 | 11% |
| 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 | -9.4% | -1.00 | 0% |
| validation | LOW VOLATILITY | 183 | 0.3% | 0.02 | 20% |
| validation | MEDIUM VOLATILITY | 315 | 4.1% | 0.28 | 5% |
| validation | NORMAL | 474 | -2.3% | -0.15 | 11% |
| validation | SIDEWAYS | 206 | -12.9% | -1.80 | 1% |
| validation | UPTREND | 425 | 3.6% | 0.24 | 11% |
Trades (full period)
30 trades
| Entry | Exit | Entry Px | Exit Px | Return | Days | |
|---|---|---|---|---|---|---|
| 2025-12-15 | 2025-12-30 | $475.31 | $454.43 | 0.02% | 11 | |
| 2025-09-12 | 2025-09-15 | $395.94 | $410.04 | 5.72% | 2 | |
| 2024-09-06 | 2024-09-09 | $210.73 | $216.27 | -6.91% | 2 | |
| 2024-07-03 | 2024-07-12 | $246.39 | $248.23 | 3.32% | 7 | |
| 2023-07-06 | 2023-07-12 | $276.54 | $271.99 | -3.76% | 5 | |
| 2023-06-05 | 2023-06-27 | $217.61 | $250.21 | 9.98% | 16 | |
| 2022-09-20 | 2022-09-23 | $308.73 | $275.33 | -5.47% | 4 | |
| 2022-08-16 | 2022-08-22 | $306.56 | $289.91 | -3.44% | 5 | |
| 2022-08-05 | 2022-08-08 | $288.17 | $290.42 | -5.46% | 2 | |
| 2022-04-05 | 2022-04-11 | $363.75 | $325.31 | -8.58% | 5 | |
| 2021-09-28 | 2021-11-10 | $259.19 | $355.98 | 23.14% | 32 | |
| 2021-09-01 | 2021-09-21 | $244.70 | $246.46 | -0.74% | 14 | |
| 2021-08-05 | 2021-08-17 | $238.21 | $221.90 | -2.92% | 9 | |
| 2018-12-11 | 2018-12-18 | $24.45 | $22.47 | -3.81% | 6 | |
| 2018-02-01 | 2018-02-06 | $23.28 | $22.26 | -4.95% | 4 | |
| 2017-01-05 | 2017-01-25 | $15.12 | $16.96 | 9.47% | 14 | |
| 2016-07-26 | 2016-08-09 | $15.30 | $15.27 | -1.49% | 11 | |
| 2016-04-05 | 2016-04-14 | $17.03 | $16.79 | 2.32% | 8 | |
| 2015-07-21 | 2015-07-27 | $17.78 | $16.87 | -4.94% | 5 | |
| 2015-06-22 | 2015-07-09 | $17.32 | $17.19 | -2.40% | 13 | |
| 2015-05-12 | 2015-05-26 | $16.32 | $16.50 | 2.59% | 10 | |
| 2015-04-29 | 2015-05-01 | $15.50 | $15.07 | -1.69% | 3 | |
| 2014-09-02 | 2014-09-12 | $18.94 | $18.61 | 3.01% | 9 | |
| 2014-08-05 | 2014-08-25 | $15.90 | $17.50 | 5.95% | 15 | |
| 2014-06-24 | 2014-07-07 | $15.50 | $14.84 | -2.83% | 9 | |
| 2013-02-12 | 2013-02-14 | $2.53 | $2.55 | -0.10% | 3 | |
| 2012-11-29 | 2012-12-14 | $2.25 | $2.25 | 0.79% | 12 | |
| 2012-03-28 | 2012-04-05 | $2.52 | $2.30 | -6.33% | 7 | |
| 2012-03-14 | 2012-03-20 | $2.35 | $2.33 | -2.62% | 5 | |
| 2012-02-23 | 2012-02-29 | $2.30 | $2.23 | -1.11% | 5 |