LongTermTrend_V1015
ARCHIVEDhybridllmAdded a volatility gate (vol_pctile < 0.70) to avoid entering during extreme turbulence; set regime gates to require UPTREND / MEDIUM_VOLATILITY / NORMAL bubble to reduce overfitting to non-bull regimes; relaxed and lowered several momentum thresholds (ret_20d and cumret_252d) to improve generalization; tightened volume breakout condition to rel_volume >1.20 (more realistic); enhanced exit to a multi-condition rule (macd_hist negative OR price crossing below sma_50 OR sudden vol spike vol_chg>1.0) for earlier, safer exits; reduced base position from 1.0 to 0.8 to limit drawdown risk.
Lineage
entry = LongTermTrend_V0469 OR MACDMomentum_V0272
Strategy Logic (pseudocode)
# LongTermTrend_V1015 [hybrid]
if flat and (vol_pctile < 0.7 and ((((close > sma_200 and sma_200_slope > -0.0024) or ret_20d > 0.06) and ret_20d > 0.04 and cumret_252d > 0.03) or ((breakout_50 == 1 and rel_volume > 1.2) or (macd_hist > 0.0 and close > sma_50 and sma_50 > sma_200)))):
position = 0.8
if long and (macd_hist < 0.0 or close < sma_50 or vol_chg > 1.0):
position = 0.0 # exit to cashBacktest Metrics
| Metric | Train | Validation | Hidden Test | Full |
|---|---|---|---|---|
| CAGR | -0.3% | 42.8% | -2.4% | 6.9% |
| Total Return | -2.6% | 191.5% | -8.6% | 165.5% |
| Sharpe | 0.07 | 1.38 | -0.03 | 0.42 |
| Sortino | 0.05 | 1.58 | -0.02 | 0.36 |
| Calmar | -0.01 | 1.24 | -0.07 | 0.19 |
| Volatility | 18.0% | 28.8% | 19.2% | 21.0% |
| Max DD | -30.2% | -34.5% | -33.8% | -35.9% |
| Win Rate | 46.5% | 52.8% | 43.9% | 47.6% |
| Avg Win | 2.9% | 5.6% | 3.7% | 3.8% |
| Avg Loss | -2.4% | -2.6% | -3.0% | -2.6% |
| Payoff | 1.20 | 2.13 | 1.23 | 1.48 |
| Expectancy | 0.1% | 1.7% | -0.1% | 0.5% |
| Profit Factor | 1.04 | 2.38 | 0.96 | 1.34 |
| Trades | 157 | 72 | 57 | 286 |
| Avg Holding Days | 4.0 | 4.5 | 4.9 | 4.3 |
| Turnover | 31.6 | 38.4 | 24.5 | 31.1 |
| Exposure | 19.0% | 26.3% | 19.2% | 20.6% |
Growth of $100
Walk-Forward Years
| Year | CAGR | Sharpe | Max DD | Trades |
|---|---|---|---|---|
| 2016 | 8.4% | 0.81 | -7.1% | 12 |
| 2017 | 5.6% | 0.40 | -12.1% | 31 |
| 2018 | -10.0% | -1.24 | -13.5% | 7 |
| 2019 | 8.6% | 0.52 | -12.1% | 5 |
| 2020 | 189.0% | 3.11 | -16.1% | 22 |
| 2021 | -1.7% | 0.07 | -23.2% | 33 |
| 2022 | 2.4% | 0.21 | -15.5% | 15 |
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 | 275 | 3.7% | 0.48 | 5% |
| hidden test | EXPENSIVE | 83 | 27.7% | 1.04 | 29% |
| hidden test | EXTREME | 48 | 51.0% | 1.97 | 15% |
| hidden test | HIGH VOLATILITY | 254 | 2.0% | 0.13 | 5% |
| hidden test | LOW VOLATILITY | 434 | 24.0% | 1.29 | 26% |
| hidden test | MEDIUM VOLATILITY | 251 | -45.7% | -1.96 | 22% |
| hidden test | NORMAL | 808 | -6.5% | -0.37 | 18% |
| hidden test | SIDEWAYS | 293 | -23.2% | -1.30 | 25% |
| hidden test | UPTREND | 371 | 14.1% | 0.56 | 25% |
| train | DOWNTREND | 518 | -5.5% | -0.64 | 4% |
| train | EXPENSIVE | 311 | 15.3% | 0.60 | 34% |
| train | EXTREME | 100 | 35.7% | 1.89 | 22% |
| train | HIGH VOLATILITY | 699 | -4.5% | -0.23 | 5% |
| train | LOW VOLATILITY | 745 | 14.1% | 0.89 | 30% |
| train | MEDIUM VOLATILITY | 568 | -8.5% | -0.46 | 22% |
| train | NORMAL | 1,601 | -3.6% | -0.22 | 16% |
| train | SIDEWAYS | 592 | -3.9% | -0.26 | 16% |
| train | UPTREND | 902 | 8.6% | 0.37 | 30% |
| validation | DOWNTREND | 125 | 35.9% | 2.30 | 6% |
| validation | EXPENSIVE | 138 | 57.2% | 1.81 | 34% |
| validation | EXTREME | 144 | 157.3% | 3.85 | 22% |
| validation | HIGH VOLATILITY | 258 | 22.4% | 0.76 | 7% |
| validation | LOW VOLATILITY | 183 | 14.8% | 0.79 | 38% |
| validation | MEDIUM VOLATILITY | 315 | 68.4% | 2.08 | 36% |
| validation | NORMAL | 474 | -1.1% | -0.05 | 25% |
| validation | SIDEWAYS | 206 | -12.7% | -0.72 | 21% |
| validation | UPTREND | 425 | 66.3% | 1.87 | 35% |
Trades (full period)
| Entry | Exit | Entry Px | Exit Px | Return | Days | |
|---|---|---|---|---|---|---|
| 2026-09-08 | 2026-09-17 | $368.16 | $366.20 | 0.76% | 8 | |
| 2026-09-03 | 2026-09-04 | $376.37 | $354.08 | 4.17% | 2 | |
| 2026-09-01 | 2026-09-02 | $356.09 | $357.01 | -2.74% | 2 | |
| 2026-08-25 | 2026-08-26 | $350.25 | $345.82 | 0.14% | 2 | |
| 2026-08-21 | 2026-08-24 | $362.86 | $348.95 | 3.95% | 2 | |
| 2026-07-13 | 2026-07-14 | $394.76 | $396.18 | -2.71% | 2 | |
| 2026-06-05 | 2026-06-08 | $391.00 | $408.95 | -5.40% | 2 | |
| 2026-06-03 | 2026-06-04 | $423.70 | $418.45 | -0.17% | 2 | |
| 2026-05-27 | 2026-06-02 | $440.36 | $423.74 | -3.41% | 5 | |
| 2026-05-22 | 2026-05-26 | $426.01 | $433.59 | 1.40% | 2 | |
| 2026-05-04 | 2026-05-21 | $392.51 | $417.85 | 5.30% | 14 | |
| 2026-04-20 | 2026-04-22 | $392.50 | $387.51 | -3.00% | 3 | |
| 2026-01-02 | 2026-01-05 | $438.07 | $451.67 | -2.23% | 2 | |
| 2025-12-04 | 2025-12-30 | $454.53 | $454.43 | 2.22% | 18 | |
| 2025-11-06 | 2025-11-07 | $445.91 | $429.52 | -2.96% | 2 | |
| 2025-11-03 | 2025-11-05 | $468.37 | $462.07 | -2.29% | 3 | |
| 2025-10-24 | 2025-10-27 | $433.72 | $452.42 | -2.88% | 2 | |
| 2025-10-13 | 2025-10-14 | $435.90 | $429.24 | 4.17% | 2 | |
| 2025-10-09 | 2025-10-10 | $435.54 | $413.49 | -0.73% | 2 | |
| 2025-10-07 | 2025-10-08 | $433.09 | $438.69 | -3.72% | 2 | |
| 2025-09-17 | 2025-10-06 | $425.86 | $453.25 | 1.48% | 14 | |
| 2025-09-08 | 2025-09-16 | $346.40 | $421.62 | 13.19% | 7 | |
| 2025-09-04 | 2025-09-05 | $338.53 | $350.84 | 0.90% | 2 | |
| 2025-08-25 | 2025-09-03 | $346.60 | $334.09 | -2.65% | 7 | |
| 2025-08-07 | 2025-08-22 | $322.27 | $340.01 | -0.09% | 12 | |
| 2025-07-31 | 2025-08-01 | $308.27 | $302.63 | -2.86% | 2 | |
| 2025-07-29 | 2025-07-30 | $321.20 | $319.04 | -1.24% | 2 | |
| 2025-07-21 | 2025-07-25 | $328.49 | $316.06 | -6.05% | 5 | |
| 2025-06-04 | 2025-06-05 | $332.05 | $284.70 | -3.00% | 2 | |
| 2025-05-12 | 2025-06-03 | $318.38 | $344.27 | 11.72% | 16 | |
| 2024-12-13 | 2024-12-24 | $436.23 | $462.28 | 2.35% | 8 | |
| 2024-12-10 | 2024-12-12 | $400.99 | $418.10 | 6.98% | 3 | |
| 2024-09-13 | 2024-10-04 | $230.29 | $250.08 | 3.69% | 16 | |
| 2024-09-06 | 2024-09-09 | $210.73 | $216.27 | -6.91% | 2 | |
| 2024-07-09 | 2024-07-22 | $262.33 | $251.51 | -4.42% | 10 | |
| 2024-07-03 | 2024-07-08 | $246.39 | $252.94 | 6.82% | 3 | |
| 2024-06-27 | 2024-07-02 | $197.42 | $231.26 | 5.32% | 4 | |
| 2024-01-03 | 2024-01-04 | $238.45 | $237.93 | -3.37% | 2 | |
| 2023-12-15 | 2024-01-02 | $253.50 | $248.42 | -0.94% | 11 | |
| 2023-11-29 | 2023-12-14 | $244.14 | $251.05 | -2.56% | 12 | |
| 2023-11-27 | 2023-11-28 | $236.08 | $246.72 | 0.05% | 2 | |
| 2023-11-22 | 2023-11-24 | $234.21 | $235.45 | -2.48% | 2 | |
| 2023-11-20 | 2023-11-21 | $235.60 | $241.20 | 0.28% | 2 | |
| 2023-11-16 | 2023-11-17 | $233.59 | $234.30 | -3.20% | 2 | |
| 2023-10-06 | 2023-10-17 | $260.53 | $254.85 | -2.03% | 8 | |
| 2023-09-12 | 2023-09-22 | $267.48 | $244.88 | -5.39% | 9 | |
| 2023-09-06 | 2023-09-07 | $251.92 | $251.49 | -1.58% | 2 | |
| 2023-08-30 | 2023-09-05 | $256.90 | $256.49 | -3.94% | 4 | |
| 2023-07-20 | 2023-07-21 | $262.90 | $260.02 | -7.94% | 2 | |
| 2023-07-18 | 2023-07-19 | $293.34 | $291.26 | 0.65% | 2 | |
| 2023-07-14 | 2023-07-17 | $281.38 | $290.38 | 0.84% | 2 | |
| 2023-07-12 | 2023-07-13 | $271.99 | $277.90 | 0.49% | 2 | |
| 2023-07-10 | 2023-07-11 | $269.61 | $269.79 | -1.56% | 2 | |
| 2023-07-06 | 2023-07-07 | $276.54 | $274.43 | -1.84% | 2 | |
| 2023-07-03 | 2023-07-05 | $279.82 | $282.48 | 5.35% | 2 | |
| 2023-06-29 | 2023-06-30 | $257.50 | $261.77 | 0.23% | 2 | |
| 2023-06-05 | 2023-06-27 | $217.61 | $250.21 | 9.98% | 16 | |
| 2022-09-12 | 2022-09-23 | $304.42 | $275.33 | -3.08% | 10 | |
| 2022-08-24 | 2022-08-25 | $297.10 | $296.07 | 0.01% | 2 | |
| 2022-08-22 | 2022-08-23 | $289.91 | $296.45 | -1.98% | 2 | |
| 2022-08-15 | 2022-08-19 | $309.32 | $296.67 | 0.61% | 5 | |
| 2022-07-19 | 2022-08-12 | $245.53 | $300.03 | 15.11% | 19 | |
| 2022-07-14 | 2022-07-15 | $238.31 | $240.07 | 0.27% | 2 | |
| 2022-04-19 | 2022-04-20 | $342.72 | $325.73 | 1.74% | 2 | |
| 2022-04-14 | 2022-04-18 | $328.33 | $334.76 | -3.08% | 2 | |
| 2022-04-12 | 2022-04-13 | $328.98 | $340.79 | 0.74% | 2 | |
| 2022-03-21 | 2022-04-11 | $307.05 | $325.31 | 10.49% | 16 | |
| 2022-01-20 | 2022-01-21 | $332.09 | $314.63 | -0.11% | 2 | |
| 2022-01-18 | 2022-01-19 | $343.50 | $331.88 | -1.61% | 2 | |
| 2022-01-13 | 2022-01-14 | $343.85 | $349.87 | -5.55% | 2 | |
| 2022-01-11 | 2022-01-12 | $354.80 | $368.74 | 0.31% | 2 | |
| 2022-01-04 | 2022-01-07 | $383.20 | $342.32 | -9.22% | 4 | |
| 2021-12-28 | 2022-01-03 | $362.82 | $399.93 | -2.88% | 5 | |
| 2021-12-09 | 2021-12-10 | $334.60 | $339.01 | -5.03% | 2 | |
| 2021-11-26 | 2021-11-29 | $360.64 | $379.00 | -2.60% | 2 | |
| 2021-11-23 | 2021-11-24 | $369.68 | $372.00 | -3.47% | 2 | |
| 2021-10-29 | 2021-11-11 | $371.33 | $354.50 | -0.59% | 10 | |
| 2021-10-27 | 2021-10-28 | $345.95 | $359.01 | 1.37% | 2 | |
| 2021-10-25 | 2021-10-26 | $341.62 | $339.48 | 9.96% | 2 | |
| 2021-10-12 | 2021-10-22 | $268.57 | $303.23 | 10.04% | 9 | |
| 2021-10-08 | 2021-10-11 | $261.83 | $263.98 | -0.98% | 2 | |
| 2021-09-28 | 2021-10-07 | $259.19 | $264.54 | -1.03% | 8 | |
| 2021-09-24 | 2021-09-27 | $258.13 | $263.79 | 2.04% | 2 | |
| 2021-09-22 | 2021-09-23 | $250.65 | $251.21 | 1.20% | 2 | |
| 2021-08-31 | 2021-09-21 | $245.24 | $246.46 | -0.21% | 15 | |
| 2021-08-25 | 2021-08-26 | $237.07 | $233.72 | 0.15% | 2 | |
| 2021-08-23 | 2021-08-24 | $235.43 | $236.16 | 2.90% | 2 | |
| 2021-08-19 | 2021-08-20 | $224.49 | $226.75 | -1.96% | 2 | |
| 2021-08-03 | 2021-08-17 | $236.58 | $221.90 | -2.79% | 11 | |
| 2021-07-21 | 2021-07-22 | $218.43 | $216.42 | -0.79% | 2 | |
| 2021-07-16 | 2021-07-19 | $214.74 | $215.41 | -0.94% | 2 | |
| 2021-07-13 | 2021-07-15 | $222.85 | $216.87 | -3.94% | 3 | |
| 2021-06-28 | 2021-07-12 | $229.57 | $228.57 | -1.92% | 10 | |
| 2021-06-24 | 2021-06-25 | $226.61 | $223.96 | 2.67% | 2 | |
| 2021-06-22 | 2021-06-23 | $207.90 | $218.86 | 0.21% | 2 | |
| 2021-06-18 | 2021-06-21 | $207.77 | $206.94 | 0.71% | 2 | |
| 2021-06-14 | 2021-06-15 | $205.90 | $199.79 | 0.86% | 2 | |
| 2021-05-03 | 2021-05-04 | $228.30 | $224.53 | -2.92% | 2 | |
| 2021-04-14 | 2021-04-29 | $244.08 | $225.67 | -7.29% | 12 | |
| 2021-02-10 | 2021-02-11 | $268.27 | $270.55 | -4.36% | 2 |