LongTermTrend_V1499
ARCHIVEDhybridllmIntroduce short-term trend filter (sma_50_slope>0) and require either long-term trend (close>sma_200 with positive slope) or momentum; relax ret_20d threshold to 0.03 to increase signal frequency; add volatility gate (only LOW/MEDIUM) and vol_pctile<0.7 to avoid high-volatility entries; add breakout or recent 5d momentum as alternative entry; expand exits with short-term stop (ret_5d<-3%) and overbought rsi>70; implement position scaling by vol_pctile (0.4 if vol_pctile>0.8, 0.7 if >0.6) and reduce base_position to 0.8. These structural changes aim to improve robustness and reduce drawdown while preserving upside.
Lineage
Parents (1)
changed ret_20d threshold 0.1 -> 0.0257
Strategy Logic (pseudocode)
# LongTermTrend_V1499 [hybrid]
require regime.volatility in ['LOW_VOLATILITY', 'MEDIUM_VOLATILITY']
require regime.bubble in ['NORMAL']
if flat and ((((close > sma_200 and sma_200_slope > 0.0) or ret_20d > 0.05) and sma_50_slope > 0.0) and ret_20d > 0.03 and cumret_252d > -0.25 and vol_pctile < 0.7 and (breakout_20 > 0.5 or ret_5d > 0.01)):
position = 0.8
if long and (ret_20d < -0.1003 or ret_5d < -0.03 or rsi_14 > 70.0):
position = 0.0 # exit to cashBacktest Metrics
| Metric | Train | Validation | Hidden Test | Full |
|---|
| CAGR | -1.0% | -3.3% | 1.1% | -0.9% |
| Total Return | -7.6% | -9.5% | 4.0% | -13.0% |
| Sharpe | -0.01 | -0.25 | 0.15 | -0.02 |
| Sortino | -0.01 | -0.10 | 0.07 | -0.01 |
| Calmar | -0.02 | -0.11 | 0.07 | -0.02 |
| Volatility | 12.8% | 10.9% | 10.9% | 12.0% |
| Max DD | -40.3% | -28.6% | -14.2% | -40.3% |
| Win Rate | 47.4% | 47.1% | 57.7% | 50.0% |
| Avg Win | 3.9% | 3.6% | 2.9% | 3.5% |
| Avg Loss | -3.5% | -4.1% | -3.5% | -3.6% |
| Payoff | 1.11 | 0.89 | 0.85 | 0.99 |
| Expectancy | -0.0% | -0.4% | 0.2% | -0.0% |
| Profit Factor | 1.00 | 0.79 | 1.16 | 0.99 |
| Trades | 57 | 17 | 26 | 100 |
| Avg Holding Days | 5.2 | 5.6 | 3.4 | 4.8 |
| Turnover | 11.4 | 9.1 | 11.1 | 10.9 |
| Exposure | 9.5% | 8.4% | 5.3% | 8.2% |
Growth of $100
LongTermTrend_V1499 vs TSLA Buy & Hold
LongTermTrend_V1499 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 | -3.0% | -0.31 | -11.0% | 6 |
| 2017 | 5.3% | 1.21 | -1.8% | 7 |
| 2018 | -10.6% | -1.33 | -11.3% | 3 |
| 2019 | -1.8% | 0.01 | -19.3% | 6 |
| 2020 | 0.0% | 0.00 | 0.0% | 0 |
| 2021 | 19.4% | 1.37 | -6.0% | 11 |
| 2022 | -24.3% | -2.05 | -24.2% | 6 |
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 | 278 | 0.0% | 0.00 | 0% |
| hidden test | EXPENSIVE | 83 | 17.6% | 1.72 | 1% |
| hidden test | EXTREME | 48 | 0.0% | 0.00 | 0% |
| hidden test | HIGH VOLATILITY | 254 | -1.0% | -0.11 | 1% |
| hidden test | LOW VOLATILITY | 443 | 2.4% | 0.20 | 8% |
| hidden test | MEDIUM VOLATILITY | 250 | 3.0% | 0.29 | 5% |
| hidden test | NORMAL | 816 | 0.1% | 0.01 | 6% |
| hidden test | SIDEWAYS | 298 | -14.0% | -1.74 | 6% |
| hidden test | UPTREND | 371 | 15.5% | 0.98 | 9% |
| train | DOWNTREND | 518 | 2.2% | 0.74 | 1% |
| train | EXPENSIVE | 311 | 5.0% | 1.05 | 1% |
| train | EXTREME | 100 | 0.0% | 0.00 | 0% |
| train | HIGH VOLATILITY | 699 | 1.7% | 0.12 | 1% |
| train | LOW VOLATILITY | 745 | 9.7% | 0.76 | 20% |
| train | MEDIUM VOLATILITY | 568 | -15.4% | -1.38 | 6% |
| train | NORMAL | 1,601 | -1.2% | -0.08 | 12% |
| train | SIDEWAYS | 592 | -8.0% | -0.69 | 7% |
| train | UPTREND | 902 | 3.6% | 0.22 | 16% |
| 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 | 0.0% | 0.00 | 0% |
| validation | LOW VOLATILITY | 183 | 5.0% | 0.43 | 24% |
| validation | MEDIUM VOLATILITY | 315 | -9.4% | -0.65 | 6% |
| validation | NORMAL | 474 | -4.3% | -0.31 | 13% |
| validation | SIDEWAYS | 206 | -19.7% | -1.69 | 2% |
| validation | UPTREND | 425 | 4.7% | 0.39 | 14% |
Trades (full period)
100 trades
| Entry | Exit | Entry Px | Exit Px | Return | Days | |
|---|
| 2026-05-27 | 2026-06-04 | $440.36 | $418.45 | -1.96% | 7 | |
| 2026-05-14 | 2026-05-19 | $443.30 | $404.11 | -6.52% | 4 | |
| 2025-12-15 | 2025-12-30 | $475.31 | $454.43 | 0.02% | 11 | |
| 2025-09-08 | 2025-09-15 | $346.40 | $410.04 | 10.06% | 6 | |
| 2025-08-25 | 2025-09-03 | $346.60 | $334.09 | -2.65% | 7 | |
| 2025-06-02 | 2025-06-04 | $342.69 | $332.05 | -0.66% | 3 | |
| 2024-09-16 | 2024-09-20 | $226.78 | $238.25 | 4.58% | 5 | |
| 2024-09-05 | 2024-09-09 | $230.17 | $216.27 | -3.25% | 3 | |
| 2024-07-10 | 2024-07-11 | $263.26 | $241.03 | 0.12% | 2 | |
| 2024-07-08 | 2024-07-09 | $252.94 | $262.33 | 0.29% | 2 | |
| 2024-07-03 | 2024-07-05 | $246.39 | $251.52 | 5.07% | 2 | |
| 2024-06-27 | 2024-07-02 | $197.42 | $231.26 | 5.32% | 4 | |
| 2023-07-19 | 2023-07-20 | $291.26 | $262.90 | -0.73% | 2 | |
| 2023-07-17 | 2023-07-18 | $290.38 | $293.34 | 2.40% | 2 | |
| 2023-07-06 | 2023-07-12 | $276.54 | $271.99 | -3.76% | 5 | |
| 2023-07-03 | 2023-07-05 | $279.82 | $282.48 | 5.35% | 2 | |
| 2023-06-23 | 2023-06-27 | $256.60 | $250.21 | -7.30% | 3 | |
| 2023-06-21 | 2023-06-22 | $259.46 | $264.61 | -4.53% | 2 | |
| 2023-06-16 | 2023-06-20 | $260.54 | $274.45 | 1.29% | 2 | |
| 2023-06-14 | 2023-06-15 | $256.79 | $255.90 | -0.75% | 2 | |
| 2023-06-12 | 2023-06-13 | $249.83 | $258.71 | 1.62% | 2 | |
| 2023-06-08 | 2023-06-09 | $234.86 | $244.40 | 3.50% | 2 | |
| 2023-06-06 | 2023-06-07 | $221.31 | $224.57 | 1.20% | 2 | |
| 2023-06-02 | 2023-06-05 | $213.97 | $217.61 | 2.32% | 2 | |
| 2023-05-31 | 2023-06-01 | $203.93 | $207.52 | 0.94% | 2 | |
| 2023-03-01 | 2023-03-03 | $202.77 | $197.79 | -5.92% | 3 | |
| 2022-09-21 | 2022-09-23 | $300.80 | $275.33 | -5.39% | 3 | |
| 2022-08-15 | 2022-08-23 | $309.32 | $296.45 | -2.84% | 7 | |
| 2022-08-04 | 2022-08-05 | $308.63 | $288.17 | 0.16% | 2 | |
| 2022-08-02 | 2022-08-03 | $300.59 | $307.40 | 0.73% | 2 | |
| 2022-04-20 | 2022-04-27 | $325.73 | $293.84 | -11.99% | 6 | |
| 2022-04-05 | 2022-04-07 | $363.75 | $352.42 | -7.15% | 3 | |
| 2021-11-23 | 2021-12-03 | $369.68 | $338.32 | -5.13% | 8 | |
| 2021-11-05 | 2021-11-08 | $407.36 | $387.65 | -0.67% | 2 | |
| 2021-11-03 | 2021-11-04 | $404.62 | $409.97 | 2.70% | 2 | |
| 2021-11-01 | 2021-11-02 | $402.86 | $390.67 | 6.63% | 2 | |
| 2021-10-28 | 2021-10-29 | $359.01 | $371.33 | 2.86% | 2 | |
| 2021-10-26 | 2021-10-27 | $339.48 | $345.95 | -0.66% | 2 | |
| 2021-10-22 | 2021-10-25 | $303.23 | $341.62 | 1.24% | 2 | |
| 2021-10-20 | 2021-10-21 | $288.60 | $298.00 | -0.02% | 2 | |
| 2021-10-18 | 2021-10-19 | $290.04 | $288.09 | 2.41% | 2 | |
| 2021-08-24 | 2021-10-15 | $236.16 | $281.01 | 12.38% | 38 | |
| 2021-08-03 | 2021-08-17 | $236.58 | $221.90 | -2.79% | 11 | |
| 2019-12-05 | 2019-12-17 | $22.02 | $25.27 | 11.35% | 9 | |
| 2019-11-22 | 2019-11-25 | $22.20 | $22.42 | -5.07% | 2 | |
| 2019-10-16 | 2019-10-25 | $17.32 | $21.88 | 12.82% | 8 | |
| 2019-09-12 | 2019-09-25 | $16.39 | $15.25 | -7.91% | 10 | |
| 2019-07-25 | 2019-07-26 | $15.25 | $15.20 | -11.04% | 2 | |
| 2019-07-22 | 2019-07-24 | $17.05 | $17.66 | 0.46% | 3 | |
| 2018-12-04 | 2018-12-18 | $23.98 | $22.47 | -2.37% | 10 | |
| 2018-03-13 | 2018-03-15 | $22.79 | $21.71 | -4.53% | 3 | |
| 2018-01-22 | 2018-02-06 | $23.44 | $22.26 | -4.00% | 12 | |
| 2017-01-23 | 2017-01-24 | $16.59 | $16.97 | 1.21% | 2 | |
| 2017-01-19 | 2017-01-20 | $16.25 | $16.32 | 1.65% | 2 | |
| 2017-01-17 | 2017-01-18 | $15.71 | $15.89 | -0.89% | 2 | |
| 2017-01-12 | 2017-01-13 | $15.31 | $15.85 | -0.21% | 2 | |
| 2017-01-10 | 2017-01-11 | $15.32 | $15.32 | -0.65% | 2 | |
| 2017-01-06 | 2017-01-09 | $15.27 | $15.42 | 0.64% | 2 | |
| 2016-12-30 | 2017-01-05 | $14.25 | $15.12 | 4.41% | 4 | |
| 2016-12-28 | 2016-12-29 | $14.65 | $14.31 | -0.08% | 2 | |
| 2016-07-26 | 2016-08-30 | $15.30 | $14.09 | -5.31% | 26 | |
| 2016-04-18 | 2016-05-02 | $16.93 | $16.12 | -4.48% | 11 | |
| 2016-04-08 | 2016-04-14 | $16.67 | $16.79 | -0.98% | 5 | |
| 2016-04-06 | 2016-04-07 | $17.69 | $17.15 | 2.95% | 2 | |
| 2016-04-01 | 2016-04-05 | $15.84 | $17.03 | 5.81% | 3 | |
| 2015-12-30 | 2016-01-05 | $15.87 | $14.90 | -4.79% | 4 | |
| 2015-08-06 | 2015-08-07 | $16.41 | $16.17 | -7.26% | 2 | |
| 2015-07-20 | 2015-07-27 | $18.82 | $16.87 | -2.83% | 6 | |
| 2015-07-07 | 2015-07-09 | $17.86 | $17.19 | -7.27% | 3 | |
| 2015-06-29 | 2015-07-06 | $17.47 | $18.65 | 3.71% | 5 | |
| 2015-06-25 | 2015-06-26 | $17.92 | $17.81 | 0.93% | 2 | |
| 2015-06-22 | 2015-06-24 | $17.32 | $17.68 | 1.41% | 3 | |
| 2015-06-18 | 2015-06-19 | $17.46 | $17.50 | 0.29% | 2 | |
| 2015-06-09 | 2015-06-10 | $17.07 | $16.71 | -0.25% | 2 | |
| 2015-05-29 | 2015-06-01 | $16.72 | $16.63 | -0.37% | 2 | |
| 2015-05-19 | 2015-05-20 | $16.48 | $16.29 | -0.68% | 2 | |
| 2015-05-15 | 2015-05-18 | $16.59 | $16.58 | 1.39% | 2 | |
| 2015-05-13 | 2015-05-14 | $16.21 | $16.27 | -0.67% | 2 | |
| 2015-05-11 | 2015-05-12 | $15.97 | $16.32 | 0.81% | 2 | |
| 2015-05-01 | 2015-05-08 | $15.07 | $15.77 | 3.63% | 6 | |
| 2015-04-29 | 2015-04-30 | $15.50 | $15.07 | 0.52% | 2 | |
| 2015-04-14 | 2015-04-28 | $13.83 | $15.37 | 8.10% | 11 | |
| 2014-09-05 | 2014-09-16 | $18.49 | $17.38 | -9.18% | 8 | |
| 2014-09-03 | 2014-09-04 | $18.75 | $19.07 | -0.98% | 2 | |
| 2014-08-26 | 2014-09-02 | $17.45 | $18.94 | 2.01% | 5 | |
| 2014-08-15 | 2014-08-18 | $17.47 | $17.33 | 0.03% | 2 | |
| 2014-08-13 | 2014-08-14 | $17.35 | $17.43 | -0.05% | 2 | |
| 2014-08-08 | 2014-08-12 | $16.54 | $17.33 | 2.04% | 3 | |
| 2014-07-15 | 2014-08-07 | $14.64 | $16.83 | 7.66% | 18 | |
| 2014-06-26 | 2014-07-03 | $15.71 | $15.28 | -2.67% | 6 | |
| 2014-06-23 | 2014-06-24 | $15.81 | $15.50 | 2.50% | 2 | |
| 2013-03-26 | 2013-04-02 | $2.52 | $2.96 | 13.44% | 5 | |
| 2013-02-20 | 2013-02-22 | $2.57 | $2.41 | -8.57% | 3 | |
| 2013-02-12 | 2013-02-14 | $2.53 | $2.55 | -0.10% | 3 | |
| 2012-12-13 | 2012-12-31 | $2.24 | $2.26 | -4.78% | 12 | |
| 2012-12-05 | 2012-12-12 | $2.25 | $2.35 | 3.08% | 6 | |
| 2012-11-12 | 2012-12-04 | $2.07 | $2.26 | 11.07% | 16 | |
| 2012-03-27 | 2012-04-05 | $2.53 | $2.30 | -5.25% | 8 | |
| 2012-03-12 | 2012-03-21 | $2.40 | $2.34 | 0.36% | 8 | |
| 2012-02-23 | 2012-02-28 | $2.30 | $2.25 | -1.56% | 4 | |