Backtest (การทดสอบย้อนหลัง)
A backtest applies a trading strategy's rules to past price data to see how it would have performed before you risk real money.
A backtest means taking a set of clear trading rules and applying them to historical prices. You check what the strategy would have done, trade by trade, if you had followed the rules in the past.
Simple example
Say your rule is: "Buy EURUSD when price closes above its 50-day average, and exit with a fixed Stop Loss or target." You apply it to two years of past daily charts and record every trade. Imagine the results are:
- 100 trades in total
- 55 winners averaging +100 pips = +5,500 pips
- 45 losers averaging -80 pips = -3,600 pips
- Net result: +1,900 pips
This suggests the rules worked on that past data. It does not show they will work in the future.
Why it matters
A backtest lets you find weak rules cheaply and see how large losing streaks might have been. You can also practise following the plan without pressure.
Common beginner mistakes
- Over-fitting: adjusting the rules again and again until they match the past perfectly. Such rules often fail on new data.
- Ignoring costs: forgetting Spread, commission and slippage, which reduce real results.
- Too little data: testing only a few trades or one market condition.
- Treating results as a promise: markets change, so past results never guarantee future ones.
After a backtest, many learners try the strategy on a demo account before using real money.