Backtesting Lab

EUR/USD Backtesting and Trading Costs

The notebook uses a fixed entry rule and synthetic prices. It compares the same 51 completed trades under different assumptions. The calculator charges the spread once per completed trade and slippage on both sides.

Illustrative EUR/USD price chart with entry and stop levels.

Exercise 1 · When do costs erase the result?

The 51 synthetic EUR/USD test trades from the notebook earn 64.2 pips before costs. Break-even is about 1.26 pips per completed trade. Slippage applies on entry and exit.

With a 0.8-pip spread and 0.2 pips of slippage per side, the result is 3.0 pips.

Blue shows results before costs. Orange shows results after costs. The dashed line marks zero pips. Increase the spread and see when the orange line finishes below zero.

Next: Exercise 2 · Walk-forward

Download the EUR/USD Jupyter notebook (.ipynb)