Launch offer20% off your first custom bot, for our first 1,000 clients. Free 30-minute consultation included.−20% · LAUNCH20 See packs →
Heybotify
Backtesting

PyBroker

Python framework for backtesting trading strategies, especially machine-learning ones, with a Numba-accelerated engine and walk-forward analysis.

edtechre/pybroker★ 3,654 stars last commit 2026-10-20
Our take

One of the few libraries that pushes you toward walk-forward testing and bootstrapped metrics, which is exactly what ML strategies need.

Who it is for

Python users who train models and want an honest out-of-sample test instead of one lucky backtest.

Strengths

  • Walk-forward analysis for model training and backtesting.
  • Bootstrapped metrics to estimate how reliable the results are.
  • Data from Alpaca, Yahoo Finance, AKShare or your own source; Optuna parameter optimization.

Good to know

  • The Commons Clause forbids selling the software or services whose value derives substantially from it; it is not OSI open source.
  • Machine-learning strategies overfit easily; walk-forward reduces but does not remove the risk.

Want a bot built on PyBroker, or something similar?
We set it up, connect it to your accounts and keep it running.

Get a free quote

Sources

Every fact on this page comes from these sources, checked on 2026-10-24. If something has changed, the source wins; tell us at hello@heybotify.com.

  1. https://github.com/edtechre/pybroker: features, data sources, installation, Apache 2.0 + Commons Clause license

Alternatives in Backtesting