I would like to use tick data (especially order book data; but also trade) to backtest my strategies, can anyone offer a recommendation? Personally, I've written my own backtesting scripts couple of times, and also tried out
backtrader. I'm aware of other Python backtesting tools out there, but typically they deal with OHLC data only.
I'm also aware of
backtrader's Data Replay feature. Ideally, however, I would like to use actual order book data instead of simulated activity to analyse if we were able to execute the trade. In essence, my intended strategy is bordering slightly on cross-exchange arb/hedging execution—thus ability to execute in a timely fashion is quite critical.
From looking at other posts, I also understand that a couple other ways to deal with this include:
- Simulating order flow distribution or model transaction costs (both based on historical data).
- Using an OHLC backtester, but applied at a very minute interval (e.g. tick level). In this event however we are limited only to prices at the top of the order book (L1 data) and cannot evaluate our strategy properly?
I personally view these as next-best alternatives compared to backtesting with actual order book data. For those who have had experience in this aspect, do you mind sharing more on the steps you took to backtest your strategies? Or potentially suggestions that I may be blind to?
Thank you very much in advance!