LongTermTrend_V0441
ARCHIVEDhybridllmRelaxed strict 20d return thresholds and dist_sma_50 to reduce overfitting; added breakout_20 flag to capture short momentum spikes; required mild short-term momentum (ret_5d > -2.5%) to avoid entering into immediate weakness; added regime gates to only trade in UPTREND, non-bubbly (NORMAL) regimes and avoid high volatility; reduced base position to 0.8 and added volatility scaling (cut to 0.4 when vol_pctile > 0.75, full size when vol_pctile <= 0.25); improved exit with additional short-term stop (ret_5d < -6%) and a technical exit if price falls below sma_50.
Lineage
Parents (1)
added entry filter: dist_sma_50 > -0.0774
Strategy Logic (pseudocode)
# LongTermTrend_V0441 [hybrid]
require regime.trend in ['UPTREND']
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 or breakout_20 == 1) and ret_5d > -0.025 and dist_sma_50 > -0.12 and cumret_252d > -0.4):
position = 0.8
if long and (ret_20d < -0.03 or ret_5d < -0.06 or close < sma_50):
position = 0.0 # exit to cashBacktest Metrics
| Metric | Train | Validation | Hidden Test | Full |
|---|
| CAGR | 3.1% | -8.5% | 1.2% | 0.1% |
| Total Return | 27.8% | -23.5% | 4.3% | 2.0% |
| Sharpe | 0.31 | -0.48 | 0.15 | 0.08 |
| Sortino | 0.19 | -0.24 | 0.08 | 0.04 |
| Calmar | 0.15 | -0.19 | 0.05 | 0.00 |
| Volatility | 12.2% | 16.0% | 15.5% | 13.9% |
| Max DD | -21.0% | -45.9% | -22.6% | -45.9% |
| Win Rate | 43.9% | 21.1% | 47.4% | 41.5% |
| Avg Win | 3.3% | 11.5% | 3.5% | 4.0% |
| Avg Loss | -1.8% | -4.3% | -2.7% | -2.6% |
| Payoff | 1.83 | 2.64 | 1.26 | 1.54 |
| Expectancy | 0.4% | -1.0% | 0.2% | 0.1% |
| Profit Factor | 1.44 | 0.70 | 1.14 | 1.09 |
| Trades | 66 | 19 | 38 | 123 |
| Avg Holding Days | 5.8 | 6.4 | 3.8 | 5.3 |
| Turnover | 13.2 | 10.1 | 16.5 | 13.4 |
| Exposure | 12.6% | 10.8% | 9.1% | 11.4% |
Growth of $100
LongTermTrend_V0441 vs TSLA Buy & Hold
LongTermTrend_V0441 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
| Year | CAGR | Sharpe | Max DD | Trades |
|---|
| 2016 | -11.8% | -1.33 | -16.7% | 7 |
| 2017 | 20.8% | 2.53 | -2.0% | 12 |
| 2018 | -7.0% | -0.93 | -8.6% | 2 |
| 2019 | 2.9% | 0.39 | -8.2% | 3 |
| 2020 | 0.0% | 0.00 | 0.0% | 0 |
| 2021 | 14.5% | 0.71 | -22.8% | 10 |
| 2022 | -33.2% | -2.49 | -33.1% | 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
| Period | Regime | Days | Ann. Return | Sharpe | Exposure |
|---|
| hidden test | DOWNTREND | 267 | 0.0% | 0.00 | 0% |
| hidden test | EXPENSIVE | 83 | 33.8% | 2.42 | 2% |
| hidden test | EXTREME | 48 | 0.0% | 0.00 | 0% |
| hidden test | HIGH VOLATILITY | 254 | -14.0% | -1.10 | 1% |
| hidden test | LOW VOLATILITY | 429 | 9.3% | 0.66 | 12% |
| hidden test | MEDIUM VOLATILITY | 248 | 7.0% | 0.36 | 12% |
| hidden test | NORMAL | 800 | -0.8% | -0.05 | 10% |
| hidden test | SIDEWAYS | 293 | -19.4% | -2.04 | 2% |
| hidden test | UPTREND | 371 | 21.2% | 0.92 | 21% |
| train | DOWNTREND | 518 | 0.0% | 0.00 | 0% |
| train | EXPENSIVE | 311 | 10.0% | 1.77 | 2% |
| train | EXTREME | 100 | 0.0% | 0.00 | 0% |
| train | HIGH VOLATILITY | 699 | 4.0% | 0.44 | 0% |
| train | LOW VOLATILITY | 745 | 9.5% | 0.67 | 26% |
| train | MEDIUM VOLATILITY | 568 | -3.9% | -0.31 | 10% |
| train | NORMAL | 1,601 | 2.8% | 0.21 | 16% |
| train | SIDEWAYS | 592 | -4.6% | -0.93 | 1% |
| train | UPTREND | 902 | 11.5% | 0.65 | 27% |
| validation | DOWNTREND | 125 | 0.0% | 0.00 | 0% |
| validation | EXPENSIVE | 138 | 0.0% | 0.00 | 0% |
| validation | EXTREME | 144 | 0.0% | 0.00 | 0% |
| validation | HIGH VOLATILITY | 258 | -9.6% | -1.01 | 0% |
| validation | LOW VOLATILITY | 183 | 6.8% | 0.52 | 26% |
| validation | MEDIUM VOLATILITY | 315 | -14.4% | -0.69 | 10% |
| validation | NORMAL | 474 | -12.2% | -0.60 | 17% |
| validation | SIDEWAYS | 206 | -28.9% | -2.17 | 2% |
| validation | UPTREND | 425 | 0.4% | 0.02 | 18% |
Trades (full period)
latest 100 of 123
| Entry | Exit | Entry Px | Exit Px | Return | Days | |
|---|
| 2026-07-01 | 2026-07-06 | $425.30 | $419.77 | -5.30% | 3 | |
| 2026-05-29 | 2026-06-01 | $435.79 | $415.88 | -1.30% | 2 | |
| 2026-02-17 | 2026-02-18 | $410.63 | $411.32 | -1.46% | 2 | |
| 2026-02-12 | 2026-02-13 | $417.07 | $417.44 | -2.25% | 2 | |
| 2026-02-10 | 2026-02-11 | $425.21 | $428.27 | 1.35% | 2 | |
| 2026-02-04 | 2026-02-05 | $406.01 | $397.21 | -3.18% | 2 | |
| 2026-01-12 | 2026-01-13 | $448.96 | $447.20 | 0.55% | 2 | |
| 2025-12-04 | 2025-12-31 | $454.53 | $449.72 | 1.30% | 19 | |
| 2025-12-02 | 2025-12-03 | $429.24 | $446.74 | -0.33% | 2 | |
| 2025-11-28 | 2025-12-01 | $430.17 | $430.14 | 0.51% | 2 | |
| 2025-11-25 | 2025-11-26 | $419.40 | $426.58 | 0.15% | 2 | |
| 2025-11-21 | 2025-11-24 | $391.09 | $417.78 | -1.00% | 2 | |
| 2025-09-12 | 2025-09-15 | $395.94 | $410.04 | 5.72% | 2 | |
| 2025-07-29 | 2025-07-30 | $321.20 | $319.04 | -1.24% | 2 | |
| 2025-07-24 | 2025-07-25 | $305.30 | $316.06 | -6.71% | 2 | |
| 2025-07-21 | 2025-07-23 | $328.49 | $332.56 | 0.44% | 3 | |
| 2025-07-17 | 2025-07-18 | $319.41 | $329.65 | -0.72% | 2 | |
| 2025-07-15 | 2025-07-16 | $310.78 | $321.67 | -1.70% | 2 | |
| 2025-06-02 | 2025-06-05 | $342.69 | $284.70 | -3.49% | 4 | |
| 2025-05-23 | 2025-05-28 | $339.34 | $356.90 | 4.96% | 3 | |
| 2024-10-23 | 2024-10-24 | $213.65 | $260.48 | -1.74% | 2 | |
| 2024-10-21 | 2024-10-22 | $218.85 | $217.97 | -0.83% | 2 | |
| 2024-10-11 | 2024-10-14 | $217.80 | $219.16 | -7.18% | 2 | |
| 2024-09-23 | 2024-09-27 | $250.00 | $260.46 | 5.19% | 5 | |
| 2024-09-16 | 2024-09-20 | $226.78 | $238.25 | 4.58% | 5 | |
| 2024-09-06 | 2024-09-09 | $210.73 | $216.27 | -6.91% | 2 | |
| 2024-09-04 | 2024-09-05 | $219.41 | $230.17 | 3.18% | 2 | |
| 2024-08-30 | 2024-09-03 | $214.11 | $210.60 | 2.87% | 2 | |
| 2024-07-02 | 2024-07-12 | $231.26 | $248.23 | 11.75% | 8 | |
| 2024-01-11 | 2024-01-12 | $227.22 | $218.89 | -2.46% | 2 | |
| 2024-01-03 | 2024-01-04 | $238.45 | $237.93 | -3.37% | 2 | |
| 2023-08-29 | 2023-09-05 | $257.18 | $256.49 | 1.98% | 5 | |
| 2023-08-25 | 2023-08-28 | $238.59 | $238.82 | 2.81% | 2 | |
| 2023-08-23 | 2023-08-24 | $236.86 | $230.04 | 1.10% | 2 | |
| 2023-08-04 | 2023-08-07 | $253.86 | $251.45 | -1.84% | 2 | |
| 2023-07-31 | 2023-08-02 | $267.43 | $254.11 | -1.77% | 3 | |
| 2023-06-29 | 2023-07-24 | $257.50 | $269.06 | 1.16% | 17 | |
| 2023-06-02 | 2023-06-27 | $213.97 | $250.21 | 12.72% | 17 | |
| 2022-09-20 | 2022-09-23 | $308.73 | $275.33 | -5.47% | 4 | |
| 2022-09-12 | 2022-09-14 | $304.42 | $302.61 | -2.16% | 3 | |
| 2022-08-16 | 2022-08-22 | $306.56 | $289.91 | -3.44% | 5 | |
| 2022-08-05 | 2022-08-08 | $288.17 | $290.42 | -5.46% | 2 | |
| 2022-05-04 | 2022-05-05 | $317.54 | $291.09 | 3.65% | 2 | |
| 2022-04-19 | 2022-04-27 | $342.72 | $293.84 | -10.31% | 7 | |
| 2022-04-14 | 2022-04-18 | $328.33 | $334.76 | -3.08% | 2 | |
| 2022-04-05 | 2022-04-12 | $363.75 | $328.98 | -12.12% | 6 | |
| 2021-12-30 | 2022-01-03 | $356.78 | $399.93 | -2.33% | 3 | |
| 2021-12-27 | 2021-12-29 | $364.65 | $362.06 | 1.45% | 3 | |
| 2021-12-22 | 2021-12-23 | $336.29 | $355.67 | 5.83% | 2 | |
| 2021-12-13 | 2021-12-14 | $322.14 | $319.50 | -4.14% | 2 | |
| 2021-12-09 | 2021-12-10 | $334.60 | $339.01 | -5.03% | 2 | |
| 2021-12-02 | 2021-12-03 | $361.53 | $338.32 | -0.92% | 2 | |
| 2021-11-23 | 2021-12-01 | $369.68 | $365.00 | -0.96% | 6 | |
| 2021-08-24 | 2021-11-10 | $236.16 | $355.98 | 34.93% | 56 | |
| 2021-08-05 | 2021-08-18 | $238.21 | $229.66 | -5.24% | 10 | |
| 2021-03-02 | 2021-03-03 | $228.81 | $217.73 | -3.72% | 2 | |
| 2021-02-19 | 2021-02-22 | $260.43 | $238.17 | -0.78% | 2 | |
| 2019-12-03 | 2019-12-17 | $22.41 | $25.27 | 10.87% | 11 | |
| 2019-11-22 | 2019-11-27 | $22.20 | $22.09 | -6.00% | 4 | |
| 2019-10-21 | 2019-10-22 | $16.90 | $17.04 | -1.23% | 2 | |
| 2018-11-27 | 2018-12-19 | $22.93 | $22.20 | -2.18% | 16 | |
| 2018-02-01 | 2018-02-06 | $23.28 | $22.26 | -4.95% | 4 | |
| 2017-10-19 | 2017-10-20 | $23.45 | $23.01 | -1.90% | 2 | |
| 2017-10-17 | 2017-10-18 | $23.72 | $23.98 | 1.01% | 2 | |
| 2017-10-13 | 2017-10-16 | $23.70 | $23.37 | -0.18% | 2 | |
| 2017-10-10 | 2017-10-12 | $23.71 | $23.71 | 2.56% | 3 | |
| 2017-10-03 | 2017-10-04 | $23.21 | $23.67 | 1.39% | 2 | |
| 2017-03-27 | 2017-03-28 | $18.01 | $18.50 | 1.98% | 2 | |
| 2017-03-20 | 2017-03-21 | $17.46 | $16.71 | -0.03% | 2 | |
| 2017-03-16 | 2017-03-17 | $17.47 | $17.43 | 1.82% | 2 | |
| 2017-03-14 | 2017-03-15 | $17.20 | $17.05 | 3.68% | 2 | |
| 2017-03-10 | 2017-03-13 | $16.25 | $16.41 | -0.55% | 2 | |
| 2017-01-31 | 2017-02-03 | $16.80 | $16.76 | 0.14% | 4 | |
| 2017-01-05 | 2017-01-25 | $15.12 | $16.96 | 9.47% | 14 | |
| 2016-08-29 | 2016-08-30 | $14.35 | $14.09 | -1.90% | 2 | |
| 2016-08-24 | 2016-08-26 | $14.84 | $14.67 | -1.54% | 3 | |
| 2016-07-26 | 2016-08-23 | $15.30 | $14.99 | -2.61% | 21 | |
| 2016-06-08 | 2016-06-09 | $15.70 | $15.29 | 0.93% | 2 | |
| 2016-06-01 | 2016-06-02 | $14.64 | $14.60 | -1.47% | 2 | |
| 2016-05-27 | 2016-05-31 | $14.87 | $14.88 | -0.90% | 2 | |
| 2016-04-05 | 2016-05-04 | $17.03 | $14.84 | -4.86% | 22 | |
| 2015-08-17 | 2015-08-18 | $17.00 | $17.38 | 3.73% | 2 | |
| 2015-08-04 | 2015-08-07 | $17.75 | $16.17 | -4.37% | 4 | |
| 2015-07-29 | 2015-08-03 | $17.59 | $17.33 | 0.24% | 4 | |
| 2015-07-15 | 2015-07-28 | $17.54 | $17.65 | -3.92% | 10 | |
| 2015-05-11 | 2015-07-13 | $15.97 | $17.48 | 7.49% | 44 | |
| 2015-04-29 | 2015-05-01 | $15.50 | $15.07 | -1.69% | 3 | |
| 2014-10-21 | 2014-10-22 | $15.69 | $15.41 | 1.53% | 2 | |
| 2014-10-09 | 2014-10-10 | $17.13 | $15.79 | -0.86% | 2 | |
| 2014-10-07 | 2014-10-08 | $17.30 | $17.29 | -0.48% | 2 | |
| 2014-10-03 | 2014-10-06 | $17.01 | $17.37 | 1.04% | 2 | |
| 2014-09-30 | 2014-10-01 | $16.18 | $16.02 | -1.00% | 2 | |
| 2014-09-23 | 2014-09-24 | $16.69 | $16.81 | -0.04% | 2 | |
| 2014-07-31 | 2014-09-16 | $14.89 | $17.38 | 8.64% | 33 | |
| 2014-07-29 | 2014-07-30 | $15.00 | $15.26 | -0.09% | 2 | |
| 2014-07-25 | 2014-07-28 | $14.90 | $14.99 | -0.15% | 2 | |
| 2014-07-23 | 2014-07-24 | $14.83 | $14.90 | 0.90% | 2 | |
| 2014-07-18 | 2014-07-21 | $14.67 | $14.70 | 1.55% | 2 | |
| 2014-07-15 | 2014-07-17 | $14.64 | $14.36 | -3.53% | 3 | |
| 2014-06-23 | 2014-07-08 | $15.81 | $14.60 | -2.54% | 11 | |