Backtrader

Backtrader is a compact Python framework for writing a strategy once and running it against historical data or a live broker integration. Its small API and simple installation make it a direct starting point for code-first backtesting.

strategy backtestingPython frameworkautomated tradingdevelopers
GitHub Stars22,640
Primary languagePython
LicenseGPL-3.0
Official repositoryOpen GitHub ↗

Is it a fit?

The quick decision view, grounded in the ranking data and verification record.

Best for

Python users who want a lightweight, controllable framework for local data and custom strategy logic.

Not ideal for

Anyone expecting built-in data downloads, project scaffolding, experiment storage, or a polished report UI.

Tested status

Passed at least one reproducible local task test

Setup difficulty

Low

Last verified

2026-07-31

What it can do

Research and testing

Strategy backtesting
Yes
LLM or agent based
No

Trading

Paper trading
Not confirmed
Automated trading
Yes

Getting started

API key required to start
No
Registration required to start
No
Self-hostable
Yes

Capabilities shown as Yes or No come from the official project source. Unconfirmed fields remain “Not confirmed”.

Related task rankings

The same tool can rank differently for different jobs.