Strategy Zoo / S1239

LongTermTrend_V1239

ARCHIVEDhybrid

llmAdded 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)
LongTermTrend_V1061S1061 · gen 48ARCHIVEDllm

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 cash

Backtest Metrics

MetricTrainValidationHidden TestFull
CAGR-0.3%0.1%-0.3%-0.2%
Total Return-2.6%0.3%-1.3%-3.6%
Sharpe0.030.070.050.04
Sortino0.020.050.030.03
Calmar-0.010.00-0.02-0.01
Volatility11.9%13.4%14.2%12.8%
Max DD-30.0%-24.9%-21.9%-32.2%
Win Rate42.9%35.3%38.2%40.0%
Avg Win3.4%6.0%4.3%4.1%
Avg Loss-2.5%-2.9%-2.5%-2.6%
Payoff1.352.091.701.58
Expectancy0.0%0.3%0.1%0.1%
Profit Factor1.011.141.051.05
Trades491734100
Avg Holding Days9.410.86.68.7
Turnover7.46.810.98.1
Exposure12.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
YearCAGRSharpeMax DDTrades
2016-3.4%-0.36-9.5%4
201712.7%2.01-3.3%8
2018-9.9%-1.15-12.8%3
2019-2.1%-0.06-14.9%5
20200.0%0.000.0%0
202113.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

PeriodRegimeDaysAnn. ReturnSharpeExposure
hidden testDOWNTREND278-2.1%-1.370%
hidden testEXPENSIVE8325.7%2.441%
hidden testEXTREME480.0%0.000%
hidden testHIGH VOLATILITY254-15.0%-1.121%
hidden testLOW VOLATILITY43916.8%1.2219%
hidden testMEDIUM VOLATILITY250-11.7%-0.7612%
hidden testNORMAL812-1.9%-0.1214%
hidden testSIDEWAYS294-24.3%-1.4321%
hidden testUPTREND37122.5%1.3614%
trainDOWNTREND518-6.4%-1.391%
trainEXPENSIVE3118.2%1.921%
trainEXTREME1000.0%0.000%
trainHIGH VOLATILITY6990.4%0.041%
trainLOW VOLATILITY74512.2%1.0024%
trainMEDIUM VOLATILITY568-15.2%-1.2311%
trainNORMAL1,601-1.1%-0.0815%
trainSIDEWAYS592-6.0%-0.4814%
trainUPTREND9028.5%0.6018%
validationDOWNTREND1250.0%0.000%
validationEXPENSIVE1380.0%0.000%
validationEXTREME1440.0%0.000%
validationHIGH VOLATILITY258-5.0%-0.660%
validationLOW VOLATILITY18312.3%0.9532%
validationMEDIUM VOLATILITY315-0.7%-0.0413%
validationNORMAL4741.6%0.0921%
validationSIDEWAYS206-15.8%-0.9719%
validationUPTREND4259.4%0.6814%

Trades (full period)

100 trades
EntryExitEntry PxExit PxReturnDays
2026-07-012026-07-06$425.30$419.77-3.97%3
2026-05-082026-06-08$428.35$408.95-2.97%21
2026-04-202026-04-21$392.50$386.42-1.34%2
2025-12-042025-12-31$454.53$449.721.03%19
2025-08-252025-09-15$346.60$410.049.60%15
2025-08-112025-08-21$339.03$320.11-1.14%9
2025-07-292025-07-30$321.20$319.04-0.93%2
2025-07-242025-07-25$305.30$316.06-5.04%2
2025-07-212025-07-23$328.49$332.560.33%3
2025-06-022025-06-06$342.69$295.14-10.95%5
2025-05-222025-05-28$341.04$356.904.92%4
2025-05-122025-05-13$318.38$334.073.93%2
2024-09-232024-10-08$250.00$244.500.64%12
2024-09-162024-09-20$226.78$238.253.45%5
2024-09-062024-09-09$210.73$216.27-5.18%2
2024-06-242024-07-12$182.58$248.2318.24%14
2024-06-172024-06-21$187.44$183.011.11%4
2024-05-292024-05-30$176.19$178.79-0.31%2
2023-11-292024-01-04$244.14$237.93-2.02%25
2023-11-272023-11-28$236.08$246.720.04%2
2023-11-222023-11-24$234.21$235.45-1.86%2
2023-11-202023-11-21$235.60$241.200.21%2
2023-11-162023-11-17$233.59$234.30-2.40%2
2023-10-132023-10-16$251.12$253.92-1.92%2
2023-10-112023-10-12$262.99$258.87-0.26%2
2023-10-062023-10-10$260.53$263.62-0.21%3
2023-09-122023-09-22$267.48$244.88-4.05%9
2023-09-062023-09-07$251.92$251.49-1.19%2
2023-08-302023-09-05$256.90$256.49-2.95%4
2023-06-302023-07-24$261.77$269.060.68%16
2023-05-312023-06-27$203.93$250.2111.59%19
2023-03-302023-04-06$195.28$185.06-2.62%6
2023-03-282023-03-29$189.19$193.88-0.94%2
2023-03-242023-03-27$190.41$191.81-0.68%2
2022-09-152022-09-23$303.75$275.33-2.89%7
2022-09-132022-09-14$292.13$302.61-2.54%2
2022-08-162022-08-29$306.56$284.82-4.26%10
2022-08-022022-08-12$300.59$300.03-2.19%9
2022-04-132022-04-27$340.79$293.84-6.72%10
2022-03-212022-04-12$307.05$328.984.77%17
2022-01-122022-01-13$368.74$343.852.24%2
2021-12-302022-01-03$356.78$399.93-1.75%3
2021-12-282021-12-29$362.82$362.06-0.42%2
2021-11-232021-12-01$369.68$365.00-0.69%6
2021-08-022021-11-10$236.56$355.9827.83%72
2021-06-242021-07-26$226.61$219.21-1.24%22
2021-06-222021-06-23$207.90$218.860.16%2
2021-06-182021-06-21$207.77$206.940.53%2
2021-06-142021-06-15$205.90$199.790.65%2
2021-05-032021-05-04$228.30$224.53-2.19%2
2021-04-142021-04-30$244.08$236.48-6.89%13
2019-12-162019-12-17$25.43$25.273.75%2
2019-10-152019-10-25$17.19$21.889.89%9
2019-09-112019-09-25$16.47$15.25-3.18%11
2019-07-222019-07-26$17.05$15.20-6.85%5
2019-03-012019-03-04$19.65$19.02-4.82%2
2018-12-062018-12-19$24.20$22.20-3.88%10
2018-03-142018-03-15$21.78$21.71-2.79%2
2018-01-112018-02-09$22.53$20.69-3.50%21
2017-12-122017-12-26$22.74$21.15-0.76%10
2017-10-182017-10-19$23.98$23.450.54%2
2017-10-162017-10-17$23.37$23.72-0.96%2
2017-10-122017-10-13$23.71$23.700.06%2
2017-03-242017-03-28$17.54$18.503.49%3
2017-03-202017-03-21$17.46$16.71-0.02%2
2017-01-312017-02-03$16.80$16.760.10%4
2016-12-282017-01-25$14.65$16.969.25%19
2016-07-222016-08-23$14.82$14.990.58%23
2016-06-082016-06-10$15.70$14.59-0.88%3
2016-03-282016-05-04$15.35$14.841.23%28
2016-03-212016-03-24$15.89$15.18-2.72%4
2015-12-292016-01-05$15.81$14.90-1.50%5
2015-09-212015-09-29$17.61$16.44-2.92%7
2015-08-062015-08-07$16.41$16.17-5.45%2
2015-07-152015-07-28$17.54$17.65-2.91%10
2015-04-282015-07-13$15.37$17.487.05%53
2015-04-142015-04-21$13.83$13.96-1.41%6
2014-11-252014-12-02$16.54$15.43-3.79%5
2014-11-112014-11-24$16.74$16.450.15%10
2014-10-082014-10-09$17.29$17.13-0.19%2
2014-08-042014-09-16$15.90$17.385.33%31
2014-07-312014-08-01$14.89$15.55-1.59%2
2014-07-102014-07-17$14.63$14.36-1.68%6
2014-06-162014-07-09$14.97$14.873.68%17
2014-06-122014-06-13$13.57$13.76-0.40%2
2014-06-062014-06-11$13.88$13.63-1.45%4
2014-05-282014-06-03$14.02$13.66-2.07%5
2014-01-072014-01-08$9.96$10.090.84%2
2013-03-262013-04-02$2.52$2.9610.06%5
2013-03-122013-03-15$2.61$2.35-3.57%4
2013-03-082013-03-11$2.56$2.610.26%2
2013-02-152013-02-22$2.47$2.41-4.92%5
2013-02-122013-02-14$2.53$2.55-0.07%3
2013-01-232013-01-24$2.40$2.471.26%2
2012-11-062013-01-10$2.08$2.244.08%45
2012-09-182012-09-21$2.09$2.00-3.16%4
2012-07-062012-07-20$2.07$2.122.03%11
2012-06-272012-07-03$2.13$2.04-2.42%5
2012-06-192012-06-25$2.14$2.213.60%5
2012-02-152012-04-05$2.24$2.303.48%36