Home / Backtesting & trading frameworks

backtrader

Backtesting & trading frameworks23,840 GitHub starsPython⏱ No commits in over six months
Plain-language introduction · Backtrader

Use past prices to practice checking trading rules.

The original Backtrader project is a Python backtesting framework. You write rules and prepare historical data, then the program advances through time and simulates execution to explore how those rules behaved. It does not make investment decisions or guarantee returns.

Good fit: researchers willing to learn Python, historical data and event-driven backtesting. Not a fit: someone seeking one-click advice or a ready-to-use, continuously maintained trading service.

Cost and license: the original code is available free of charge; PyPI identifies its license as GPLv3 or later. Read the terms before distributing or combining it with other software. Data, hosting and brokerage services may cost extra.

First step (about 3 minutes): open the official quickstart below and read “Basic Setup” and “Setting the Cash” to see how an engine and simulated starting funds are created. This is reading only: no installation, data download, account connection or trade. Running it requires additional setup and data.

As checked 2026-11-05, the original project’s PyPI package is 1.9.78.123 from 2023 and the default branch’s latest commit is from 2023. The repository is not archived, but consider maintenance and compatibility for a new project. Official sample data can change, so output may differ. Backtests are affected by fees, slippage, data bias and overfitting and do not predict returns. We did not install or run the project.

Official quickstart ↗ · Original project and license ↗ · Original package version ↗

No project-authorized introductory video has been verified for embedding. Use the official text guide above.

Python backtesting and live trading platform for strategies

What it is

A Python backtesting and live trading platform for trading strategies. It lets users define strategies with built-in indicators such as moving averages, run them against data feeds from CSV files, online sources, pandas, or blaze, and plot results as full charts. Live data and trading are supported through Interactive Brokers, Visual Chart, and Oanda. Developers should be aware that some live brokers require additional dependencies, and Oanda support is limited to the REST API only.

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 valueHigh practical value
CostFree and open source
HardwareNo GPU needed
MaintenanceNo commits in over six months

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 +208 , latest 23,840. Gaps mean no snapshot was taken that day.

In the author's words

Python Backtesting library for trading strategies.

Open on GitHub ↗This week's trending toolsChinese page

Similar tools