tradingtools.directory

Backtesting.py

Lightweight Python library for backtesting trading strategies on OHLC data

About Backtesting.py

Backtesting.py is a small open-source Python library that runs strategies on pandas data and returns performance stats and interactive Bokeh plots. It is deliberately minimal, with built-in optimization and a simple strategy class. Good for quick idea testing, less so for portfolio-level or multi-asset work.

Best for: Python beginners who want to test single-asset strategies in a few lines of code.

Pros

  • Very easy to learn
  • Interactive plots out of the box
  • Built-in parameter optimization

Cons

  • Single-instrument focus
  • No live trading
  • Basic order and portfolio modeling

Tags

More in Backtesting & Strategy Research

See all