Skip to content
ToolsOpen sourceAGPL-3.0

Backtesting.py

Small, readable Python backtesting library for single-asset strategies

By kernc

Live GitHub metrics

Live GitHub data · Oct 11, 2026
Stars
9,033
Stars · 7d
+26
Stars · 30d
+106
30d momentum
+1.2%
Forks
1,543
Open issues
95
Language
Python
Last push
2 months ago

No tagged releases. Repository created Jan 2, 2019.

7.3k7.4k7.4kJul 2Oct 11
Cumulative GitHub stars, Jul 2, 2026 to Oct 11, 2026. Source: OSSInsight star history.

What it is

Backtesting.py is a compact library with a clean API, interactive Bokeh charts and built-in parameter optimisation. It is a good first backtester for agent builders who need a sanity check before anything touches a broker.

In the maintainers' words: “🔎 📈 🐍 💰 Backtest trading strategies in Python.”

Tags

  • Backtesting
  • Lightweight
  • Python
  • #algo-trading
  • #algorithmic-trading
  • #backtesting
  • #backtesting-engine
  • #backtesting-frameworks
  • #backtesting-trading-strategies
  • #finance
  • #financial-markets