๐Ÿ’ธ Sponsor the strip
REPLAUSE

hftbacktest

Tick-level backtester for market making on level-2 and level-3 books

Orderflow

๐Ÿงฉ Build it Free 01 in Backtesting ๐Ÿ†• NEW TODAY
CryptoStandalonePython

by nkaz001 โ†’

4,652 3 sent ยท 7 days 4 copies ยท 7 days MITupdated 23 Dec '25

Overview

hftbacktest is a tick-level backtester for high-frequency trading and market-making strategies, simulating full order-book depth with feed and order latency models.

  • Forquant developers building market-making or HFT strategies who need order-queue-position-aware fills, not bar-based backtests.
  • NeedsPython 3.11+ (pip install) or a Rust toolchain from source, and your own Level-2/Level-3 order-book and trade tick data.
  • Runsa Rust engine with Python (Numba JIT) bindings; live deployment currently targets Binance Futures and Bybit, Rust-only.
  • Limitit replays full order books and trades, not just OHLC bars, so it needs L2/L3 tick data you supply yourself.

Vibe it

Paste this into your AI agent. Write the first line, or take a suggestion; the copy carries your words.

Source: https://github.com/nkaz001/hftbacktest โ€” clone it and read its README and examples before writing anything; its documented setup beats what you remember.
Stack: a Rust engine with Python bindings (Numba JIT), doing full order-book reconstruction from Level-2/Level-3 feed data with configurable latency and queue-position fill models.
Needs: Python 3.11+, and your own Level-2 or Level-3 market-by-price/order tick data (or a sample set from the project's supporter-hosted data).
Start: `pip install hftbacktest`, then work through the Getting Started tutorial before adapting the market-making example to my own data.
Limit: it replays full order-book and trade tick feeds, not bars โ€” the data preparation step is the real cost of entry.
Done means: you show me the backtest result for the example market-making algorithm against sample or my own tick data.
Never place a live order. Paper or testnet until I say live in this chat.
Before you start, ask me: which exchange and instrument I'm targeting, and whether I already have Level-2/Level-3 tick data or need the sample set.

Something wrong here? Tell us โ†’