# nkaz001/hftbacktest

Free, open source, a high frequency trading and market making backtesting and trading bot, which accounts for limit orders, queue positions, and latencies, utilizing full tick data for trades and order books(Level-2 and Level-3), with real-world crypto trading examples for Binance and Bybit

Repository: https://github.com/nkaz001/hftbacktest
Canonical: https://ross.abutalabs.com/products/hftbacktest
Language: Rust
License: MIT
License Family: permissive
Topics: backtesting, high-frequency-trading, market-making, backtesting-engine, market-maker, algotrading, hft, algorithmic-trading, backtesting-trading-strategies, limit-order-book, orderbook-tick-data, quantitative-trading, trading-algorithms, binance, crypto-trading, trading-simulator, crypto-bot, orderbook, trading-strategies, tradingbot
Last push: 2025-12-23T15:57:58+00:00

## Health v2 (maintenance only)
Score: 63/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 58, release rhythm 48, longevity 100
- inputs: {"age_days": 1469, "days_push": 253, "days_rel": 266, "gap_med": 52.5, "n_releases_24m": 11}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 4516, forks 880 (observed 2026-08-28T04:08:52.677761+00:00)

## What it is
A high-frequency trading and market-making backtesting framework written in Rust with Python bindings, which accurately simulates limit orders, queue positions, and feed/order latencies using full tick-by-tick order book data (Level-2 and Level-3). It also supports deploying live trading bots for Binance Futures and Bybit using the same algorithm code.

## Use cases
- backtest high-frequency trading strategies with realistic latency and queue position modeling
- develop and test market making strategies on crypto exchanges
- reconstruct full order books from Level-2 and Level-3 tick data
- simulate order fills accounting for queue position
- prototype a trading bot and deploy it live to Binance or Bybit with the same code
- backtest multi-asset and multi-exchange strategies
- research market making with order book imbalance alpha

## When to choose
- you need accurate HFT or market-making backtesting that models latencies and queue positions rather than naive fills
- you have full tick data for trades and order books and want tick-by-tick simulation
- you trade crypto on Binance Futures or Bybit and want a path from backtest to live bot
- you want fast backtests via Numba JIT in Python or native Rust performance

## When to avoid
- you only need simple bar-based or daily backtesting for lower-frequency strategies
- you trade equities or other asset classes without crypto exchange connectors
- you lack tick-level order book data, which the framework requires for accurate simulation

## Facets
- artifact type: framework
- maturity: active
- function: simulation, trading, machine-learning
- domain: fintech
- platform: python, rust, cross-platform
- tags: backtesting, high-frequency-trading, market-making, limit-order-book, crypto-trading, tick-data, latency-modeling, queue-position, binance, bybit, cryptocurrency, quantitative-trading

## Member repositories
- nkaz001/hftbacktest (main) score 63

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:08:52.677761+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T18:20:18.869137+00:00, confidence not recorded.
  - readme: https://github.com/nkaz001/hftbacktest (fetched 2026-08-28T04:08:52.677761+00:00, sha f37d247335e1)
  - registry_crates: https://crates.io/api/v1/crates/hftbacktest (fetched 2026-08-29T09:06:10.628597+00:00, sha 509bd3d2c5a6)
- Data as of 2026-08-30T08:39:29.467469+00:00.
