LongTermTrend_V1306
ARCHIVEDhybridllm1) Added a clear uptrend regime gate and limited volatility to LOW/MEDIUM to avoid trading in adverse regimes. 2) Simplified and de-duplicated entry conditions, tightened sma_200_slope cutoff and allowed shorter 20d momentum entry. 3) Improved exit to include price under sma_50 and negative MACD histogram in addition to the 20d loss. 4) Introduced volatility-aware position sizing: full size on strong trend + low vol, reduced size when volatility is high or rising, and conservative sizing after large drawdowns. 5) Lowered base_position to 0.6 to reduce turnover and drawdown risk.
Lineage
Parents (1)
changed sma_200_slope threshold 0.0 -> -0.0012
Strategy Logic (pseudocode)
# LongTermTrend_V1306 [hybrid]
require regime.trend in ['UPTREND']
require regime.volatility in ['LOW_VOLATILITY', 'MEDIUM_VOLATILITY']
require regime.bubble in ['EXPENSIVE', 'EXTREME']
if flat and (((close > sma_200 and sma_200_slope > -0.0005) or ret_20d > 0.08) and ret_20d > 0.03 and cumret_252d > -0.25):
position = 0.6
if long and (ret_20d < -0.1003 or close < sma_50 or macd_hist < 0.0):
position = 0.0 # exit to cashBacktest Metrics
| Metric | Train | Validation | Hidden Test | Full |
|---|
| CAGR | 1.4% | 26.4% | 0.3% | 5.9% |
| Total Return | 11.7% | 101.8% | 1.1% | 132.0% |
| Sharpe | 0.22 | 1.72 | 0.08 | 0.67 |
| Sortino | 0.09 | 1.37 | 0.03 | 0.32 |
| Calmar | 0.10 | 4.76 | 0.03 | 0.42 |
| Volatility | 7.6% | 14.2% | 6.6% | 9.2% |
| Max DD | -13.9% | -5.5% | -11.1% | -13.9% |
| Win Rate | 39.0% | 66.7% | 46.2% | 48.7% |
| Avg Win | 3.0% | 5.6% | 2.4% | 4.2% |
| Avg Loss | -1.6% | -1.6% | -1.8% | -1.7% |
| Payoff | 1.87 | 3.44 | 1.30 | 2.56 |
| Expectancy | 0.2% | 3.2% | 0.1% | 1.2% |
| Profit Factor | 1.19 | 6.88 | 1.12 | 2.43 |
| Trades | 41 | 24 | 13 | 78 |
| Avg Holding Days | 3.9 | 4.9 | 3.8 | 4.3 |
| Turnover | 6.2 | 9.6 | 4.2 | 6.4 |
| Exposure | 3.8% | 7.4% | 2.4% | 4.2% |
Growth of $100
LongTermTrend_V1306 vs TSLA Buy & Hold
LongTermTrend_V1306 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 | 0.0% | 0.00 | 0.0% | 0 |
| 2017 | -3.0% | -0.24 | -9.1% | 22 |
| 2018 | 0.0% | 0.00 | 0.0% | 0 |
| 2019 | 5.7% | 1.31 | -2.3% | 0 |
| 2020 | 90.4% | 3.04 | -5.4% | 16 |
| 2021 | 5.8% | 0.59 | -5.5% | 7 |
| 2022 | 0.0% | 0.00 | 0.0% | 0 |
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 | 1.9% | 0.11 | 20% |
| hidden test | EXTREME | 48 | 17.7% | 0.93 | 10% |
| hidden test | HIGH VOLATILITY | 254 | -2.1% | -1.02 | 0% |
| hidden test | LOW VOLATILITY | 440 | 11.2% | 2.10 | 2% |
| hidden test | MEDIUM VOLATILITY | 250 | -15.7% | -1.50 | 5% |
| hidden test | NORMAL | 813 | -0.6% | -0.57 | 0% |
| hidden test | SIDEWAYS | 295 | 0.0% | 0.00 | 0% |
| hidden test | UPTREND | 371 | 1.3% | 0.12 | 6% |
| train | DOWNTREND | 518 | 0.0% | 0.00 | 0% |
| train | EXPENSIVE | 311 | 7.4% | 0.42 | 19% |
| train | EXTREME | 100 | 23.1% | 1.60 | 16% |
| train | HIGH VOLATILITY | 699 | -0.4% | -0.05 | 1% |
| train | LOW VOLATILITY | 745 | 4.0% | 0.63 | 6% |
| train | MEDIUM VOLATILITY | 568 | 1.3% | 0.15 | 5% |
| train | NORMAL | 1,601 | -0.8% | -0.69 | 0% |
| train | SIDEWAYS | 592 | 0.0% | 0.00 | 0% |
| train | UPTREND | 902 | 3.8% | 0.33 | 9% |
| validation | DOWNTREND | 125 | 0.0% | 0.00 | 0% |
| validation | EXPENSIVE | 138 | 30.9% | 1.33 | 27% |
| validation | EXTREME | 144 | 98.5% | 4.31 | 13% |
| validation | HIGH VOLATILITY | 258 | 21.4% | 1.90 | 1% |
| validation | LOW VOLATILITY | 183 | 9.5% | 1.10 | 4% |
| validation | MEDIUM VOLATILITY | 315 | 35.5% | 1.93 | 14% |
| validation | NORMAL | 474 | 0.0% | 0.00 | 0% |
| validation | SIDEWAYS | 206 | 0.0% | 0.00 | 0% |
| validation | UPTREND | 425 | 43.4% | 2.30 | 13% |
Trades (full period)
78 trades
| Entry | Exit | Entry Px | Exit Px | Return | Days | |
|---|
| 2025-11-10 | 2025-11-11 | $445.23 | $439.62 | 2.07% | 2 | |
| 2025-11-06 | 2025-11-07 | $445.91 | $429.52 | -2.22% | 2 | |
| 2025-11-03 | 2025-11-05 | $468.37 | $462.07 | -1.70% | 3 | |
| 2025-10-29 | 2025-10-30 | $461.51 | $440.10 | 0.01% | 2 | |
| 2025-10-24 | 2025-10-27 | $433.72 | $452.42 | -2.16% | 2 | |
| 2025-10-22 | 2025-10-23 | $438.97 | $448.98 | -0.61% | 2 | |
| 2025-10-20 | 2025-10-21 | $447.43 | $442.60 | 0.99% | 2 | |
| 2025-10-13 | 2025-10-14 | $435.90 | $429.24 | 3.13% | 2 | |
| 2025-10-09 | 2025-10-10 | $435.54 | $413.49 | -0.55% | 2 | |
| 2025-10-07 | 2025-10-08 | $433.09 | $438.69 | -2.79% | 2 | |
| 2025-09-15 | 2025-10-06 | $410.04 | $453.25 | 5.09% | 16 | |
| 2025-05-28 | 2025-06-02 | $356.90 | $342.69 | -2.84% | 4 | |
| 2024-12-11 | 2024-12-23 | $424.77 | $430.60 | 3.09% | 9 | |
| 2021-02-10 | 2021-02-11 | $268.27 | $270.55 | -3.27% | 2 | |
| 2021-02-05 | 2021-02-08 | $284.08 | $287.81 | 0.04% | 2 | |
| 2021-02-03 | 2021-02-04 | $284.90 | $283.33 | -1.36% | 2 | |
| 2021-02-01 | 2021-02-02 | $279.94 | $290.93 | 3.38% | 2 | |
| 2021-01-28 | 2021-01-29 | $278.48 | $264.51 | -2.11% | 2 | |
| 2021-01-26 | 2021-01-27 | $294.36 | $288.05 | 0.04% | 2 | |
| 2021-01-05 | 2021-01-25 | $245.04 | $293.60 | 9.48% | 14 | |
| 2020-12-31 | 2021-01-04 | $235.22 | $243.26 | 0.82% | 2 | |
| 2020-12-29 | 2020-12-30 | $222.00 | $231.59 | 0.09% | 2 | |
| 2020-12-24 | 2020-12-28 | $220.59 | $221.23 | 1.35% | 2 | |
| 2020-12-18 | 2020-12-23 | $231.67 | $215.33 | -1.45% | 4 | |
| 2020-11-19 | 2020-12-17 | $166.42 | $218.63 | 16.23% | 20 | |
| 2020-10-26 | 2020-10-27 | $140.09 | $141.56 | -0.17% | 2 | |
| 2020-10-22 | 2020-10-23 | $141.93 | $140.21 | 0.33% | 2 | |
| 2020-10-13 | 2020-10-20 | $148.88 | $140.65 | -1.65% | 6 | |
| 2020-08-31 | 2020-09-01 | $166.11 | $158.35 | 7.42% | 2 | |
| 2020-08-26 | 2020-08-27 | $143.54 | $149.25 | 3.73% | 2 | |
| 2020-07-02 | 2020-07-06 | $80.58 | $91.44 | 4.65% | 2 | |
| 2020-06-30 | 2020-07-01 | $71.99 | $74.64 | 4.07% | 2 | |
| 2020-06-26 | 2020-06-29 | $63.98 | $67.29 | -1.72% | 2 | |
| 2020-06-03 | 2020-06-25 | $58.86 | $65.73 | 5.47% | 17 | |
| 2020-06-01 | 2020-06-02 | $59.87 | $58.77 | 4.41% | 2 | |
| 2020-05-28 | 2020-05-29 | $53.72 | $55.67 | -1.17% | 2 | |
| 2019-12-17 | 2020-01-31 | $25.27 | $43.37 | 36.98% | 31 | |
| 2017-10-09 | 2017-10-10 | $22.86 | $23.71 | -2.46% | 2 | |
| 2017-10-05 | 2017-10-06 | $23.69 | $23.79 | -0.07% | 2 | |
| 2017-09-18 | 2017-09-25 | $25.67 | $23.00 | -4.69% | 6 | |
| 2017-08-15 | 2017-08-18 | $24.16 | $23.16 | -2.08% | 4 | |
| 2017-08-04 | 2017-08-07 | $23.79 | $23.68 | 1.58% | 2 | |
| 2017-06-30 | 2017-07-03 | $24.11 | $23.51 | 0.02% | 2 | |
| 2017-06-28 | 2017-06-29 | $24.75 | $24.05 | 1.35% | 2 | |
| 2017-06-05 | 2017-06-27 | $23.15 | $24.16 | 6.46% | 17 | |
| 2017-05-17 | 2017-05-18 | $20.41 | $20.87 | -2.18% | 2 | |
| 2017-05-12 | 2017-05-16 | $21.65 | $21.13 | -1.46% | 3 | |
| 2017-05-08 | 2017-05-09 | $20.48 | $21.42 | -0.35% | 2 | |
| 2017-05-02 | 2017-05-04 | $21.26 | $19.70 | -2.32% | 3 | |
| 2017-04-28 | 2017-05-01 | $20.94 | $21.52 | 0.94% | 2 | |
| 2017-04-26 | 2017-04-27 | $20.68 | $20.58 | -0.81% | 2 | |
| 2017-04-24 | 2017-04-25 | $20.54 | $20.92 | 0.36% | 2 | |
| 2017-04-20 | 2017-04-21 | $20.17 | $20.37 | -0.71% | 2 | |
| 2017-03-28 | 2017-04-04 | $18.50 | $20.25 | 6.10% | 6 | |
| 2017-02-23 | 2017-02-24 | $17.07 | $17.13 | -3.96% | 2 | |
| 2017-02-09 | 2017-02-22 | $17.95 | $18.23 | 3.40% | 9 | |
| 2017-02-07 | 2017-02-08 | $17.17 | $17.47 | -0.19% | 2 | |
| 2017-02-03 | 2017-02-06 | $16.76 | $17.18 | -0.17% | 2 | |
| 2017-01-25 | 2017-01-31 | $16.96 | $16.80 | -1.06% | 5 | |
| 2014-03-24 | 2014-03-25 | $14.68 | $14.70 | -2.40% | 2 | |
| 2014-03-20 | 2014-03-21 | $15.66 | $15.26 | -0.36% | 2 | |
| 2014-02-13 | 2014-02-26 | $13.31 | $16.87 | 15.66% | 9 | |
| 2013-10-17 | 2013-10-18 | $12.19 | $12.23 | -0.37% | 2 | |
| 2013-10-15 | 2013-10-16 | $12.26 | $12.24 | 1.29% | 2 | |
| 2013-10-11 | 2013-10-14 | $11.91 | $11.98 | 1.88% | 2 | |
| 2013-10-09 | 2013-10-10 | $11.25 | $11.53 | -2.16% | 2 | |
| 2013-10-07 | 2013-10-08 | $12.20 | $11.65 | 0.57% | 2 | |
| 2013-09-23 | 2013-10-04 | $12.07 | $12.07 | -3.37% | 10 | |
| 2013-09-19 | 2013-09-20 | $11.86 | $12.23 | 4.10% | 2 | |
| 2013-09-17 | 2013-09-18 | $11.08 | $11.08 | -0.25% | 2 | |
| 2013-09-13 | 2013-09-16 | $11.04 | $11.11 | 0.10% | 2 | |
| 2013-09-11 | 2013-09-12 | $10.90 | $11.00 | -1.15% | 2 | |
| 2013-09-09 | 2013-09-10 | $10.71 | $11.09 | -2.37% | 2 | |
| 2013-07-02 | 2013-07-17 | $7.85 | $8.02 | -4.00% | 11 | |
| 2013-06-28 | 2013-07-01 | $7.16 | $7.81 | -1.16% | 2 | |
| 2013-04-30 | 2013-05-08 | $3.60 | $3.72 | 0.66% | 7 | |
| 2013-02-14 | 2013-02-15 | $2.55 | $2.47 | -0.40% | 2 | |
| 2013-01-24 | 2013-02-12 | $2.47 | $2.53 | 3.90% | 14 | |