kernc/backtesting.py
🔎 📈 🐍 💰 Backtest trading strategies in Python. observed · 2026-08-28
Health v2 · maintenance only
75/100
- Activity 96
- Release rhythm 35
- Longevity 100
Flags: no_releases
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-02. Adoption (stars, forks) is never an input.
- gap_med: n/a
- age_days: 2800
- days_rel: n/a
- days_push: 28
- n_releases_24m: 0
Adoption not part of the score
8893 stars · 1520 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-29, confidence not recorded
Backtesting.py is a lightweight Python framework for backtesting trading strategies against historical candlestick data. It provides a small, clean Strategy/Backtest API, works with any technical indicator library, and produces interactive performance plots and statistics.
Use cases
- backtest a trading strategy on historical OHLC data
- test moving average crossover strategies in Python
- evaluate strategy performance with stats like return and volatility
- simulate forex, crypto, or stock strategies before live trading
- plot interactive equity curves and trade markers
- compare a strategy against buy-and-hold returns
When to choose
- you want a fast, lightweight, well-documented backtesting library with a small API
- you already work in Python with Pandas/NumPy and any TA library
- you need interactive visualizations of backtest results
- you backtest single-instrument, bar-based (vectorized/event-driven) strategies
When to avoid
- you need live trading or broker integration - this library only backtests
- you need multi-asset portfolio backtesting or complex order types
- your project cannot comply with the AGPL-3.0 license
- you need tick-level or high-frequency data simulation
Facets
framework · maturity active
trading simulation data-visualization benchmarking fintech data-science python cross-platform backtesting algorithmic-trading technical-analysis finance pandas bokeh trading python
2 sources
- readme: https://github.com/kernc/backtesting.py · fetched 2026-08-28 · 22447c8450cf
- homepage: https://kernc.github.io/backtesting.py/ · fetched 2026-08-29 · b647e1dc0bf3
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| kernc/backtesting.py | main | 75 |
For agents
markdown · JSON · MCP: product_card(name="kernc/backtesting.py")
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem