LongTermTrend_V1050
ARCHIVEDhybridllm1) Added trend regime gate (UPTREND) and restricted to lower-volatility and normal bubble regimes to avoid extreme/stressed periods. 2) Simplified and strengthened entry: require either 200sma breakout with positive slope or strong 20d return, plus price > 50sma, short-term confirmation (ret_5d>0.5%) and moderate volatility (vol_pctile<0.85). 3) Replaced a fragile single 20d-return exit with a more robust multi-condition exit: exit on 20d loss <-3%, price dropping below sma_50, or equity drawdown worse than -15%. 4) Reduced base position to 0.7 to lower risk/turnover and improve robustness on validation.
Lineage
entry from LongTermTrend_V0323, exit from PriceMomentum_V0449
Strategy Logic (pseudocode)
# LongTermTrend_V1050 [hybrid]
if flat and ((((close > sma_200 and sma_200_slope > 0.0) or ret_20d > 0.08) and close > sma_50 and ret_5d > 0.005 and vol_pctile < 0.85) and cumret_252d > -0.25):
position = 0.7
if long and (ret_20d < -0.03 or close < sma_50 or drawdown < -0.15):
position = 0.0 # exit to cashBacktest Metrics
| Metric | Train | Validation | Hidden Test | Full |
|---|---|---|---|---|
| CAGR | 7.3% | 43.4% | -5.4% | 10.4% |
| Total Return | 75.4% | 194.6% | -18.8% | 328.4% |
| Sharpe | 0.45 | 1.39 | -0.27 | 0.57 |
| Sortino | 0.40 | 1.43 | -0.22 | 0.52 |
| Calmar | 0.18 | 1.34 | -0.19 | 0.23 |
| Volatility | 20.3% | 28.8% | 15.9% | 21.4% |
| Max DD | -40.4% | -32.4% | -28.5% | -45.1% |
| Win Rate | 43.6% | 39.3% | 42.3% | 42.2% |
| Avg Win | 4.1% | 9.9% | 1.8% | 4.6% |
| Avg Loss | -2.0% | -2.2% | -1.7% | -1.9% |
| Payoff | 2.12 | 4.48 | 1.10 | 2.43 |
| Expectancy | 0.7% | 2.6% | -0.2% | 0.9% |
| Profit Factor | 1.64 | 2.90 | 0.80 | 1.77 |
| Trades | 110 | 56 | 97 | 263 |
| Avg Holding Days | 7.0 | 5.8 | 2.9 | 5.3 |
| Turnover | 19.4 | 26.1 | 36.4 | 25.0 |
| Exposure | 23.7% | 24.9% | 13.9% | 21.5% |
Growth of $100
Walk-Forward Years
| Year | CAGR | Sharpe | Max DD | Trades |
|---|---|---|---|---|
| 2016 | 9.1% | 0.98 | -6.6% | 19 |
| 2017 | 4.9% | 0.35 | -21.2% | 19 |
| 2018 | -13.2% | -1.24 | -16.2% | 4 |
| 2019 | 3.2% | 0.28 | -12.9% | 12 |
| 2020 | 225.5% | 3.05 | -20.0% | 7 |
| 2021 | 20.3% | 0.91 | -18.1% | 29 |
| 2022 | -26.9% | -2.28 | -26.8% | 19 |
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 | 276 | -5.4% | -0.73 | 3% |
| hidden test | EXPENSIVE | 83 | 43.1% | 1.61 | 39% |
| hidden test | EXTREME | 48 | 47.7% | 1.58 | 29% |
| hidden test | HIGH VOLATILITY | 254 | -11.0% | -0.70 | 7% |
| hidden test | LOW VOLATILITY | 436 | 10.6% | 0.75 | 16% |
| hidden test | MEDIUM VOLATILITY | 250 | -23.5% | -1.25 | 18% |
| hidden test | NORMAL | 809 | -12.2% | -0.95 | 10% |
| hidden test | SIDEWAYS | 293 | -17.7% | -1.40 | 13% |
| hidden test | UPTREND | 371 | 7.1% | 0.33 | 23% |
| train | DOWNTREND | 518 | -2.2% | -0.38 | 3% |
| train | EXPENSIVE | 311 | 30.3% | 1.07 | 50% |
| train | EXTREME | 100 | 203.6% | 4.35 | 46% |
| train | HIGH VOLATILITY | 699 | 15.3% | 0.61 | 15% |
| train | LOW VOLATILITY | 745 | 21.0% | 1.36 | 32% |
| train | MEDIUM VOLATILITY | 568 | -14.2% | -0.74 | 23% |
| train | NORMAL | 1,601 | -7.2% | -0.49 | 17% |
| train | SIDEWAYS | 592 | -17.6% | -1.30 | 12% |
| train | UPTREND | 902 | 33.1% | 1.19 | 43% |
| validation | DOWNTREND | 125 | 0.2% | 0.03 | 2% |
| validation | EXPENSIVE | 138 | 64.6% | 2.09 | 40% |
| validation | EXTREME | 144 | 179.1% | 3.64 | 44% |
| validation | HIGH VOLATILITY | 258 | 33.0% | 0.92 | 17% |
| validation | LOW VOLATILITY | 183 | 6.9% | 0.47 | 23% |
| validation | MEDIUM VOLATILITY | 315 | 65.3% | 2.29 | 32% |
| validation | NORMAL | 474 | -9.2% | -0.54 | 15% |
| validation | SIDEWAYS | 206 | -36.2% | -2.59 | 10% |
| validation | UPTREND | 425 | 88.9% | 2.41 | 39% |
Trades (full period)
| Entry | Exit | Entry Px | Exit Px | Return | Days | |
|---|---|---|---|---|---|---|
| 2026-09-25 | 2026-09-28 | $372.11 | $357.45 | -1.22% | 2 | |
| 2026-09-23 | 2026-09-24 | $380.12 | $377.94 | 0.09% | 2 | |
| 2026-09-10 | 2026-09-11 | $363.56 | $365.44 | -0.95% | 2 | |
| 2026-09-04 | 2026-09-08 | $354.08 | $368.16 | -4.28% | 2 | |
| 2026-09-01 | 2026-09-02 | $356.09 | $357.01 | -2.39% | 2 | |
| 2026-07-07 | 2026-07-08 | $402.90 | $394.06 | -2.95% | 2 | |
| 2026-07-01 | 2026-07-06 | $425.30 | $419.77 | -4.63% | 3 | |
| 2026-05-26 | 2026-06-02 | $433.59 | $423.74 | -1.78% | 6 | |
| 2026-05-08 | 2026-05-19 | $428.35 | $404.11 | -0.36% | 8 | |
| 2026-05-06 | 2026-05-07 | $398.73 | $411.79 | 1.54% | 2 | |
| 2026-05-04 | 2026-05-05 | $392.51 | $389.37 | 0.16% | 2 | |
| 2026-04-20 | 2026-04-21 | $392.50 | $386.42 | -1.56% | 2 | |
| 2026-01-23 | 2026-01-26 | $449.06 | $435.20 | -0.19% | 2 | |
| 2026-01-12 | 2026-01-15 | $448.96 | $438.57 | -1.05% | 4 | |
| 2025-12-04 | 2026-01-05 | $454.53 | $451.67 | -1.39% | 21 | |
| 2025-09-16 | 2025-11-14 | $421.62 | $404.35 | -1.04% | 44 | |
| 2025-09-12 | 2025-09-15 | $395.94 | $410.04 | 5.01% | 2 | |
| 2025-09-10 | 2025-09-11 | $347.79 | $368.81 | 0.03% | 2 | |
| 2025-09-08 | 2025-09-09 | $346.40 | $346.97 | -1.03% | 2 | |
| 2025-08-29 | 2025-09-02 | $333.87 | $329.36 | -2.59% | 2 | |
| 2025-08-27 | 2025-08-28 | $349.60 | $345.98 | -0.55% | 2 | |
| 2025-08-25 | 2025-08-26 | $346.60 | $351.67 | 1.22% | 2 | |
| 2025-08-15 | 2025-08-18 | $330.56 | $335.16 | -1.19% | 2 | |
| 2025-08-13 | 2025-08-14 | $339.38 | $335.58 | -0.44% | 2 | |
| 2025-08-11 | 2025-08-12 | $339.03 | $340.84 | 1.85% | 2 | |
| 2025-07-23 | 2025-07-24 | $332.56 | $305.30 | -0.05% | 2 | |
| 2025-07-21 | 2025-07-22 | $328.49 | $332.11 | -0.39% | 2 | |
| 2025-06-27 | 2025-06-30 | $323.63 | $317.66 | -0.60% | 2 | |
| 2025-06-25 | 2025-06-26 | $327.55 | $325.78 | -2.79% | 2 | |
| 2025-06-23 | 2025-06-24 | $348.68 | $340.47 | 5.62% | 2 | |
| 2025-06-17 | 2025-06-18 | $316.35 | $322.05 | -2.86% | 2 | |
| 2025-06-13 | 2025-06-16 | $325.31 | $329.13 | 1.22% | 2 | |
| 2025-06-03 | 2025-06-04 | $344.27 | $332.05 | 0.18% | 2 | |
| 2025-05-30 | 2025-06-02 | $346.46 | $342.69 | -2.48% | 2 | |
| 2025-05-28 | 2025-05-29 | $356.90 | $358.43 | -1.29% | 2 | |
| 2025-05-20 | 2025-05-21 | $343.82 | $334.62 | 0.21% | 2 | |
| 2025-05-16 | 2025-05-19 | $349.98 | $342.09 | 1.32% | 2 | |
| 2025-05-14 | 2025-05-15 | $347.68 | $342.82 | 2.71% | 2 | |
| 2025-05-12 | 2025-05-13 | $318.38 | $334.07 | 4.58% | 2 | |
| 2025-01-22 | 2025-01-23 | $415.11 | $412.38 | -1.62% | 2 | |
| 2025-01-17 | 2025-01-21 | $426.50 | $424.07 | 2.00% | 2 | |
| 2025-01-13 | 2025-01-14 | $403.31 | $396.36 | 1.38% | 2 | |
| 2024-12-06 | 2025-01-02 | $389.22 | $379.28 | 6.64% | 18 | |
| 2024-10-02 | 2024-10-03 | $249.02 | $240.66 | -2.58% | 2 | |
| 2024-09-30 | 2024-10-01 | $261.63 | $258.02 | 0.17% | 2 | |
| 2024-09-26 | 2024-09-27 | $254.22 | $260.46 | -0.90% | 2 | |
| 2024-09-24 | 2024-09-25 | $254.27 | $257.02 | 1.05% | 2 | |
| 2024-09-20 | 2024-09-23 | $238.25 | $250.00 | -1.77% | 2 | |
| 2024-09-11 | 2024-09-12 | $228.13 | $229.81 | 0.47% | 2 | |
| 2024-09-06 | 2024-09-09 | $210.73 | $216.27 | -6.05% | 2 | |
| 2024-07-19 | 2024-07-22 | $239.20 | $251.51 | -2.96% | 2 | |
| 2024-07-10 | 2024-07-11 | $263.26 | $241.03 | 0.11% | 2 | |
| 2024-07-08 | 2024-07-09 | $252.94 | $262.33 | 0.26% | 2 | |
| 2024-07-03 | 2024-07-05 | $246.39 | $251.52 | 4.44% | 2 | |
| 2024-07-01 | 2024-07-02 | $209.86 | $231.26 | 4.09% | 2 | |
| 2024-06-27 | 2024-06-28 | $197.42 | $197.88 | 0.23% | 2 | |
| 2024-05-23 | 2024-05-24 | $173.74 | $179.24 | -2.61% | 2 | |
| 2023-12-29 | 2024-01-02 | $248.48 | $248.42 | -1.44% | 2 | |
| 2023-12-27 | 2023-12-28 | $261.44 | $253.18 | 1.18% | 2 | |
| 2023-12-21 | 2023-12-22 | $254.50 | $252.54 | 1.94% | 2 | |
| 2023-12-19 | 2023-12-20 | $257.22 | $247.14 | 1.29% | 2 | |
| 2023-12-15 | 2023-12-18 | $253.50 | $252.08 | 0.54% | 2 | |
| 2023-12-12 | 2023-12-13 | $237.01 | $239.29 | -0.94% | 2 | |
| 2023-12-08 | 2023-12-11 | $243.84 | $239.74 | 0.21% | 2 | |
| 2023-12-01 | 2023-12-04 | $238.83 | $235.58 | -0.50% | 2 | |
| 2023-11-29 | 2023-11-30 | $244.14 | $240.08 | -0.87% | 2 | |
| 2023-11-22 | 2023-11-24 | $234.21 | $235.45 | -2.17% | 2 | |
| 2023-11-16 | 2023-11-17 | $233.59 | $234.30 | -2.80% | 2 | |
| 2023-10-11 | 2023-10-12 | $262.99 | $258.87 | -0.31% | 2 | |
| 2023-10-09 | 2023-10-10 | $259.67 | $263.62 | -0.37% | 2 | |
| 2023-10-05 | 2023-10-06 | $260.05 | $260.53 | -0.44% | 2 | |
| 2023-10-03 | 2023-10-04 | $246.53 | $261.16 | -1.55% | 2 | |
| 2023-09-18 | 2023-09-19 | $265.28 | $266.50 | -2.46% | 2 | |
| 2023-09-14 | 2023-09-15 | $276.04 | $274.39 | 1.08% | 2 | |
| 2023-09-12 | 2023-09-13 | $267.48 | $271.30 | -1.70% | 2 | |
| 2023-09-06 | 2023-09-07 | $251.92 | $251.49 | -1.39% | 2 | |
| 2023-09-01 | 2023-09-05 | $245.01 | $256.49 | -3.68% | 2 | |
| 2023-08-30 | 2023-08-31 | $256.90 | $258.08 | -0.22% | 2 | |
| 2023-08-04 | 2023-08-07 | $253.86 | $251.45 | -1.61% | 2 | |
| 2023-07-19 | 2023-07-20 | $291.26 | $262.90 | -0.64% | 2 | |
| 2023-07-17 | 2023-07-18 | $290.38 | $293.34 | 2.10% | 2 | |
| 2023-07-10 | 2023-07-11 | $269.61 | $269.79 | -1.37% | 2 | |
| 2023-07-06 | 2023-07-07 | $276.54 | $274.43 | -1.61% | 2 | |
| 2023-07-03 | 2023-07-05 | $279.82 | $282.48 | 4.68% | 2 | |
| 2023-06-23 | 2023-06-26 | $256.60 | $241.05 | -2.26% | 2 | |
| 2023-06-21 | 2023-06-22 | $259.46 | $264.61 | -3.96% | 2 | |
| 2023-06-16 | 2023-06-20 | $260.54 | $274.45 | 1.13% | 2 | |
| 2023-06-14 | 2023-06-15 | $256.79 | $255.90 | -0.66% | 2 | |
| 2023-06-12 | 2023-06-13 | $249.83 | $258.71 | 1.41% | 2 | |
| 2023-06-08 | 2023-06-09 | $234.86 | $244.40 | 3.07% | 2 | |
| 2023-06-06 | 2023-06-07 | $221.31 | $224.57 | 1.05% | 2 | |
| 2023-06-02 | 2023-06-05 | $213.97 | $217.61 | 2.03% | 2 | |
| 2023-05-31 | 2023-06-01 | $203.93 | $207.52 | 0.82% | 2 | |
| 2023-05-26 | 2023-05-30 | $193.17 | $201.16 | 3.16% | 2 | |
| 2023-05-24 | 2023-05-25 | $182.90 | $184.47 | -1.22% | 2 | |
| 2023-05-22 | 2023-05-23 | $188.87 | $185.77 | 3.25% | 2 | |
| 2023-03-01 | 2023-03-02 | $202.77 | $190.90 | -1.14% | 2 | |
| 2022-08-19 | 2022-08-22 | $296.67 | $289.91 | -1.57% | 2 | |
| 2022-08-17 | 2022-08-18 | $304.00 | $302.87 | -0.73% | 2 | |
| 2022-08-15 | 2022-08-16 | $309.32 | $306.56 | 2.03% | 2 |