LongTermTrend_V0763
ARCHIVEDhybridllmReduced base position to 0.6 to lower drawdown risk; added trend regime gate (UPTREND) and limited to LOW/MEDIUM volatility and NORMAL bubble to improve robustness; entry strengthened to require sma_50>sma_200, positive sma_50_slope and price>k sma_50 plus momentum/breakout or recent return to avoid overfitting to a single ret_20d threshold; added vol_pctile filter to avoid extreme volatility entries; improved exit with multi-condition (20d loss, price under sma_50, or negative macd_hist) for better early stops; added position scaling rules by vol_pctile and proximity to 52w high.
Lineage
entry from LongTermTrend_V0323, exit from PriceMomentum_V0557
Strategy Logic (pseudocode)
# LongTermTrend_V0763 [hybrid]
require regime.volatility in ['LOW_VOLATILITY', 'MEDIUM_VOLATILITY']
if flat and ((sma_50 > sma_200 and sma_50_slope > 0.0 and close > sma_50) and (ret_20d > 0.05 or breakout_20 > 0.0 or momentum_60 > 0.0) and cumret_252d > -0.2 and vol_pctile < 0.85):
position = 0.6
if long and (ret_20d < -0.08 or close < sma_50 or macd_hist < 0.0):
position = 0.0 # exit to cashBacktest Metrics
| Metric | Train | Validation | Hidden Test | Full |
|---|---|---|---|---|
| CAGR | -3.2% | 24.6% | -3.4% | 2.0% |
| Total Return | -22.7% | 93.2% | -12.2% | 33.4% |
| Sharpe | -0.23 | 1.33 | -0.31 | 0.22 |
| Sortino | -0.15 | 1.20 | -0.14 | 0.15 |
| Calmar | -0.10 | 1.05 | -0.22 | 0.06 |
| Volatility | 11.1% | 17.7% | 9.8% | 12.5% |
| Max DD | -33.4% | -23.4% | -15.7% | -35.4% |
| Win Rate | 35.3% | 50.0% | 51.2% | 41.7% |
| Avg Win | 2.2% | 4.4% | 1.5% | 2.8% |
| Avg Loss | -1.5% | -1.7% | -2.1% | -1.7% |
| Payoff | 1.41 | 2.64 | 0.70 | 1.69 |
| Expectancy | -0.2% | 1.4% | -0.3% | 0.2% |
| Profit Factor | 0.77 | 2.64 | 0.73 | 1.21 |
| Trades | 133 | 54 | 43 | 230 |
| Avg Holding Days | 3.2 | 4.2 | 3.0 | 3.5 |
| Turnover | 20.1 | 21.6 | 13.9 | 18.8 |
| Exposure | 9.2% | 13.6% | 5.4% | 9.1% |
Growth of $100
Walk-Forward Years
| Year | CAGR | Sharpe | Max DD | Trades |
|---|---|---|---|---|
| 2016 | -6.8% | -1.84 | -6.8% | 9 |
| 2017 | -5.9% | -0.40 | -13.3% | 29 |
| 2018 | -4.5% | -1.16 | -5.4% | 4 |
| 2019 | 4.1% | 0.60 | -6.0% | 7 |
| 2020 | 90.7% | 2.91 | -7.2% | 21 |
| 2021 | 13.2% | 0.76 | -15.1% | 24 |
| 2022 | -10.6% | -1.47 | -10.6% | 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
| Period | Regime | Days | Ann. Return | Sharpe | Exposure |
|---|---|---|---|---|---|
| hidden test | DOWNTREND | 272 | 0.0% | 0.00 | 0% |
| hidden test | EXPENSIVE | 83 | 15.0% | 0.89 | 19% |
| hidden test | EXTREME | 48 | 20.5% | 1.08 | 11% |
| hidden test | HIGH VOLATILITY | 254 | -2.9% | -0.41 | 1% |
| hidden test | LOW VOLATILITY | 432 | 5.1% | 0.63 | 6% |
| hidden test | MEDIUM VOLATILITY | 250 | -17.2% | -1.23 | 9% |
| hidden test | NORMAL | 805 | -6.3% | -0.80 | 4% |
| hidden test | SIDEWAYS | 293 | -3.9% | -0.86 | 0% |
| hidden test | UPTREND | 371 | -4.5% | -0.30 | 13% |
| train | DOWNTREND | 518 | 0.0% | 0.00 | 0% |
| train | EXPENSIVE | 311 | 6.4% | 0.32 | 21% |
| train | EXTREME | 100 | 27.7% | 1.89 | 17% |
| train | HIGH VOLATILITY | 699 | 0.4% | 0.04 | 1% |
| train | LOW VOLATILITY | 745 | 0.6% | 0.05 | 17% |
| train | MEDIUM VOLATILITY | 568 | -10.5% | -0.89 | 9% |
| train | NORMAL | 1,601 | -6.3% | -0.77 | 6% |
| train | SIDEWAYS | 592 | -0.0% | -0.65 | 0% |
| train | UPTREND | 902 | -5.8% | -0.35 | 20% |
| validation | DOWNTREND | 125 | 0.0% | 0.00 | 0% |
| validation | EXPENSIVE | 138 | 25.4% | 1.10 | 30% |
| validation | EXTREME | 144 | 106.2% | 4.34 | 14% |
| validation | HIGH VOLATILITY | 258 | 16.8% | 1.04 | 2% |
| validation | LOW VOLATILITY | 183 | 16.7% | 1.55 | 18% |
| validation | MEDIUM VOLATILITY | 315 | 33.0% | 1.51 | 21% |
| validation | NORMAL | 474 | -2.2% | -0.17 | 9% |
| validation | SIDEWAYS | 206 | -6.3% | -1.13 | 0% |
| validation | UPTREND | 425 | 44.9% | 1.93 | 24% |
Trades (full period)
| Entry | Exit | Entry Px | Exit Px | Return | Days | |
|---|---|---|---|---|---|---|
| 2026-01-12 | 2026-01-13 | $448.96 | $447.20 | 0.41% | 2 | |
| 2026-01-06 | 2026-01-07 | $432.96 | $431.41 | -2.60% | 2 | |
| 2025-12-31 | 2026-01-02 | $449.72 | $438.07 | -0.74% | 2 | |
| 2025-12-04 | 2025-12-30 | $454.53 | $454.43 | 1.72% | 18 | |
| 2025-11-12 | 2025-11-13 | $430.60 | $401.99 | -1.35% | 2 | |
| 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-04 | 2025-11-05 | $444.26 | $462.07 | -3.21% | 2 | |
| 2025-10-31 | 2025-11-03 | $456.56 | $468.37 | 2.12% | 2 | |
| 2025-10-29 | 2025-10-30 | $461.51 | $440.10 | 0.01% | 2 | |
| 2025-10-27 | 2025-10-28 | $452.42 | $460.55 | 2.47% | 2 | |
| 2025-10-23 | 2025-10-24 | $448.98 | $433.72 | 1.25% | 2 | |
| 2025-10-21 | 2025-10-22 | $442.60 | $438.97 | -0.77% | 2 | |
| 2025-10-17 | 2025-10-20 | $439.31 | $447.43 | 1.36% | 2 | |
| 2025-10-15 | 2025-10-16 | $435.15 | $428.75 | 0.71% | 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-17 | 2025-10-06 | $425.86 | $453.25 | 1.18% | 14 | |
| 2025-07-29 | 2025-07-30 | $321.20 | $319.04 | -0.93% | 2 | |
| 2025-07-21 | 2025-07-25 | $328.49 | $316.06 | -4.53% | 5 | |
| 2025-01-31 | 2025-02-03 | $404.60 | $383.68 | 0.53% | 2 | |
| 2024-12-11 | 2024-12-23 | $424.77 | $430.60 | 3.09% | 9 | |
| 2024-10-09 | 2024-10-10 | $241.05 | $238.77 | -0.97% | 2 | |
| 2024-10-07 | 2024-10-08 | $240.83 | $244.50 | -2.34% | 2 | |
| 2024-10-03 | 2024-10-04 | $240.66 | $250.08 | -2.13% | 2 | |
| 2024-09-16 | 2024-09-20 | $226.78 | $238.25 | 3.45% | 5 | |
| 2024-09-06 | 2024-09-09 | $210.73 | $216.27 | -5.18% | 2 | |
| 2023-08-07 | 2023-08-08 | $251.45 | $249.70 | -0.69% | 2 | |
| 2023-08-03 | 2023-08-04 | $259.32 | $253.86 | 1.11% | 2 | |
| 2023-08-01 | 2023-08-02 | $261.07 | $254.11 | -1.55% | 2 | |
| 2023-07-28 | 2023-07-31 | $266.44 | $267.43 | 2.40% | 2 | |
| 2023-07-26 | 2023-07-27 | $264.35 | $255.71 | -0.33% | 2 | |
| 2023-07-24 | 2023-07-25 | $269.06 | $265.28 | 1.96% | 2 | |
| 2023-07-20 | 2023-07-21 | $262.90 | $260.02 | -5.96% | 2 | |
| 2023-07-18 | 2023-07-19 | $293.34 | $291.26 | 0.49% | 2 | |
| 2023-07-14 | 2023-07-17 | $281.38 | $290.38 | 0.63% | 2 | |
| 2023-07-12 | 2023-07-13 | $271.99 | $277.90 | 0.37% | 2 | |
| 2023-07-10 | 2023-07-11 | $269.61 | $269.79 | -1.17% | 2 | |
| 2023-07-05 | 2023-07-07 | $282.48 | $274.43 | -0.82% | 3 | |
| 2023-06-30 | 2023-07-03 | $261.77 | $279.82 | 0.87% | 2 | |
| 2023-06-28 | 2023-06-29 | $256.24 | $257.50 | 1.33% | 2 | |
| 2023-06-26 | 2023-06-27 | $241.05 | $250.21 | -3.75% | 2 | |
| 2022-05-05 | 2022-05-06 | $291.09 | $288.55 | -5.11% | 2 | |
| 2022-04-25 | 2022-04-26 | $332.67 | $292.14 | -0.54% | 2 | |
| 2022-04-21 | 2022-04-22 | $336.26 | $335.02 | 1.82% | 2 | |
| 2022-04-19 | 2022-04-20 | $342.72 | $325.73 | 1.30% | 2 | |
| 2022-04-14 | 2022-04-18 | $328.33 | $334.76 | -2.31% | 2 | |
| 2022-04-12 | 2022-04-13 | $328.98 | $340.79 | 0.56% | 2 | |
| 2022-04-05 | 2022-04-11 | $363.75 | $325.31 | -6.48% | 5 | |
| 2021-12-27 | 2022-01-03 | $364.65 | $399.93 | -0.68% | 6 | |
| 2021-12-10 | 2021-12-13 | $339.01 | $322.14 | 0.67% | 2 | |
| 2021-12-08 | 2021-12-09 | $356.32 | $334.60 | 0.86% | 2 | |
| 2021-12-06 | 2021-12-07 | $336.34 | $350.58 | -0.47% | 2 | |
| 2021-12-02 | 2021-12-03 | $361.53 | $338.32 | -0.69% | 2 | |
| 2021-11-30 | 2021-12-01 | $381.59 | $365.00 | 0.29% | 2 | |
| 2021-11-26 | 2021-11-29 | $360.64 | $379.00 | -1.95% | 2 | |
| 2021-11-23 | 2021-11-24 | $369.68 | $372.00 | -2.60% | 2 | |
| 2021-10-12 | 2021-11-10 | $268.57 | $355.98 | 17.18% | 22 | |
| 2021-10-08 | 2021-10-11 | $261.83 | $263.98 | -0.73% | 2 | |
| 2021-09-28 | 2021-10-07 | $259.19 | $264.54 | -0.77% | 8 | |
| 2021-09-24 | 2021-09-27 | $258.13 | $263.79 | 1.53% | 2 | |
| 2021-09-22 | 2021-09-23 | $250.65 | $251.21 | 0.90% | 2 | |
| 2021-08-31 | 2021-09-21 | $245.24 | $246.46 | -0.14% | 15 | |
| 2021-02-22 | 2021-02-23 | $238.17 | $232.95 | -5.25% | 2 | |
| 2021-02-18 | 2021-02-19 | $262.46 | $260.43 | -0.93% | 2 | |
| 2021-02-16 | 2021-02-17 | $265.41 | $266.05 | -1.58% | 2 | |
| 2021-02-11 | 2021-02-12 | $270.55 | $272.04 | 0.39% | 2 | |
| 2021-02-09 | 2021-02-10 | $283.15 | $268.27 | -1.09% | 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-11-06 | 2020-11-10 | $143.32 | $136.79 | -2.43% | 3 | |
| 2020-11-04 | 2020-11-05 | $140.33 | $146.03 | -0.53% | 2 | |
| 2020-10-27 | 2020-10-28 | $141.56 | $135.34 | 0.51% | 2 | |
| 2020-10-23 | 2020-10-26 | $140.21 | $140.09 | -0.85% | 2 | |
| 2020-10-21 | 2020-10-22 | $140.88 | $141.93 | -0.02% | 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-08-12 | 2020-08-13 | $103.65 | $108.07 | 7.75% | 2 | |
| 2020-08-10 | 2020-08-11 | $94.57 | $91.63 | -1.53% | 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-02 | 2020-06-25 | $58.77 | $65.73 | 4.30% | 18 | |
| 2020-05-29 | 2020-06-01 | $55.67 | $59.87 | 2.05% | 2 | |
| 2020-05-27 | 2020-05-28 | $54.68 | $53.72 | -0.02% | 2 | |
| 2019-12-13 | 2020-01-31 | $23.89 | $43.37 | 41.98% | 33 | |
| 2019-12-11 | 2019-12-12 | $23.51 | $23.98 | 0.54% | 2 | |
| 2019-12-09 | 2019-12-10 | $22.64 | $23.26 | 0.53% | 2 | |
| 2019-12-05 | 2019-12-06 | $22.02 | $22.39 | -0.60% | 2 |