Backtesting Your Strategy: From Idea to Profitable System
Published February 1, 2026 • 16 min read
90% of traders skip backtesting and wonder why they lose money. Test your strategy on historical data before risking real capital. Here's how to do it properly.
⚠️ The Harsh Truth
If you haven't backtested your strategy over at least 100 trades, you're gambling, not trading. You have no idea if your edge is real or imaginary.
What is Backtesting?
Backtesting is applying your trading rules to historical price data to see if the strategy would have been profitable. It answers: "Does my edge actually exist?"
- Manual Backtesting: Scroll through charts, mark trades, record results (best for beginners)
- Automated Backtesting: Code your strategy, run it on data (requires programming)
- Forward Testing: Test on recent data after backtesting (paper trading)
Why Most Traders Skip This
Common excuses and why they're wrong:
- "It takes too long" → 10 hours backtesting saves 10 months of losses
- "Past doesn't predict future" → True, but patterns repeat. No backtest = blind trading
- "I'll just paper trade" → 20 paper trades proves nothing. Need 100+ for statistical significance
- "My strategy is discretionary" → Then you don't have a strategy, you have a guess
The Manual Backtesting Process
You don't need coding skills. Here's the step-by-step manual process:
Step 1: Define Your Strategy Rules
Write down EXACT entry and exit rules. No discretion allowed.
Example: Breakout Strategy
Entry:
- Stock consolidates 4+ weeks in 10% range
- Breaks above resistance on 150%+ average volume
- SPY above 50-day MA (bull market filter)
- Enter at close if all conditions met
Exit:
- Stop: 7% below entry
- Target: 15% above entry
- Time stop: Exit after 20 days if no target hit
Step 2: Set Up Your Spreadsheet
Create columns to track every trade:
| Trade # | Date | Ticker | Entry | Exit | % Gain/Loss | R Multiple |
|---|---|---|---|---|---|---|
| 1 | 2025-01-15 | AAPL | $180 | $207 | +15% | +2.14R |
| 2 | 2025-01-22 | TSLA | $245 | $228 | -7% | -1R |
Step 3: Scroll Through Historical Charts
Go back 2-3 years. Mark every trade that meets your rules. Be honest - no cherry-picking!
Critical: Use bar replay or cover the right side of the chart. Don't look ahead. That's cheating and invalidates your backtest.
Step 4: Record Every Trade
Log all trades in your spreadsheet. Winners AND losers. Track:
- Entry price and date
- Exit price and date (stop or target)
- % gain or loss
- R multiple (how many times your risk did you make/lose)
- Hold time in days
Key Metrics to Calculate
After 100+ trades, calculate these metrics to evaluate your strategy:
| Metric | Formula | Good Target |
|---|---|---|
| Win Rate | Wins / Total Trades | > 50% |
| Average Win | Sum of wins / # of wins | > 8% |
| Average Loss | Sum of losses / # of losses | < 5% |
| Expectancy | (Win% × Avg Win) - (Loss% × Avg Loss) | > 0.5% |
| Profit Factor | Gross Profit / Gross Loss | > 1.5 |
| Max Drawdown | Largest peak-to-trough decline | < 20% |
| Average Hold Time | Sum of hold days / # trades | Depends on style |
Real Backtest Example: Breakout Strategy
Here's a real 100-trade backtest of the breakout strategy defined above:
Backtest Results (100 Trades, 2023-2025)
Total Trades
100
Win Rate
58%
Average Win
+12.3%
Average Loss
-6.2%
Expectancy
+4.5%
Profit Factor
2.73
Max Drawdown
-18.5%
Avg Hold Time
8.2 days
Interpreting the Results
Verdict: Profitable strategy with positive expectancy.
- 58% win rate is solid (above 50%)
- Average win (12.3%) is 2x average loss (6.2%) = good R:R
- Expectancy of +4.5% per trade means long-term profitability
- Profit factor of 2.73 means you make $2.73 for every $1 lost
- Max drawdown of 18.5% is manageable with proper position sizing
Sample Trade Breakdown
Trade #47: NVDA Breakout (June 2024)
Setup: 6-week consolidation $480-$495, volume declining
Entry: June 12 at $496 (breakout on 2.1x volume)
Stop: $461 (-7%)
Target: $570 (+15%)
Exit: June 26 at $565 (+13.9%, 14 days)
Result: +1.98R (risked 7% to make 13.9%)
Common Backtesting Mistakes
| Mistake | Why It's Wrong | Fix |
|---|---|---|
| Looking ahead | You see the future, invalidates test | Use bar replay or cover chart |
| Cherry-picking trades | Only counting winners inflates results | Record EVERY signal, no exceptions |
| Too few trades | 20 trades proves nothing statistically | Minimum 100 trades for significance |
| Ignoring slippage | Real trading has costs | Subtract 0.1-0.3% per trade |
| Curve fitting | Optimizing for past = fails in future | Keep rules simple, test out-of-sample |
| Survivorship bias | Only testing stocks that survived | Include delisted/bankrupt stocks |
Expectancy: The Most Important Metric
Expectancy tells you how much you make per trade on average. It's the ONLY metric that matters for long-term profitability.
Expectancy = (Win Rate × Avg Win) - (Loss Rate × Avg Loss)
// Example from our backtest:
Expectancy = (0.58 × 12.3%) - (0.42 × 6.2%)
Expectancy = 7.13% - 2.60% = 4.53%
// Positive expectancy = profitable system
What Different Expectancies Mean
- Negative expectancy: You lose money long-term. Don't trade this strategy.
- 0-1% expectancy: Barely profitable. Commissions might wipe you out.
- 1-3% expectancy: Decent edge. Can be profitable with discipline.
- 3-5% expectancy: Strong edge. Very profitable if executed properly.
- 5%+ expectancy: Exceptional edge. Rare. Verify it's not curve-fitted.
Forward Testing
After backtesting, forward test on recent data (last 3-6 months) that you didn't backtest on:
- Paper trade: Apply your rules in real-time with fake money
- Track results: Same spreadsheet, same metrics
- Compare to backtest: Results should be similar (within 20%)
- If forward test fails: Your backtest was curve-fitted. Start over.
When to Start Real Money Trading
Only start real money when ALL these are true:
- ✓ Backtested 100+ trades with positive expectancy
- ✓ Forward tested 30+ trades with similar results
- ✓ Understand your max drawdown and can handle it psychologically
- ✓ Have written trading rules (no discretion)
- ✓ Position sizing plan in place (1-2% risk per trade)
- ✓ Trading journal ready to track every trade
Sample Backtest Spreadsheet Template
Here's what your spreadsheet should look like:
| Trade# | Date | Ticker | Entry | Stop | Target | Exit | Exit Date | %P/L | R | Days |
|---|---|---|---|---|---|---|---|---|---|---|
| 1 | 2023-01-15 | AAPL | 180 | 167 | 207 | 207 | 2023-01-28 | +15% | +2.1R | 13 |
| 2 | 2023-01-22 | TSLA | 245 | 228 | 282 | 228 | 2023-02-03 | -7% | -1R | 12 |
Advanced: Monte Carlo Simulation
After backtesting, run Monte Carlo simulation to understand worst-case scenarios:
- Take your 100 trade results
- Randomly shuffle them 1000 times
- Calculate max drawdown for each shuffle
- The 95th percentile is your "worst realistic case"
This shows you: "If I'm unlucky, how bad could it get?" Essential for position sizing.
Key Takeaways
- Backtest minimum 100 trades before risking real money
- Write exact rules - no discretion allowed during backtest
- Don't look ahead or cherry-pick trades - invalidates results
- Expectancy is the only metric that matters for profitability
- Forward test on recent data to verify backtest wasn't curve-fitted
- Start real money only after successful backtest + forward test
- Track same metrics in live trading - should match backtest within 20%
Ready to Test Your Strategy?
Use our tools to backtest and track your trading performance
Start Free Trial