EUR/USD Backtesting Lab
Work through practical exercises and challenges with synthetic EUR/USD prices in your browser.
- Calculate trading costs
- Compare walk-forward results
- Choose a trading rule
- Check a drawdown limit
- Compare win rate and expectancy
Which rule would you test?
Two rules differ only in the lookback used for the entry signal. The figures are net of 1.2 pips per completed trade. Both rules were evaluated on the same 300 synthetic hours.
| Rule | Lookback | Development (pips) |
|---|---|---|
| A | 6 hours | +25.68 |
| B | 12 hours | +2.44 |
Results in the separate test window
| Rule | Test (pips) |
|---|---|
| A · 6 hours | −49.24 |
| B · 12 hours | −1.13 |
A led in development but lost 48.11 pips more than B in the next window. Both rules lost money in this example. Compare more windows before drawing conclusions about robustness.
Which rule meets the drawdown limit?
Your limit is 14 pips in the next window. Drawdown is the largest fall from a previous peak in cumulative net pips after completed trades. It excludes intratrade fluctuations. The development window covers simulated hours 301–600. Both rules met the limit there, with costs of 1.2 pips per trade.
| Rule | Net pips | Drawdown (pips) |
|---|---|---|
| A · 12 hours | −1.13 | 13.13 |
| B · 18 hours | −4.08 | 13.13 |
Results for test hours 601–900
| Rule | Net pips | Drawdown (pips) |
|---|---|---|
| A · 12 hours | +14.52 | 15.52 |
| B · 18 hours | +10.29 | 10.99 |
A made more net pips but breached the risk limit. B stayed within it. The limit is an evaluation criterion here. It does not trigger a live exit in the simulation.
Challenge · Does the same win rate mean the same return?
Both rules won 12 of 20 simulated trades. Which would you test further if you could keep only one?
Average wins, losses and net expectation
| Rule | Ø win | Ø loss | Net pips/trade |
|---|---|---|---|
| A | +4 | −5 | −0.40 |
| B | +6 | −3 | +1.60 |
Weight the average gross win and loss by their frequencies, then subtract 0.8 pips in costs per trade. For B: 0.60 × 6 − 0.40 × 3 − 0.8 = 1.6 pips. B is the better candidate in this example. A fresh test is needed to see whether that holds.