Strategy Zoo / S0371

LongTermTrend_V0371

ARCHIVEDhybrid

llmRemoved redundant ret_20d check and added momentum confirmation (ret_60d + macd_hist) and RSI cap to reduce overbought entries. Added regime gates to avoid trading in strong downtrends, high-volatility-only regimes, and bubble states (trade only UPTREND/SIDEWAYS, LOW/MEDIUM vol, NORMAL bubble). Improved exits: keep the 20d loss stop, add close < sma_50 and extreme RSI >80 as timely exit signals. Lowered base position to 0.6 and added volatility-based sizing (full size in low vol, reduced in high vol) plus a hard stop-to-zero when portfolio drawdown is severe. These changes aim to reduce overfitting and risk while keeping trend capture.

Fitness
0.0763
Generation
17
Complexity
17
Created
2026-09-18

Lineage

Parents (1)
LongTermTrend_V0253S0253 · gen 12ARCHIVEDllm

changed ret_20d threshold 0.05 -> 0.1208

Children (0)
None

Strategy Logic (pseudocode)

# LongTermTrend_V0371  [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.0022) or ret_5d > 0.0029) and ret_20d > 0.03 and ret_60d > 0.02 and macd_hist > 0.0 and rsi_14 < 75.0):
    position = 0.6
if long and (ret_20d < -0.03 or close < sma_50 or rsi_14 > 80.0):
    position = 0.0  # exit to cash

Backtest Metrics

MetricTrainValidationHidden TestFull
CAGR0.5%-6.1%-2.6%-1.7%
Total Return3.8%-17.2%-9.3%-22.1%
Sharpe0.10-0.56-0.15-0.11
Sortino0.05-0.25-0.08-0.05
Calmar0.02-0.24-0.14-0.04
Volatility9.9%10.4%12.5%10.7%
Max DD-24.1%-25.9%-19.2%-38.3%
Win Rate31.6%16.7%40.0%32.5%
Avg Win8.3%13.1%6.0%7.6%
Avg Loss-3.3%-6.0%-4.8%-4.3%
Payoff2.512.191.261.78
Expectancy0.4%-2.8%-0.5%-0.4%
Profit Factor1.160.440.840.86
Trades1961540
Avg Holding Days16.320.710.314.7
Turnover2.92.44.93.3
Exposure8.7%9.4%9.0%8.9%

Growth of $100

LongTermTrend_V0371 vs TSLA Buy & Hold
LongTermTrend_V0371 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-5.3%-0.73-11.4%3
20178.6%2.05-0.5%1
2018-10.6%-1.38-11.1%2
2019-3.2%-0.15-14.4%3
20200.0%0.000.0%0
20213.5%0.35-7.6%3
2022-20.1%-1.60-22.3%3

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 testEXPENSIVE8325.7%2.441%
hidden testEXTREME480.0%0.000%
hidden testHIGH VOLATILITY254-9.3%-0.851%
hidden testLOW VOLATILITY4297.0%0.6113%
hidden testMEDIUM VOLATILITY248-9.6%-0.6310%
hidden testNORMAL800-4.8%-0.3710%
hidden testSIDEWAYS293-21.8%-1.6812%
hidden testUPTREND37112.6%0.7913%
trainDOWNTREND518-0.2%-0.790%
trainEXPENSIVE3110.7%0.840%
trainEXTREME1000.0%0.000%
trainHIGH VOLATILITY6992.4%0.230%
trainLOW VOLATILITY7459.7%0.9319%
trainMEDIUM VOLATILITY568-12.2%-1.425%
trainNORMAL1,6011.1%0.1011%
trainSIDEWAYS592-10.1%-1.106%
trainUPTREND9028.9%0.7015%
validationDOWNTREND1250.0%0.000%
validationEXPENSIVE1380.0%0.000%
validationEXTREME1440.0%0.000%
validationHIGH VOLATILITY258-7.1%-1.000%
validationLOW VOLATILITY1831.9%0.1528%
validationMEDIUM VOLATILITY315-9.1%-0.806%
validationNORMAL474-9.2%-0.7015%
validationSIDEWAYS206-20.5%-1.5713%
validationUPTREND425-0.3%-0.0311%

Trades (full period)

40 trades
EntryExitEntry PxExit PxReturnDays
2026-05-122026-06-08$433.45$408.95-7.42%19
2025-12-122026-01-05$458.96$451.67-1.20%15
2025-08-282025-09-15$345.98$410.047.78%12
2025-06-022025-06-06$342.69$295.14-10.95%5
2025-05-222025-05-28$341.04$356.904.92%4
2024-09-232024-10-14$250.00$219.16-5.15%16
2024-09-162024-09-20$226.78$238.253.45%5
2024-09-052024-09-09$230.17$216.27-2.39%3
2024-09-032024-09-04$210.60$219.41-1.10%2
2024-06-182024-07-03$184.86$246.3913.52%11
2023-12-192024-01-10$257.22$233.94-4.16%15
2023-09-122023-09-22$267.48$244.88-4.05%9
2023-06-222023-08-02$264.61$254.110.62%29
2023-06-012023-06-08$207.52$234.865.85%6
2023-04-032023-04-06$194.77$185.06-6.54%4
2022-09-202022-09-26$308.73$276.01-6.76%5
2022-08-032022-08-29$307.40$284.82-2.47%19
2022-03-292022-04-27$366.52$293.84-12.09%21
2021-11-092021-11-10$341.17$355.98-7.31%2
2021-08-032021-10-19$236.58$288.0913.10%55
2021-06-242021-07-26$226.61$219.21-1.24%22
2019-10-212019-10-25$16.90$21.889.89%5
2019-09-122019-09-25$16.39$15.25-5.95%10
2019-07-232019-07-26$17.34$15.20-6.30%4
2018-12-112018-12-19$24.45$22.20-4.75%7
2018-01-222018-02-09$23.44$20.69-6.05%15
2017-01-032017-01-24$14.47$16.979.52%15
2016-08-012016-08-23$15.33$14.99-3.16%17
2016-06-082016-06-10$15.70$14.59-0.88%3
2016-04-042016-05-04$16.47$14.84-1.32%23
2015-04-292015-07-28$15.50$17.655.91%63
2015-04-142015-04-21$13.83$13.96-1.41%6
2014-09-082014-09-16$18.81$17.38-5.18%7
2014-08-052014-09-03$15.90$18.7511.05%21
2014-06-192014-07-17$15.19$14.36-2.67%20
2013-03-272013-04-02$2.54$2.969.49%4
2013-02-122013-02-14$2.53$2.55-0.07%3
2012-11-062013-01-11$2.08$2.193.88%46
2012-07-162012-07-20$2.40$2.12-3.51%5
2012-02-172012-04-10$2.33$2.16-1.61%36