Insider Knowledge / trend following and breakouts
How Do I Backtest a Trend Following or Breakout Strategy?
Backtest by identifying your rules, applying them to historical data (last 5-10 years), recording every trade, calculating win rate and profit factor, and measuring drawdown. If profit factor is 1.5+, win rate is 45%+, and max drawdown is less than 20%, you have something worth trading live.
Backtesting is the only way to know if your strategy works. Trading a strategy without backtesting is gambling.
Backtesting means applying your rules to historical data and seeing if they would have made money. If yes, you might have something. If no, you save years of losses by learning this before risking real money.
Step 1: Write your exact rules
Before you backtest, write every rule. Not vaguely. Exactly.
Bad rules: - "Buy near support" - "Buy breakouts of resistance" - "Buy when the trend is up"
Good rules: - "Buy when price closes above the 50-day moving average for the first time in 20 days" - "Buy when price closes 5% above the 20-period Donchian high on volume 50%+ above average" - "Buy when price bounces off the 50-day moving average and closes higher on 2x average volume"
Vague rules let you cheat. "Near support" could mean $0.10 away or $1 away. When you backtest, you'll unconsciously choose the one that makes it look good.
Written exact rules prevent this. Anyone should be able to follow your rules and get the same results.
Step 2: Choose your historical data
Use 5-10 years of daily closing data. For stocks, use individual stocks, not indexes. If you want to trade SPY, backtest SPY, not the broader market.
Where to get data: - Yahoo Finance (free, reliable) - Trading View (free, good charting) - Professional platforms (TC2000, NinjaTrader, etc., paid)
5-10 years is enough to test through bull markets, bear markets, and sideways markets. It's not enough to prove anything forever, but it's enough to know if the strategy has merit.
Step 3: Apply your rules manually or with software
For beginners, do it manually for 50-100 trades. Go through daily data. When your rules trigger, record the trade.
Trade #1: Entry $50.00, Stop $49.50, Target $55.00, Outcome: Hit target, Made $5.00 Trade #2: Entry $100.00, Stop $99.00, Target $110.00, Outcome: Hit stop, Lost $1.00 ...etc
This is tedious. But you'll learn so much. You'll see your strategy's patterns. You'll notice when it fails.
Once you're comfortable, use backtesting software: - TradingView's Strategy Tester (free) - Backtrader (free, requires coding) - TC2000 (paid)
These automate the process. They apply your rules to 10 years of data instantly. But you need to code your rules. This requires learning coding or hiring someone.
Step 4: Record important metrics
Total Trades: How many trades happened in your backtest period? Win Rate: What percentage were winners? Profit Factor: (Total wins) ÷ (Total losses). 2.0 = you make $2 for every $1 you lose. Expectancy: Average profit per trade. (Total profit) ÷ (Total trades). Max Drawdown: Biggest peak-to-trough loss. If you have $100k and it drops to $80k, that's 20% drawdown. Consecutive Losses: What's the longest losing streak?
Step 5: Evaluate the results
Good results look like: - Win rate: 40-60% (60%+ is suspicious, maybe you're overfitting) - Profit factor: 1.5+ (at least $1.50 per $1 risked) - Max drawdown: 20-30% (any hi
Get the Turtle Cheat-Sheet
Quick rules for 20D/55D breakouts, ATR sizing, and exit logic. Drop your best CTA or lead magnet here.
TODO: Wire real affiliate links / ad tags.
Related Questions
Related Article
How Should I Combine Trend Following with Risk Management and Position Sizing?
Related Article
What is a Trend Following Strategy in Trading?
Related Article
Is Trend Following Profitable and Does It Still Work Today?
Related Article