Strategy Zoo / S0939

LongTermTrend_V0939

ARCHIVEDhybrid

llm['Relaxed and diversified entry paths: combined trend-following (close > sma_200 with slope filter), medium-term momentum (ret_20d + cumret_252d), breakout with volume, and MACD+sma50 filter to capture different robust regimes.', 'Added multi-condition exit: keep macd_hist sell but also exit on close < sma_50, stop on drawdown > 8%, or sharp 5d loss to reduce large drawdowns.', 'Introduced regime gates: allow trading only in UPTREND or SIDEWAYS, limit to LOW/MEDIUM volatility, and disallow bubbly (only NORMAL) conditions to improve generalization.', 'Reduced base_position to 0.75 to lower risk and turnover; moved volatility handling to regime gates to avoid overtrading in high-vol regimes.']

Fitness
0.0776
Generation
43
Complexity
22
Created
2026-09-30

Lineage

Parents (1)
LongTermTrend_V0521S0521 · gen 24ARCHIVEDllm

entry = LongTermTrend_V0469 OR MACDMomentum_V0272

Children (0)
None

Strategy Logic (pseudocode)

# LongTermTrend_V0939  [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.001) or (ret_20d > 0.04 and cumret_252d > 0.03) or (breakout_50 == 1 and rel_volume > 1.2 and close > sma_50) or (macd_hist > 0.0 and close > sma_50)):
    position = 0.75
if long and (macd_hist < 0.0 or close < sma_50 or drawdown > 0.08 or ret_5d < -0.05):
    position = 0.0  # exit to cash

Backtest Metrics

MetricTrainValidationHidden TestFull
CAGR-4.9%0.1%-5.7%-4.1%
Total Return-33.3%0.3%-19.6%-46.2%
Sharpe-0.210.10-0.21-0.14
Sortino-0.160.09-0.18-0.11
Calmar-0.100.00-0.16-0.08
Volatility17.2%20.0%19.4%18.4%
Max DD-48.8%-23.6%-34.6%-54.2%
Win Rate42.1%42.2%38.0%40.9%
Avg Win2.2%3.0%2.8%2.5%
Avg Loss-1.8%-2.1%-1.9%-1.9%
Payoff1.201.461.471.33
Expectancy-0.1%0.1%-0.1%-0.1%
Profit Factor0.871.060.900.92
Trades21483121418
Avg Holding Days3.23.23.13.2
Turnover40.241.548.842.6
Exposure17.4%18.5%20.5%18.4%

Growth of $100

LongTermTrend_V0939 vs TSLA Buy & Hold
LongTermTrend_V0939 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-13.8%-1.37-18.3%21
20178.7%0.76-11.3%20
2018-7.8%-0.67-12.6%11
2019-9.3%-0.37-18.4%12
20200.0%0.000.0%0
20211.2%0.19-23.4%55
2022-0.8%0.04-15.0%27

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 testDOWNTREND274-10.4%-2.142%
hidden testEXPENSIVE8331.9%2.422%
hidden testEXTREME480.0%0.000%
hidden testHIGH VOLATILITY254-5.4%-0.412%
hidden testLOW VOLATILITY4346.7%0.3332%
hidden testMEDIUM VOLATILITY250-21.1%-0.9120%
hidden testNORMAL807-7.9%-0.3924%
hidden testSIDEWAYS293-31.8%-1.4834%
hidden testUPTREND37122.7%0.9524%
trainDOWNTREND518-15.7%-1.321%
trainEXPENSIVE31120.2%1.712%
trainEXTREME1000.0%0.000%
trainHIGH VOLATILITY699-1.3%-0.072%
trainLOW VOLATILITY7454.5%0.3130%
trainMEDIUM VOLATILITY568-17.1%-0.9221%
trainNORMAL1,601-8.4%-0.4522%
trainSIDEWAYS592-7.6%-0.3822%
trainUPTREND9026.0%0.3324%
validationDOWNTREND125-4.2%-1.731%
validationEXPENSIVE1380.0%0.000%
validationEXTREME1440.0%0.000%
validationHIGH VOLATILITY2587.9%0.461%
validationLOW VOLATILITY1831.1%0.0637%
validationMEDIUM VOLATILITY315-2.2%-0.0922%
validationNORMAL4743.3%0.1329%
validationSIDEWAYS206-22.4%-1.0429%
validationUPTREND42515.8%0.7219%

Trades (full period)

latest 100 of 418
EntryExitEntry PxExit PxReturnDays
2026-07-012026-07-06$425.30$419.77-4.97%3
2026-06-052026-06-08$391.00$408.95-5.07%2
2026-06-032026-06-04$423.70$418.45-0.16%2
2026-05-272026-06-02$440.36$423.74-3.20%5
2026-05-222026-05-26$426.01$433.591.31%2
2026-05-202026-05-21$417.26$417.852.29%2
2026-05-082026-05-19$428.35$404.11-0.40%8
2026-04-202026-04-21$392.50$386.42-1.67%2
2026-03-172026-03-18$399.27$392.780.55%2
2026-03-122026-03-13$395.01$391.20-2.50%2
2026-03-102026-03-11$399.24$407.82-0.04%2
2026-03-062026-03-09$396.73$398.68-1.78%2
2026-03-042026-03-05$405.94$405.552.43%2
2026-03-022026-03-03$403.32$392.430.00%2
2026-02-262026-02-27$408.58$402.51-1.73%2
2026-02-242026-02-25$409.38$417.401.64%2
2026-02-202026-02-23$411.82$399.83-0.13%2
2026-02-182026-02-19$411.32$411.71-0.02%2
2026-02-132026-02-17$417.44$410.63-0.08%2
2026-02-112026-02-12$428.27$417.070.39%2
2026-02-092026-02-10$417.32$425.210.98%2
2026-02-052026-02-06$397.21$411.11-1.77%2
2026-02-032026-02-04$421.96$406.01-0.12%2
2026-01-302026-02-02$430.41$421.812.34%2
2026-01-282026-01-29$431.46$416.56-0.05%2
2026-01-262026-01-27$435.20$430.90-2.46%2
2026-01-222026-01-23$449.36$449.062.96%2
2026-01-202026-01-21$419.25$431.44-3.28%2
2026-01-152026-01-16$438.57$437.50-0.26%2
2026-01-132026-01-14$447.20$439.20-0.44%2
2026-01-092026-01-12$445.01$448.961.43%2
2026-01-072026-01-08$431.41$435.80-0.42%2
2026-01-052026-01-06$451.67$432.962.18%2
2025-12-312026-01-02$449.72$438.07-0.93%2
2025-12-042025-12-30$454.53$454.432.10%18
2025-12-022025-12-03$429.24$446.74-0.31%2
2025-11-282025-12-01$430.17$430.140.48%2
2025-11-252025-11-26$419.40$426.580.14%2
2025-11-212025-11-24$391.09$417.78-0.94%2
2025-11-192025-11-20$403.99$395.230.36%2
2025-11-172025-11-18$408.92$401.250.70%2
2025-11-132025-11-14$401.99$404.35-5.13%2
2025-09-082025-09-15$346.40$410.049.42%6
2025-09-042025-09-05$338.53$350.840.85%2
2025-08-222025-09-03$340.01$334.092.06%8
2025-08-112025-08-21$339.03$320.11-1.44%9
2025-08-052025-08-06$308.72$319.91-0.28%2
2025-07-312025-08-01$308.27$302.63-2.68%2
2025-07-292025-07-30$321.20$319.04-1.16%2
2025-07-212025-07-25$328.49$316.06-5.67%5
2025-07-172025-07-18$319.41$329.65-0.68%2
2025-07-152025-07-16$310.78$321.67-1.60%2
2025-06-042025-06-05$332.05$284.70-2.81%2
2025-06-022025-06-03$342.69$344.27-0.97%2
2025-05-222025-05-28$341.04$356.906.16%4
2025-05-122025-05-13$318.38$334.074.91%2
2025-03-042025-03-05$272.04$279.10-3.47%2
2025-02-282025-03-03$292.98$284.652.78%2
2025-02-262025-02-27$290.80$281.95-3.12%2
2024-10-232024-10-24$213.65$260.48-1.64%2
2024-10-212024-10-22$218.85$217.97-0.78%2
2024-10-172024-10-18$220.89$220.70-0.30%2
2024-10-152024-10-16$219.57$221.33-0.01%2
2024-10-112024-10-14$217.80$219.16-6.73%2
2024-10-092024-10-10$241.05$238.77-1.21%2
2024-10-072024-10-08$240.83$244.50-2.92%2
2024-09-232024-10-04$250.00$250.080.67%10
2024-09-162024-09-20$226.78$238.254.30%5
2024-09-062024-09-09$210.73$216.27-6.48%2
2024-09-042024-09-05$219.41$230.172.99%2
2024-08-302024-09-03$214.11$210.602.69%2
2024-06-172024-07-12$187.44$248.2325.72%18
2024-05-292024-05-30$176.19$178.79-0.39%2
2024-01-112024-01-12$227.22$218.89-2.30%2
2024-01-092024-01-10$234.96$233.94-1.86%2
2024-01-052024-01-08$237.49$240.45-0.29%2
2024-01-032024-01-04$238.45$237.93-3.16%2
2023-12-152024-01-02$253.50$248.42-0.87%11
2023-11-292023-12-14$244.14$251.05-2.40%12
2023-11-272023-11-28$236.08$246.720.05%2
2023-11-222023-11-24$234.21$235.45-2.32%2
2023-11-202023-11-21$235.60$241.200.27%2
2023-11-162023-11-17$233.59$234.30-3.00%2
2023-11-142023-11-15$237.41$242.844.44%2
2023-11-082023-11-09$222.11$209.98-0.17%2
2023-11-062023-11-07$219.27$222.18-0.39%2
2023-10-252023-10-26$212.42$205.76-1.57%2
2023-10-202023-10-23$211.99$212.08-2.91%2
2023-10-182023-10-19$242.68$220.11-3.73%2
2023-10-052023-10-17$260.05$254.85-2.22%9
2023-10-032023-10-04$246.53$261.16-1.66%2
2023-09-292023-10-02$250.22$251.601.02%2
2023-09-272023-09-28$240.50$246.38-1.26%2
2023-09-252023-09-26$246.99$244.120.50%2
2023-09-122023-09-22$267.48$244.88-5.06%9
2023-09-082023-09-11$248.50$273.58-1.04%2
2023-09-062023-09-07$251.92$251.49-1.49%2
2023-08-292023-09-05$257.18$256.491.87%5
2023-08-252023-08-28$238.59$238.822.64%2
2023-08-232023-08-24$236.86$230.041.03%2