https://github.com/nkaz001/hftbacktestI'd like to introduce a backtesting tool that focuses on comprehensive tick-by-tick backtesting, incorporating latencies, order queue positions, and complete order book reconstruction.
This framework is designed for developing high-frequency trading and market-making strategies. It focuses on accounting for both feed and order latencies, as well as the order queue position for order fill simulation. The framework aims to provide more accurate market replay-based backtesting, based on full order book and trade tick feed data.
There has been a ton of updates so far.
Key Features:
- Complete tick-by-tick simulation with a customizable time interval or based on the feed and order receipt.
- Full order book reconstruction based on L2 Market-By-Price and L3 Market-By-Order (WIP) feeds.
- Backtest accounting for both feed and order latency, using provided models or your own custom model.
- Order fill simulation that takes into account the order queue position, using provided models or your own custom model.
- Backtesting of multi-asset and multi-exchange models
- Deployment of a live trading bot using the same algorithm code: currently for Binance Futures and Bybit.
Key Tutorials:
- High-Frequency Grid Trading:
https://hftbacktest.readthedocs.io/en/latest/tutorials/High-Frequency%20Grid%20Trading%20-%20Comparison%20Across%20Other%20Exchanges.html]]https://hftbacktest.readthedocs.io/en/latest/tutorials/High-Frequency%20Grid%20Trading%20-%20Comparison%20Across%20Other%20Exchanges.html- Market Making with Alpha - Order Book Imbalance:
https://hftbacktest.readthedocs.io/en/latest/tutorials/Market%20Making%20with%20Alpha%20-%20Order%20Book%20Imbalance.html- Market Making with Alpha - APT:
https://hftbacktest.readthedocs.io/en/latest/tutorials/Market%20Making%20with%20Alpha%20-%20APT.html- Accelerated Backtesting:
https://hftbacktest.readthedocs.io/en/latest/tutorials/Accelerated%20Backtesting.htmlFull documentation is here:
https://hftbacktest.readthedocs.io/en/latest/index.html