# Manifold-BT > Manifold-BT is a Python backtesting library with a Rust core for systematic trading research. It models execution realistically (fees, funding, slippage, partial fills, signal delay), simulates limit orders in the queue of an L2 or market-by-order book, runs backtests and large parameter sweeps in sub-second time, and publishes a hosted MCP documentation endpoint so AI agents can look up the authoring reference before writing a strategy. Install with `pip install manifoldbt`. Research software, not financial advice. For Python developers and quants. Every strategy example is in the full index: https://www.manifoldbt.com/llms-full.txt. ## Who builds it - Built and maintained by Jimmy Mouchlach (@Jimmy7892 on GitHub, https://github.com/Jimmy7892), the author of every human commit in the public repository. LinkedIn: https://www.linkedin.com/in/jimmy-mouchlach-92371a380/. More on the project and its public record: [About Manifold-BT](https://www.manifoldbt.com/about). ## Documentation - [Documentation: Python Backtesting API](https://www.manifoldbt.com/documentation): indicators, execution config, sweeps, walk-forward, Monte Carlo. The whole reference on one page, every section addressable by anchor (for example https://www.manifoldbt.com/documentation#quick-start). - [Interactive Python Backtesting Notebook](https://www.manifoldbt.com/notebook): runnable walkthrough: strategy, sweep, walk-forward, Monte Carlo. - [Backtesting MCP Server for AI Agents](https://www.manifoldbt.com/mcp): a hosted documentation endpoint for Claude Code, Cursor and other MCP clients. It answers questions about the authoring reference; it holds no engine and no market data, and your backtests never leave your machine. - [The Rust Backtesting Engine](https://www.manifoldbt.com/features/rust-backtesting-engine): how the engine runs a million bars in 22 ms on one core (a 20-thread workstation, measured in August 2026; the public CI figures are on the benchmarks page). - [The Research Workflow](https://www.manifoldbt.com/features/research-workflow): parameter maps, walk-forward folds, Monte Carlo, look-ahead detection, manifest replay. - [The Expression DSL](https://www.manifoldbt.com/features/expression-dsl): declare signals as composable expressions, 104 indicators and 38 candlestick patterns, evaluated vectorized in Rust. - [Multi-Asset Backtesting](https://www.manifoldbt.com/features/multi-asset-backtesting): cross-sectional ranking across a universe, cross-asset references, one shared account. - [Realistic Slippage, Fees, Funding and Partial Fills](https://www.manifoldbt.com/features/execution-realism): independent models for slippage, fees, funding, borrow, partial fills and signal delay in a Python backtest. - [GPU-Accelerated Backtesting in Python](https://www.manifoldbt.com/features/gpu-acceleration): CUDA parameter sweeps and Monte Carlo, bit-identical to the CPU path. - [Backtest Polymarket Strategies in Python](https://www.manifoldbt.com/integrations/polymarket): the Polymarket connector, free and without a key: 1-minute history for a market's whole life and every trade, settlement at resolution, one real run and a sweep over 400 resolved markets. - [Hyperliquid Historical Data for Backtesting](https://www.manifoldbt.com/integrations/0xarchive): the 0xArchive connector, with your own key: bars, funding, trades and the order book of Hyperliquid (perps, spot, HIP-3) and Lighter, Hyperliquid perp trades and book back to April 2023. - [Options Backtesting in Python](https://www.manifoldbt.com/features/options-backtesting): contracts that expire, cash-settle at intrinsic value, and post margin under a named model; a real multi-leg spread on live Deribit data. ## Benchmarks - [Benchmark Results: Manifold-BT vs vectorbt, RaptorBT and NautilusTrader](https://www.manifoldbt.com/benchmarks): the full results of two public CI runs, every engine installed from PyPI: single-backtest latency, parameter sweeps, cold start, memory, parity, and market making on order-book data against hftbacktest and NautilusTrader. Figures live on the page, which tracks the latest runs; nothing here quotes one, so this index does not go stale between runs. - [Raw benchmark data](https://www.manifoldbt.com/benchmarks.json): the exact JSON artifact that run produced, with the run URL, commit, engine versions and runner hardware it came from. ## Checking a result yourself You do not have to take a backtest on trust. Each check below runs on your own machine, against the package you installed from PyPI. - [Replay a run from its manifest](https://github.com/manifoldbt/manifoldbt/blob/master/python/manifoldbt/__init__.py#L3054): Every result carries result.manifest: the resolved configuration, the parameters, the data versions, the engine version and a hash of the strategy. mbt.replay(manifest, strategy, store) runs it again, so someone else can regenerate your numbers instead of reading them. - [Reproduce a recorded result](https://github.com/manifoldbt/manifoldbt/blob/master/python/tests/test_golden_daily.py): test_golden_daily.py runs committed daily bars and compares the equity curve, every trade and every metric with a committed expected file, to a relative tolerance of 1e-9. It needs no licence. - [Read the fill rules](https://github.com/manifoldbt/manifoldbt#execution-semantics): Each execution rule is written down, and where a choice existed the unfavourable one was taken: when a bar touches both the stop and the target, the stop wins; a bar that gaps through a stop fills at the open, not at the stop. - [Compare fills with vectorbt](https://github.com/manifoldbt/manifoldbt/blob/master/python/tests/test_parity_vectorbt.py): test_parity_vectorbt.py asserts entry price, exit price, exit reason and final return against vectorbt on brackets, shorts, trailing stops and fees. Install vectorbt and run it with pytest. - [Test for look-ahead](https://github.com/manifoldbt/manifoldbt/blob/master/examples/25_lookahead_trap.py): Corrupt every bar after a cut point, run again, and require the equity before it to come back bit-identical. The public tests use this method, and examples/25_lookahead_trap.py shows what each check can and cannot see. - [Run the suite and the benchmark](https://github.com/manifoldbt/manifoldbt/tree/master/benchmarks/vs_vectorbt): CI installs the published wheel and runs the public test suite on Python 3.9 to 3.13, listing what it skipped. The benchmark checks that every engine produced the same result before timing it, and runs again from a fork with one click. ## Guides - [Best Python Backtesting Libraries in 2026](https://www.manifoldbt.com/guide/best-python-backtesting-libraries): eight libraries compared on what users praise and complain about, with sources; engine, multi-asset, costs, live, licence, maintenance. - [What Is Backtesting?](https://www.manifoldbt.com/guide/what-is-backtesting): what it is, why it works, where it misleads. - [How to Backtest a Trading Strategy](https://www.manifoldbt.com/guide/how-to-backtest-a-trading-strategy): from raw bars to a realistic backtest and tearsheet. - [Algorithmic Trading in Python](https://www.manifoldbt.com/guide/algorithmic-trading-python): libraries, workflow, and a runnable parameter sweep. - [Backtest a Trading Strategy with Claude Code](https://www.manifoldbt.com/guide/backtest-with-claude-code): the agent workflow over MCP, what breaks when it writes from memory, measured on 24 runs per model. - [Free Crypto Tick Data](https://www.manifoldbt.com/guide/free-crypto-tick-data): where Binance and Bybit publish their trades and Bybit its order book, what each daily file holds, measured sizes, and how to backtest them. - [Polymarket Historical Data, Tested](https://www.manifoldbt.com/guide/polymarket-historical-data): what Polymarket's free APIs return and omit, tested on the real endpoints, with the free datasets, their licences and the paid order book archives. - [MBO vs MBP vs BBO](https://www.manifoldbt.com/guide/order-book-data-mbo-mbp-bbo): what L1, L2 and L3 order book data hold, which backtest needs which, and why only market-by-order data gives a queue position. - [Walk-Forward Optimization in Python](https://www.manifoldbt.com/guide/walk-forward-optimization-python): optimize in-sample, validate out-of-sample, fold by fold. Covers the four fold geometries (anchored/expanding, blocked/non-overlapping, Pardo rolling, custom overlapping), how to choose between them, walk-forward efficiency (WFE), and why overlapping folds count for less than they look. ## Strategies - [Python Trading Strategies, Backtested](https://www.manifoldbt.com/strategies): 15 strategies with runnable code and realistic backtests: mean reversion, momentum, breakout, MACD, pairs, and more. ## Comparisons - [Manifold-BT vs vectorbt](https://www.manifoldbt.com/vs/vectorbt): event-driven Rust execution versus vectorized NumPy. - [Manifold-BT vs Backtrader](https://www.manifoldbt.com/vs/backtrader): an actively maintained research engine versus the classic pure-Python framework. - [Manifold-BT vs Freqtrade](https://www.manifoldbt.com/vs/freqtrade): realistic backtesting versus live crypto trading. - [Manifold-BT vs RaptorBT](https://www.manifoldbt.com/vs/raptorbt): two Rust engines benchmarked; faster on parameter sweeps. - [Manifold-BT vs hftbacktest](https://www.manifoldbt.com/vs/hftbacktest): the same queue models measured on the same quotes, and when hftbacktest's live bots win. - [Manifold-BT vs NautilusTrader](https://www.manifoldbt.com/vs/nautilustrader): a research library that sweeps thousands of parameter sets, versus a full event-driven trading platform. - [Manifold-BT vs QuantConnect](https://www.manifoldbt.com/vs/quantconnect): a local research library versus a hosted platform, pricing compared. - [Manifold-BT vs Backtesting.py](https://www.manifoldbt.com/vs/backtesting-py): the simplest Python backtester versus a multi-asset Rust research engine. ## Deep dives - [Realistic Backtest Execution](https://www.manifoldbt.com/blog/realistic-backtest-execution): slippage, funding, partial fills, signal delay: why backtests lie. - [Why AI-Written Backtests Lie](https://www.manifoldbt.com/blog/why-ai-backtests-lie): look-ahead, optimistic fills and grid cherry-picking in agent-written backtests, with the check for each. ## Project record - Public since v0.1.0 on March 17, 2026; 62 releases since, the latest v0.35.0 on November 12, 2026. Every release, with its notes, is tagged at https://github.com/manifoldbt/manifoldbt/releases. - CI installs the published wheel from PyPI and runs the public test suite on Python 3.9 to 3.13 on every push: https://github.com/manifoldbt/manifoldbt/actions. - Download counts: https://pypistats.org/packages/manifoldbt (mirrors excluded). ## Pricing - Community: free, the engine at full speed, no time limit, no account. - [Pro](https://www.manifoldbt.com/pro): $16/mo billed annually, or $19 month to month. - [Researcher](https://www.manifoldbt.com/researcher): $33/mo billed annually, $39 month to month, or $590 lifetime. - [Firm](https://www.manifoldbt.com/firm): from $490/mo on an annual contract, quoted per firm. - The pricing table on the home page opens on the annual plans, $16 and $33 a month billed annually; its Monthly switch shows the month-to-month prices. ## Company - [About Manifold-BT](https://www.manifoldbt.com/about): the project, its maintainer and its public record. - [Algo Trading Discord with a Backtesting Bot](https://www.manifoldbt.com/discord): the Manifold-BT community server, and Fold, a Discord bot that backtests a strategy described in one sentence with the Manifold-BT engine (crypto, forex, metals, stock indices, commodities; 1h, 4h, 1d). A research community, not a signals group. - [Researcher: The Tick Layer](https://www.manifoldbt.com/researcher): everything in Pro, plus the tick layer: tape ingestion, order flow by aggressor side, real BBO at every event, tick-resolved fills inside bar backtests, the L2 order book level by level, with queue position and order and cancel latency, market-by-order (L3) data where a resting order is served at its exact place in the queue, the trade clock that runs a simulation one print at a time, GPU acceleration. - [Firm: Infrastructure Sized to Your Firm](https://www.manifoldbt.com/firm): everything in Researcher, sweeps, Monte Carlo and walk-forward distributed across your own CPU and GPU machines, with no markup on compute, connectors built for your data, in-house models ported to Rust, a named contact under a contractual SLA. ## Licence - Free to use, including commercially. The Python package, examples, tests and benchmarks are open source under Apache 2.0: https://github.com/manifoldbt/manifoldbt/blob/master/LICENSE. - The compiled engine inside the wheels is covered by the free Manifold-BT Engine License: no resale and no paid hosted service; its source is not published. https://github.com/manifoldbt/manifoldbt/blob/master/LICENSE-ENGINE. ## Optional - [Terms](https://www.manifoldbt.com/terms) - [Privacy](https://www.manifoldbt.com/privacy)