Home / Backtesting & trading frameworks

PyBroker

Backtesting & trading frameworks3,732 GitHub starsPython⏱ Commits today

Licence: Apache 2.0 with Commons Clause

PyBroker uses Apache 2.0 with Commons Clause. Its source is available at no charge, but the added selling restriction means it is not open-source software. Use, modification and distribution must comply with the full licence, including Apache and Commons Clause notices.

Commons Clause does not grant the right to Sell the Software. Sell includes providing third parties, for a fee or other consideration, a product or service whose value derives entirely or substantially from the software’s functionality, including hosting, consulting or support that meets that definition.

This is not a blanket ban on all commercial use. Check the official terms for your version to determine whether your use falls within Sell and needs separate permission.

No-charge source access does not mean zero running costs. Data services, compute and storage may cost money, and data-provider terms still apply.

Checked: 2026-11-07 · Upstream LICENSE (reviewed revision)

Python algorithmic trading framework with machine learning support

What it is

A Python framework for developing algorithmic trading strategies, with a focus on strategies that use machine learning. It offers a fast backtesting engine built on NumPy and Numba, walkforward analysis for model training, parameter optimization with Optuna, bootstrap-based evaluation metrics, and historical data from Alpaca, Yahoo Finance, AKShare, or custom providers. The framework suits quants and developers who want to write rules-based or model-based strategies across multiple instruments and time intervals in Python. Full use of its data integrations may require accounts with those providers, and the machine learning focus means users need some familiarity with building and training models.

At a glance

Worth watchingOur rating, based on popularity, maintenance and how ready it is for real use.

Best forDevelopers
Used forBacktesting, Strategy research
MarketsMulti-market
StackPython
Learning curveModerate learning curve
Practical valueMedium practical value
LicenceSource available; selling restricted
HardwareNo GPU needed
MaintenanceCommits today

Popularity snapshots

Daily snapshots of GitHub stars. Star changes are not a count of users or usage. Snapshots since 2026-11-02 (up to 30 days): first-to-last change +65 , latest 3,732. Gaps mean no snapshot was taken that day.

In the author's words

Algorithmic Trading with Machine Learning.

Open on GitHub ↗This week's trending toolsChinese page

Similar tools