Home / Backtesting & trading frameworks

bt

Backtesting & trading frameworks★ 2,996 GitHub starsPython⏱ Commits today

Flexible Python backtesting framework for investment strategies

What it is

A Python backtesting library for building, testing, and comparing investment strategies from reusable components. It combines strategy logic with historical price data, tracks portfolio positions and transactions, models commissions and other trading costs, and reports statistics and charts through ffn. Strategy logic is composed from algorithms for scheduling, security selection, weighting, and rebalancing, and strategies can be nested into portfolio trees. This suits quants and researchers who want to experiment with strategies in Python; results depend on data quality and modeling assumptions and do not predict future performance.

At a glance

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

Best forBeginners
Used forBacktesting, Strategy research
MarketsMulti-market
StackPython
Learning curveEasy to start
Practical valueMedium practical value
CostFree and open source
HardwareNo GPU needed
MaintenanceCommits today

GitHub stars, last 30 days

Daily snapshots since 2026-09-12 (up to 30 days): +15 over the period, now 2,996. Gaps mean no snapshot was taken that day.

In the author's words

Flexible Backtesting for Python.

Open on GitHub ↗This week's trending tools中文页面

Similar tools