r/algorithmictrading • u/ferri_2126 • Jun 25 '26
Backtest 5 year backtest TSLA strategy
I’ve been developing an intraday breakout strategy on Tesla for months. What started as a simple range breakout system gradually evolved through lots of iterations — adding filters, refining exits, and eventually running a proper walk-forward validation. It’s been running live on my real account since March 11, 2026.
Sharing the full results and methodology here because I think the validation process is worth discussing. Most backtest posts skip this part entirely.
The strategy in plain terms:
The system identifies a price range using the high and low of the previous 4 candles on the 5-minute chart. When price breaks out of that range with enough momentum, an entry is triggered — but only if four filters all agree:
• ADX: confirms the breakout is happening in a trending environment
• Minimum range size (ATR-based): rejects setups where the range is too compressed
• Candle strength: evaluates the size and close position of the breakout candle
• RSI on higher timeframe: avoids entries in overbought/oversold conditions on the higher timeframe
This combination addresses the main failure modes of breakout trading: false breaks, low-momentum moves, and counter-trend entries. The result is a win rate significantly above the 45–55% typical of unfiltered breakout systems.
Exits use a layered approach: fixed TP at 2.75%, EMA trailing stop, no-progress exit, and a no follow-through exit if price returns into the range. In the last hour of the session, the trailing tightens aggressively to protect intraday gains.
~150 trades per year, both long and short, NYSE RTH only.
Backtest results:
(Jan 2021 – Jun 2026, $100k fixed capital, $1/order commission + 5 ticks slippage, no compounding)
• Net profit: +$378,906 (+378.91%)
• CAGR: 33.37%
• Max drawdown: 6.45% — TSLA itself drew down -56% in this period
• Calmar Ratio: 5.17
• Profit Factor: 2.181
• Sortino Ratio: 2.954
• Sharpe Ratio: 0.693
• Win Rate: 71.15% across 825 trades
• 57 of 66 months profitable (86%)
• Zero losing years
Capital is fixed throughout — no compounding.
With 70% equity reinvestment the numbers look very different:
• Net profit: +$1,242,892 (+1,242.89%)
• CAGR: 61.33%
• Max drawdown: 9.52%
• Calmar Ratio: 6.43
• Profit Factor: 2.168
• Sortino Ratio: 2.853
• Sharpe Ratio: 0.887
Walk-forward validation — the part I want to focus on
I ran three WFA iterations to test whether the edge holds on unseen data:
|Iteration| In-Sample | OOS | Profit factor |
|1 |2021–2023 | 2024 | 1.714 |
|2 |2021–2024 | 2025 | 2.878 |
|3 |2021–2025 | 2026 | 2.106 |
All three OOS periods made money. Two of three had a PF above 2.0 out-of-sample.
Iteration 1 is the weakest — H1 2024 was the most directionless period TSLA had in the entire dataset. A breakout system underperforming in a low-momentum regime is expected behavior, not a strategy failure. It recovered as soon as volatility returned.
Happy to discuss the methodology, the exit logic, the walk-forward process, or anything else in the comments.


3
u/WardenPi Jun 26 '26
If you looked up over fit in the dictionary…
1
u/strat-run Jun 25 '26
Are your live results matching your back tests?
1
u/Scarneck Jun 25 '26
Are you willing to share the data behind the numbers? Would love to take a look at it
1
u/marvin_marziano Jun 25 '26
How was TSLA selected for this strategy? Did you filter through any other stock? What exactly were you looking for? Great stuff btw, working on something similar myself (but mean reversion)
1
u/TheHellyz Jun 26 '26
You should move away from TV if you are actually looking for a decent backtester
1
u/Ok_Can_5882 Jun 26 '26
How did you control for selection bias? OOS is great, but was it truly unseen data? A lot of people make the mistake of diluting the value of their OOS data by reusing it. If you used the same OOS data earlier in your iteration process, it's not OOS anymore. You've iterated extensively on a single strategy/asset, so the risk of overfitting is enormous. So what price data did you use to iterate on?
Also, I don't see any mention of any kind of Monte Carlo permutation or other resampling methods to estimate whether this performance is even better than random in the first place. If your strategy has a long bias while the asset also has been trending up, all your metrics will be artificially inflated.
1
u/CustardOk7073 Jun 26 '26
Looks cool. Do this please: give the script to an LLM and ask it to replicate it to python. Review the code and adjust as necessary. Backtest on python and come back with the ratios you mentioned in the post. This way I won’t call it overfit and ruin your excitement without evidence. Also a bit of live results on a trusted broker would be nice. Thx.
1
u/LevelAcanthisitta473 Jun 26 '26
Anyone using Markov chains on the S&P500?
1
u/EvenCryptographer649 Jun 30 '26
'''It’s been running live on my real account since March 11, 2026.'''
And what are those results?
''' RSI on higher timeframe: avoids entries in overbought/oversold conditions '''
Did you test the opposite. In general you want overbought conditions for intraday buying. Unless you are trying to pick lows
'''TP at 2.75%, EMA trailing stop'''
Why 2.75?
'''Jan 2021 – Jun 2026'''
What is your confidence level only using this timeframe to backtest?