Blog / Tools

Backtesting for Beginners: How to Test a Strategy Without Fooling Yourself

Backtests can mislead. Learn how to define rules, avoid curve fitting and look-ahead bias, and judge results honestly.

Rules first

A strategy must be precise enough that two people would take exactly the same trades: entry condition, exit condition, stop, target and position size. If you need judgment to decide, it cannot be backtested mechanically.

Common traps

Look-ahead bias: using information that was not available at the time, such as trading a candle's close at its own open. Curve fitting: tuning parameters until the past looks perfect. Survivorship bias: testing only assets that still exist. Ignoring costs: spreads and commissions can turn a winner into a loser.

How to judge a result

Look for at least 30 and ideally 100 or more trades, a profit factor above about 1.3 after costs, a drawdown you could tolerate and similar results across different markets and periods. If tiny changes to a setting destroy the result, the edge is fragile.

Then forward test

Run the rules on a demo account for a few weeks before real money. Our free backtester reads signals at the close and fills at the next open, includes costs and shows drawdown, so you avoid the most common errors.

A sanity checklist

Did you read signals at the close and fill at the next open? Did you include spread and commission? Do results hold across at least two markets and two periods? Is the maximum drawdown something you could actually sit through? Would the result survive a small change to each parameter?

If any answer is no, treat the result as a hypothesis, not a finding.

Out-of-sample testing

Split your history into two parts. Design and tune the rules on the first part, then test them once on the second, which you did not look at. If the performance drops sharply on the unseen period, the rules were probably over-fitted to the first part. This single habit eliminates most self-deception.

Key takeaways

  • Precise rules only.
  • Include costs.
  • Avoid curve fitting.
  • Forward test before going live.

Related

Educational content, not financial advice.