Markets and trading · Edition No. 21 · 15 Sep 2026

edtechre/pybroker

It tests a trading idea on history and tells you how much of the result could be luck.

← Markets and tradingRead the whole edition →

3.5k stars · Apache-2.0 with Commons Clause · v2.0.1 (2026-08-28) · Track this in Scout

Walk-forward analysis and bootstrapped confidence intervals as first-class features — the anti-curve-fitting layer.

Repo detailsthe review · specs · pros & cons · install

What it is

A Python framework for backtesting rule-based and machine-learning trading strategies. You write a strategy as a function over bar data; it handles data sources, caching, position and portfolio bookkeeping and performance metrics. Its two distinguishing features are hooks for training and using a model inside the strategy, and walk-forward analysis with bootstrapped confidence intervals.What it is good for. Anyone testing a trading idea who wants to know whether it is real. The problem it removes is self-deception, which is the main way a backtest wastes a year of someone's life. For ScalpingMate, which tests EURUSD strategies against OANDA data, walk-forward analysis is the right shape of test: a scalping strategy tuned on one month and never checked on the next is not a strategy, it is a description of that month.

Stars3.5k
LicenceApache-2.0 with Commons Clause
Latestv2.0.1 (2026-08-28)checked 7 Sep 2026
Written inPython
Good
  • Walk-forward testing and bootstrapped confidence intervals are built in, not bolted on. The honest test is the default one.
  • Training a model inside the strategy is a first-class feature rather than something you assemble yourself.
  • Results are cached, so re-running a long test after a small change is fast.
Watch for
  • The licence is Apache 2.0 with the Commons Clause, which means it is not open source in the usual sense: you may use it, but you may not sell the software itself. Read it before it goes anywhere near a paid product.
  • The package is called lib-pybroker on PyPI, not pybroker. Installing the obvious name gets you something else.
  • It is built around bars, so it is a poor fit for anything that depends on the order book or on tick-by-tick timing. See the note on hftbacktest at the end of this edition.
Similar repositories
  • kernc/backtesting.py

    A deliberately small single-asset backtester with built-in parameter search and interactive charts, easier to start with but without walk-forward analysis as a first-class feature; AGPL-3.0.

    Track this in Scout
  • nautechsystems/nautilus_trader

    Runs the identical strategy code in a backtest and in live trading, with a Rust core, so it is the production answer where PyBroker is the research one.

    Track this in Scout
  • polakowo/vectorbt

    Evaluates thousands of parameter combinations at once as array operations rather than a loop, which is far faster for sweeps; it carries the same Commons Clause restriction.

    Track this in Scout
Install
python3 -m venv venv && source venv/bin/activate
pip install -U lib-pybroker
# Python 3.11 or newer. Note the package name: lib-pybroker.
Screenshots
edtechre/pybroker: GitHub preview card

Get the next edition in your inbox

A dozen repositories, opened and checked. The licence read, the last release dated, and the ones that did not make it named with the reason. It is the half most lists leave out.

No tracking pixels. One click to leave. The archive stays free either way.

We use your address to send the edition and nothing else. Confirm by email, leave in one click. How we handle it.