Strategy Zoo / S1047

LongTermTrend_V1047

ARCHIVEDhybrid

llm1) Added conservative regime gates: allow trading only in UPTREND or SIDEWAYS, avoid HIGH_VOLATILITY and bubble states to reduce overtrading. 2) Wrapped original entry in additional filters: require RSI>40 and vol_pctile<0.9 to avoid weak momentum and extreme volatility. 3) Improved exit logic: exit on MACD histogram negative OR price crossing below SMA50 OR sharp 5-day loss OR large drawdown (12%) — better stop/exit coverage. 4) Reduced base_position to 0.7 and added position scaling rules: full size (1.0) in low vol with 50/200 bullish crossover; cut exposure to 0.4 when volatility percentile >0.85. These structural changes aim to improve validation robustness and lower drawdown.

Fitness
0.0922
Generation
48
Complexity
33
Created
2026-10-02

Lineage

Parents (1)
LongTermTrend_V0521S0521 · gen 24ARCHIVEDllm

entry = LongTermTrend_V0469 OR MACDMomentum_V0272

Children (0)
None

Strategy Logic (pseudocode)

# LongTermTrend_V1047  [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 > 0.0 and close > sma_50) and sma_50 > sma_200)))) and rsi_14 > 40.0 and vol_pctile < 0.9):
    position = 0.7
if long and (macd_hist < 0.0 or close < sma_50 or ret_5d < -0.06 or drawdown > 0.12):
    position = 0.0  # exit to cash

Backtest Metrics

MetricTrainValidationHidden TestFull
CAGR-1.6%0.4%1.2%-0.5%
Total Return-12.1%1.2%4.5%-7.1%
Sharpe-0.060.100.150.03
Sortino-0.040.060.100.02
Calmar-0.040.020.04-0.01
Volatility12.7%13.9%14.9%13.5%
Max DD-36.6%-18.7%-29.9%-36.6%
Win Rate37.8%45.2%40.5%40.0%
Avg Win3.2%2.8%4.1%3.4%
Avg Loss-2.1%-2.1%-2.4%-2.2%
Payoff1.521.351.701.54
Expectancy-0.1%0.1%0.2%0.0%
Profit Factor0.931.111.161.03
Trades823142155
Avg Holding Days5.05.45.25.1
Turnover14.414.515.814.7
Exposure11.5%12.6%13.1%12.1%

Growth of $100

LongTermTrend_V1047 vs TSLA Buy & Hold
LongTermTrend_V1047 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.7%-0.49-9.4%11
20179.2%1.17-3.8%7
2018-6.5%-0.91-10.1%5
2019-2.7%-0.06-17.3%5
20200.0%0.000.0%0
2021-1.9%-0.00-18.6%20
20223.2%0.29-14.8%10

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 testDOWNTREND276-2.5%-1.381%
hidden testEXPENSIVE8330.0%2.442%
hidden testEXTREME480.0%0.000%
hidden testHIGH VOLATILITY254-7.6%-0.631%
hidden testLOW VOLATILITY43615.9%1.0520%
hidden testMEDIUM VOLATILITY250-11.5%-0.6813%
hidden testNORMAL809-0.4%-0.0315%
hidden testSIDEWAYS293-18.9%-1.1324%
hidden testUPTREND37122.5%1.2314%
trainDOWNTREND518-5.6%-1.211%
trainEXPENSIVE3119.0%1.831%
trainEXTREME1000.0%0.000%
trainHIGH VOLATILITY6991.7%0.131%
trainLOW VOLATILITY7458.7%0.7122%
trainMEDIUM VOLATILITY568-16.3%-1.2211%
trainNORMAL1,601-2.8%-0.2014%
trainSIDEWAYS592-6.3%-0.4516%
trainUPTREND9025.6%0.3815%
validationDOWNTREND1250.0%0.000%
validationEXPENSIVE1380.0%0.000%
validationEXTREME1440.0%0.000%
validationHIGH VOLATILITY258-5.8%-0.661%
validationLOW VOLATILITY1831.6%0.1229%
validationMEDIUM VOLATILITY3157.0%0.4013%
validationNORMAL4742.1%0.1220%
validationSIDEWAYS206-9.1%-0.5818%
validationUPTREND4256.8%0.4614%

Trades (full period)

latest 100 of 155
EntryExitEntry PxExit PxReturnDays
2026-07-012026-07-06$425.30$419.77-4.63%3
2026-06-032026-06-04$423.70$418.45-0.15%2
2026-05-272026-06-02$440.36$423.74-2.99%5
2026-05-222026-05-26$426.01$433.591.23%2
2026-05-202026-05-21$417.26$417.852.14%2
2026-05-082026-05-19$428.35$404.11-0.36%8
2026-04-202026-04-21$392.50$386.42-1.56%2
2025-12-042025-12-30$454.53$454.431.98%18
2025-09-082025-09-15$346.40$410.048.78%6
2025-09-042025-09-05$338.53$350.840.79%2
2025-08-252025-09-03$346.60$334.09-2.32%7
2025-08-112025-08-21$339.03$320.11-1.34%9
2025-07-292025-07-30$321.20$319.04-1.08%2
2025-07-212025-07-25$328.49$316.06-5.29%5
2025-06-042025-06-05$332.05$284.70-2.62%2
2025-06-022025-06-03$342.69$344.27-0.90%2
2025-05-222025-05-28$341.04$356.905.75%4
2025-05-122025-05-13$318.38$334.074.58%2
2024-09-232024-10-04$250.00$250.080.63%10
2024-09-162024-09-20$226.78$238.254.02%5
2024-09-062024-09-09$210.73$216.27-6.05%2
2024-06-172024-07-12$187.44$248.2323.89%18
2024-05-292024-05-30$176.19$178.79-0.36%2
2023-12-152024-01-02$253.50$248.42-0.80%11
2023-11-292023-12-14$244.14$251.05-2.24%12
2023-11-272023-11-28$236.08$246.720.05%2
2023-11-222023-11-24$234.21$235.45-2.17%2
2023-11-202023-11-21$235.60$241.200.25%2
2023-11-162023-11-17$233.59$234.30-2.80%2
2023-10-062023-10-17$260.53$254.85-1.78%8
2023-09-122023-09-22$267.48$244.88-4.72%9
2023-09-062023-09-07$251.92$251.49-1.39%2
2023-08-302023-09-05$256.90$256.49-3.44%4
2023-07-202023-07-21$262.90$260.02-6.95%2
2023-07-182023-07-19$293.34$291.260.57%2
2023-07-142023-07-17$281.38$290.380.74%2
2023-07-122023-07-13$271.99$277.900.43%2
2023-07-102023-07-11$269.61$269.79-1.37%2
2023-07-052023-07-07$282.48$274.43-0.95%3
2023-06-302023-07-03$261.77$279.821.02%2
2023-05-312023-06-27$203.93$250.2113.57%19
2023-03-242023-04-06$190.41$185.06-2.49%10
2022-09-132022-09-23$292.13$275.33-3.75%9
2022-08-242022-08-25$297.10$296.070.01%2
2022-08-222022-08-23$289.91$296.45-1.73%2
2022-08-152022-08-19$309.32$296.670.53%5
2022-08-022022-08-12$300.59$300.03-2.57%9
2022-04-192022-04-20$342.72$325.731.52%2
2022-04-142022-04-18$328.33$334.76-2.70%2
2022-04-122022-04-13$328.98$340.790.65%2
2022-03-212022-04-11$307.05$325.319.20%16
2022-01-122022-01-13$368.74$343.852.61%2
2021-12-282022-01-03$362.82$399.93-2.52%5
2021-11-262021-11-29$360.64$379.00-2.28%2
2021-11-232021-11-24$369.68$372.00-3.03%2
2021-10-122021-11-10$268.57$355.9820.11%22
2021-10-082021-10-11$261.83$263.98-0.86%2
2021-09-272021-10-07$263.79$264.540.62%9
2021-09-232021-09-24$251.21$258.130.02%2
2021-08-312021-09-21$245.24$246.46-0.18%15
2021-08-252021-08-26$237.07$233.720.13%2
2021-08-232021-08-24$235.43$236.162.54%2
2021-08-192021-08-20$224.49$226.75-1.72%2
2021-08-022021-08-17$236.56$221.90-0.20%12
2021-07-212021-07-22$218.43$216.42-0.69%2
2021-07-162021-07-19$214.74$215.41-0.83%2
2021-07-132021-07-15$222.85$216.87-3.45%3
2021-06-242021-07-12$226.61$228.57-0.06%12
2021-06-222021-06-23$207.90$218.860.18%2
2021-06-182021-06-21$207.77$206.940.62%2
2021-06-142021-06-15$205.90$199.790.75%2
2021-05-032021-05-04$228.30$224.53-2.56%2
2021-04-142021-04-29$244.08$225.67-6.38%12
2019-12-162019-12-17$25.43$25.274.37%2
2019-10-152019-10-25$17.19$21.8811.52%9
2019-09-112019-09-25$16.47$15.25-3.73%11
2019-07-222019-07-26$17.05$15.20-8.01%5
2019-03-012019-03-04$19.65$19.02-5.63%2
2018-12-112018-12-18$24.45$22.47-3.32%6
2018-12-062018-12-07$24.20$23.860.51%2
2018-11-292018-11-30$22.74$23.37-1.49%2
2018-03-132018-03-15$22.79$21.71-3.97%3
2018-01-112018-02-05$22.53$22.211.76%17
2017-12-122017-12-26$22.74$21.15-0.90%10
2017-10-182017-10-20$23.98$23.01-0.91%3
2017-10-122017-10-17$23.71$23.72-0.93%4
2017-03-242017-03-28$17.54$18.504.08%3
2017-03-202017-03-22$17.46$17.00-3.03%3
2017-01-312017-02-02$16.80$16.77-0.53%3
2016-12-282017-01-25$14.65$16.9610.85%19
2016-07-222016-08-09$14.82$15.271.68%13
2016-06-082016-06-10$15.70$14.59-1.03%3
2016-04-292016-05-02$16.05$16.12-2.10%2
2016-04-272016-04-28$16.76$16.51-0.77%2
2016-04-252016-04-26$16.79$16.92-0.67%2
2016-04-212016-04-22$16.55$16.92-0.61%2
2016-04-192016-04-20$16.49$16.66-1.93%2
2016-04-152016-04-18$16.97$16.930.60%2
2016-04-042016-04-14$16.47$16.794.87%9
2016-03-282016-04-01$15.35$15.840.48%5