# hftbacktest documentation (mirror)

> Full mirror of https://hftbacktest.readthedocs.io — the documentation of hftbacktest, a high-frequency trading backtesting library (Python API over a Rust core: tick-by-tick market replay with order latency, queue-position and partial-fill models; also live trading). MIT licensed, by nkaz001. Mirror synced 2026-10-09T07:23:44Z; default version 'latest' tracks the master branch.

## For AI agents

- MCP server (Streamable HTTP, no auth): https://hftbacktest.verdictfinance.top/mcp — tools: hftbacktest_search, hftbacktest_read_page, hftbacktest_lookup_api, hftbacktest_read_source, hftbacktest_list_pages, hftbacktest_list_versions. Claude Code: `claude mcp add --transport http hftbacktest https://hftbacktest.verdictfinance.top/mcp`
- Server card: https://hftbacktest.verdictfinance.top/.well-known/mcp/server-card.json
- Any page as Markdown: append `.md` to its URL, e.g. https://hftbacktest.verdictfinance.top/en/latest/order_fill.html.md
- Whole docs (latest) as one Markdown file: https://hftbacktest.verdictfinance.top/llms-full.txt

## Tutorials

- [Data Preparation](https://hftbacktest.verdictfinance.top/en/latest/tutorials/Data%20Preparation.html.md)
- [Getting Started](https://hftbacktest.verdictfinance.top/en/latest/tutorials/Getting%20Started.html.md)
- [Working with Market Depth and Trades](https://hftbacktest.verdictfinance.top/en/latest/tutorials/Working%20with%20Market%20Depth%20and%20Trades.html.md)
- [Integrating Custom Data](https://hftbacktest.verdictfinance.top/en/latest/tutorials/Integrating%20Custom%20Data.html.md)
- [Making Multiple Markets - Introduction](https://hftbacktest.verdictfinance.top/en/latest/tutorials/Making%20Multiple%20Markets%20-%20Introduction.html.md)
- [High-Frequency Grid Trading](https://hftbacktest.verdictfinance.top/en/latest/tutorials/High-Frequency%20Grid%20Trading.html.md)
- [High-Frequency Grid Trading - Comparison Across Other Exchanges](https://hftbacktest.verdictfinance.top/en/latest/tutorials/High-Frequency%20Grid%20Trading%20-%20Comparison%20Across%20Other%20Exchanges.html.md)
- [High-Frequency Grid Trading - Simplified from GLFT](https://hftbacktest.verdictfinance.top/en/latest/tutorials/High-Frequency%20Grid%20Trading%20-%20Simplified%20from%20GLFT.html.md)
- [Impact of Order Latency](https://hftbacktest.verdictfinance.top/en/latest/tutorials/Impact%20of%20Order%20Latency.html.md)
- [Order Latency Data](https://hftbacktest.verdictfinance.top/en/latest/tutorials/Order%20Latency%20Data.html.md)
- [Guéant–Lehalle–Fernandez-Tapia Market Making Model and Grid Trading](https://hftbacktest.verdictfinance.top/en/latest/tutorials/GLFT%20Market%20Making%20Model%20and%20Grid%20Trading.html.md)
- [Making Multiple Markets](https://hftbacktest.verdictfinance.top/en/latest/tutorials/Making%20Multiple%20Markets.html.md)
- [Probability Queue Position Models](https://hftbacktest.verdictfinance.top/en/latest/tutorials/Probability%20Queue%20Models.html.md)
- [Risk Mitigation through Price Protection in Extreme Market Conditions](https://hftbacktest.verdictfinance.top/en/latest/tutorials/Risk%20Mitigation%20through%20Price%20Protection%20in%20Extreme%20Market%20Conditions.html.md)
- [Level-3 Backtesting](https://hftbacktest.verdictfinance.top/en/latest/tutorials/Level-3%20Backtesting.html.md)
- [Market Making with Alpha - Order Book Imbalance](https://hftbacktest.verdictfinance.top/en/latest/tutorials/Market%20Making%20with%20Alpha%20-%20Order%20Book%20Imbalance.html.md)
- [Market Making with Alpha - Basis](https://hftbacktest.verdictfinance.top/en/latest/tutorials/Market%20Making%20with%20Alpha%20-%20Basis.html.md)
- [Market Making with Alpha - APT](https://hftbacktest.verdictfinance.top/en/latest/tutorials/Market%20Making%20with%20Alpha%20-%20APT.html.md)
- [Queue-Based Market Making in Large Tick Size Assets](https://hftbacktest.verdictfinance.top/en/latest/tutorials/Queue-Based%20Market%20Making%20in%20Large%20Tick%20Size%20Assets.html.md)
- [Fusing Depth Data](https://hftbacktest.verdictfinance.top/en/latest/tutorials/Fusing%20Depth%20Data.html.md)
- [Accelerated Backtesting](https://hftbacktest.verdictfinance.top/en/latest/tutorials/Accelerated%20Backtesting.html.md)
- [Research Pricing Framework](https://hftbacktest.verdictfinance.top/en/latest/tutorials/Pricing%20Framework.html.md)
- [Examples](https://hftbacktest.verdictfinance.top/en/latest/tutorials/examples.html.md)
## User Guide

- [Migration To v2](https://hftbacktest.verdictfinance.top/en/latest/migration2.html.md)
- [Data](https://hftbacktest.verdictfinance.top/en/latest/data.html.md)
- [Latency Models](https://hftbacktest.verdictfinance.top/en/latest/latency_models.html.md)
- [Order Fill](https://hftbacktest.verdictfinance.top/en/latest/order_fill.html.md)
- [JIT Compilation Overhead](https://hftbacktest.verdictfinance.top/en/latest/jit_compilation_overhead.html.md)
- [Debugging Backtesting and Live Discrepancies](https://hftbacktest.verdictfinance.top/en/latest/debugging_backtesting_and_live_discrepancies.html.md)
- [Market Maker Program](https://hftbacktest.verdictfinance.top/en/latest/market_maker_program.html.md)
## API Reference

- [Initialization](https://hftbacktest.verdictfinance.top/en/latest/reference/initialization.html.md)
- [Backtester](https://hftbacktest.verdictfinance.top/en/latest/reference/backtester.html.md)
- [Constants](https://hftbacktest.verdictfinance.top/en/latest/reference/constants.html.md)
- [Statistics](https://hftbacktest.verdictfinance.top/en/latest/reference/stats.html.md)
- [Data Validation](https://hftbacktest.verdictfinance.top/en/latest/reference/data_validation.html.md)
- [Data Utilities](https://hftbacktest.verdictfinance.top/en/latest/reference/data_utilities.html.md)

## Versions

- latest (branch): https://hftbacktest.verdictfinance.top/en/latest/
- py-v2.4.2 (tag): https://hftbacktest.verdictfinance.top/en/py-v2.4.2/
- py-v2.3.0 (tag): https://hftbacktest.verdictfinance.top/en/py-v2.3.0/
- py-v2.2.0 (tag): https://hftbacktest.verdictfinance.top/en/py-v2.2.0/
- py-v2.1.0 (tag): https://hftbacktest.verdictfinance.top/en/py-v2.1.0/
- py-v2.0.0 (tag): https://hftbacktest.verdictfinance.top/en/py-v2.0.0/
- v1.8.4 (tag): https://hftbacktest.verdictfinance.top/en/v1.8.4/
