How to backtest a trading strategy
Write the rules down first, replay historical charts bar by bar without looking ahead, log every trade the rules produce, then measure win rate, expectancy and drawdown over at least 100 trades.
Step 1: write the rules before you look at a chart
Entry trigger, stop placement, target or exit rule, position size, and the sessions or instruments you will trade. If a rule cannot be written down, it cannot be backtested.
Step 2: replay, do not scroll
Move forward one bar at a time so you cannot see what happens next. Any backtest done by scrolling a finished chart quietly bakes hindsight into every entry.
Step 3: log every trade the rules produce
Including the ones you would rather skip. Record date, symbol, entry, stop, target, exit and result. Skipping losers is the fastest way to produce a fake edge.
Step 4: measure over a real sample
At least 100 trades of the same setup. Compute win rate, average win, average loss, profit factor, expectancy and maximum drawdown. Anything under 30 trades is noise.
Step 5: forward test before you size up
Trade the rules live at minimum size for a month. If live results are far from the backtest, the difference is usually execution, slippage or discipline rather than the strategy.
Common mistakes
Curve-fitting to one market period, ignoring commissions and slippage, changing the rules mid-test, and testing on a period that only contains one kind of market condition.
Frequently asked
How many trades does a backtest need?
Aim for 100 or more trades of the same setup. Below 30 the result is dominated by randomness.
Can I backtest in a journal?
Yes. Log backtested trades the same way you log live ones, tagged with a playbook, and compare the backtested expectancy with your live expectancy.
Is manual backtesting worth it versus automated?
Manual replay teaches you what the setup feels like in real time and works for discretionary rules. Automated testing is faster but only works for fully mechanical rules.
Keep reading
TradeStack is a free trading journal. Drop in a CSV and get win rate, profit factor and expectancy automatically.
Start free