Strategy Zoo / S0421

LongTermTrend_V0421

ARCHIVEDhybrid

llm1) Added regime gates to restrict trading to uptrends and non-high volatility/bubble regimes to reduce drawdown and overfitting. 2) Simplified and strengthened entry: require price above sma_50, positive sma_50_slope, short-term momentum or breakout, and avoid extreme volatility (vol_pctile < 0.85). 3) Broadened exit to include MACD negative OR portfolio drawdown OR sharp 20d loss to stop bleeding faster. 4) Reduced base position to 0.6 and added two position rules: full size on confirmed breakout+positive MACD, reduced size when volatility percentile is high. These structural changes aim for more robust, lower-risk performance and better walk-forward stability.

Fitness
0.2239
Generation
19
Complexity
14
Created
2026-09-18

Lineage

Parents (1)
LongTermTrend_V0359S0359 · gen 17ARCHIVEDllm

entry from LongTermTrend_V0323, exit from MACDMomentum_V0334

Children (0)
None

Strategy Logic (pseudocode)

# LongTermTrend_V0421  [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_50 and sma_50_slope > 0.0 and (ret_20d > 0.03 or breakout_20 > 0.0) and vol_pctile < 0.85):
    position = 0.6
if long and (macd_hist < 0.0 or drawdown > 0.12 or ret_20d < -0.05):
    position = 0.0  # exit to cash

Backtest Metrics

MetricTrainValidationHidden TestFull
CAGR-0.1%11.8%-1.7%1.9%
Total Return-0.8%39.9%-6.0%32.7%
Sharpe0.040.86-0.090.23
Sortino0.020.64-0.040.14
Calmar-0.000.38-0.080.05
Volatility9.9%14.2%11.5%11.3%
Max DD-29.0%-31.5%-20.6%-35.7%
Win Rate37.4%51.2%44.7%42.1%
Avg Win2.4%4.0%2.6%3.1%
Avg Loss-1.5%-2.2%-2.3%-1.8%
Payoff1.571.791.131.69
Expectancy-0.1%1.0%-0.1%0.2%
Profit Factor0.941.880.921.23
Trades994138178
Avg Holding Days3.74.43.63.9
Turnover15.016.412.314.6
Exposure8.4%11.0%6.4%8.4%

Growth of $100

LongTermTrend_V0421 vs TSLA Buy & Hold
LongTermTrend_V0421 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
YearCAGRSharpeMax DDTrades
2016-4.0%-0.70-8.1%8
20173.6%0.37-9.1%21
2018-12.2%-1.89-12.1%7
20194.8%0.70-4.7%5
202044.1%2.54-4.8%11
202116.7%0.95-17.6%21
2022-17.0%-2.44-17.0%8

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

PeriodRegimeDaysAnn. ReturnSharpeExposure
hidden testDOWNTREND2670.0%0.000%
hidden testEXPENSIVE8328.1%1.4222%
hidden testEXTREME480.0%0.000%
hidden testHIGH VOLATILITY254-10.5%-1.101%
hidden testLOW VOLATILITY42911.3%1.138%
hidden testMEDIUM VOLATILITY248-12.5%-0.839%
hidden testNORMAL800-4.1%-0.395%
hidden testSIDEWAYS293-4.2%-0.971%
hidden testUPTREND3710.8%0.0516%
trainDOWNTREND5180.0%0.000%
trainEXPENSIVE31120.7%1.2819%
trainEXTREME1007.0%1.551%
trainHIGH VOLATILITY6993.7%0.401%
trainLOW VOLATILITY7455.0%0.4717%
trainMEDIUM VOLATILITY568-9.7%-1.027%
trainNORMAL1,601-4.0%-0.477%
trainSIDEWAYS592-4.6%-1.140%
trainUPTREND9023.9%0.2718%
validationDOWNTREND1250.0%0.000%
validationEXPENSIVE13859.1%2.8325%
validationEXTREME14428.3%2.612%
validationHIGH VOLATILITY258-7.1%-1.000%
validationLOW VOLATILITY1834.4%0.3919%
validationMEDIUM VOLATILITY31532.5%1.7015%
validationNORMAL474-6.4%-0.5110%
validationSIDEWAYS206-11.2%-1.911%
validationUPTREND42527.1%1.4719%

Trades (full period)

latest 100 of 178
EntryExitEntry PxExit PxReturnDays
2026-07-022026-07-06$393.45$419.77-4.61%2
2026-05-292026-06-01$435.79$415.88-0.98%2
2025-12-312026-01-02$449.72$438.07-0.74%2
2025-12-082025-12-30$439.58$454.430.61%16
2025-11-102025-11-11$445.23$439.622.07%2
2025-11-062025-11-07$445.91$429.52-2.22%2
2025-11-032025-11-05$468.37$462.07-1.70%3
2025-10-292025-10-30$461.51$440.100.01%2
2025-10-242025-10-27$433.72$452.42-2.16%2
2025-10-222025-10-23$438.97$448.98-0.61%2
2025-10-202025-10-21$447.43$442.600.99%2
2025-10-132025-10-14$435.90$429.243.13%2
2025-10-092025-10-10$435.54$413.49-0.55%2
2025-10-072025-10-08$433.09$438.69-2.79%2
2025-09-122025-10-06$395.94$453.259.73%17
2025-09-042025-09-05$338.53$350.840.68%2
2025-06-042025-06-05$332.05$284.70-2.25%2
2025-05-222025-06-03$341.04$344.271.40%8
2024-10-112024-10-14$217.80$219.16-5.39%2
2024-10-092024-10-10$241.05$238.77-0.97%2
2024-10-072024-10-08$240.83$244.50-2.34%2
2024-10-032024-10-04$240.66$250.08-2.13%2
2024-09-162024-09-20$226.78$238.253.45%5
2024-09-062024-09-09$210.73$216.27-5.18%2
2024-07-022024-07-12$231.26$248.238.84%8
2024-01-032024-01-04$238.45$237.93-2.53%2
2023-07-312023-08-01$267.43$261.070.10%2
2023-07-272023-07-28$255.71$266.44-2.08%2
2023-07-252023-07-26$265.28$264.35-0.96%2
2023-07-202023-07-21$262.90$260.02-5.96%2
2023-07-182023-07-19$293.34$291.260.49%2
2023-07-142023-07-17$281.38$290.380.63%2
2023-07-122023-07-13$271.99$277.900.37%2
2023-07-102023-07-11$269.61$269.79-1.17%2
2023-07-052023-07-07$282.48$274.43-0.82%3
2023-06-302023-07-03$261.77$279.820.87%2
2023-06-282023-06-29$256.24$257.501.33%2
2023-06-022023-06-27$213.97$250.219.52%17
2022-09-202022-09-23$308.73$275.33-4.12%4
2022-09-122022-09-14$304.42$302.61-1.61%3
2022-08-162022-08-19$306.56$296.67-1.37%4
2022-08-052022-08-08$288.17$290.42-4.10%2
2022-04-192022-04-20$342.72$325.731.30%2
2022-04-142022-04-18$328.33$334.76-2.31%2
2022-04-122022-04-13$328.98$340.790.56%2
2022-04-052022-04-11$363.75$325.31-6.48%5
2021-12-092021-12-10$334.60$339.01-3.78%2
2021-11-262021-11-29$360.64$379.00-1.95%2
2021-11-232021-11-24$369.68$372.00-2.60%2
2021-10-122021-11-10$268.57$355.9817.18%22
2021-10-082021-10-11$261.83$263.98-0.73%2
2021-09-282021-10-07$259.19$264.54-0.77%8
2021-09-242021-09-27$258.13$263.791.53%2
2021-09-222021-09-23$250.65$251.210.90%2
2021-08-302021-09-21$243.64$246.461.46%16
2021-08-262021-08-27$233.72$237.31-0.97%2
2021-08-242021-08-25$236.16$237.070.07%2
2021-08-192021-08-20$224.49$226.75-1.47%2
2021-08-052021-08-17$238.21$221.90-2.18%9
2021-02-102021-02-11$268.27$270.55-3.27%2
2021-02-052021-02-08$284.08$287.810.04%2
2021-02-032021-02-04$284.90$283.33-1.36%2
2021-02-012021-02-02$279.94$290.933.38%2
2021-01-282021-01-29$278.48$264.51-2.11%2
2021-01-262021-01-27$294.36$288.050.04%2
2021-01-122021-01-25$283.15$293.602.52%9
2021-01-052021-01-11$245.04$270.4011.92%5
2020-12-312021-01-04$235.22$243.260.82%2
2020-12-292020-12-30$222.00$231.590.09%2
2020-12-242020-12-28$220.59$221.231.35%2
2020-12-182020-12-23$231.67$215.33-1.45%4
2020-12-102020-12-17$209.02$218.631.74%6
2020-11-192020-12-08$166.42$216.6318.20%13
2020-10-262020-10-27$140.09$141.56-0.17%2
2020-10-222020-10-23$141.93$140.210.33%2
2020-10-132020-10-20$148.88$140.65-1.65%6
2020-06-292020-06-30$67.29$71.992.98%2
2020-06-252020-06-26$65.73$63.981.45%2
2019-12-132020-01-22$23.89$37.9728.95%26
2019-12-042019-12-05$22.20$22.02-0.69%2
2019-12-022019-12-03$22.32$22.410.78%2
2019-11-272019-11-29$22.09$22.000.31%2
2019-11-222019-11-25$22.20$22.42-3.80%2
2019-10-212019-10-22$16.90$17.04-0.93%2
2018-12-112018-12-18$24.45$22.47-2.84%6
2018-12-072018-12-10$23.86$24.34-0.96%2
2018-12-042018-12-06$23.98$24.200.08%2
2018-11-292018-11-30$22.74$23.37-1.27%2
2018-11-272018-11-28$22.93$23.19-0.48%2
2018-02-082018-02-09$21.02$20.69-5.29%2
2018-02-012018-02-05$23.28$22.21-1.91%3
2017-10-092017-10-10$22.86$23.71-2.46%2
2017-10-052017-10-06$23.69$23.79-0.07%2
2017-09-182017-09-25$25.67$23.00-4.69%6
2017-08-152017-08-18$24.16$23.16-2.08%4
2017-08-042017-08-07$23.79$23.681.58%2
2017-06-302017-07-03$24.11$23.510.02%2
2017-06-052017-06-14$23.15$25.386.18%8
2017-05-172017-05-18$20.41$20.87-2.18%2
2017-05-122017-05-16$21.65$21.13-1.46%3