A vectorised backtest in pandas
Backtesting Honestly
Building a simple backtester, then making it honest — realistic fills and costs, no look-ahead, and metrics that describe risk as well as return.
What you will be able to do
- Build a vectorised and an event-driven backtest of the same rules, and reconcile them.
- Model commissions, spread and slippage.
- Remove look-ahead bias with correct signal timing.
- Report expectancy, drawdown, Sharpe ratio and exposure from a trade list and an equity curve.
Planned lessons
1 2 An event-driven backtest
3 Fills, costs and slippage
4 Timing and look-ahead bias
5 Reading a backtest report
