Package backtesting

Backtesting.py Documentation

Warning: v0.2.0 breaking changes

Version 0.2.0 introduced some breaking API changes. For quick ways to migrate existing 0.1.x code, see the implementing pull request.

Manuals

Tutorials

These tutorials are also available to test as live Jupyter notebooks: Binder

Example Strategies

  • (contributions welcome)

FAQ

Potentially outdated answers to popular questions can be found on the issue tracker.

License

This software is licensed under the terms of AGPL 3.0, meaning you can use it for any reasonable purpose and remain in complete ownership of all the excellent trading strategies you produce, but you are also encouraged to make sure any upgrades to Backtesting.py itself find their way back to the community.

API Reference Documentation

Sub-modules

backtesting.backtesting

Core framework data structures. Objects from this module can also be imported from the top-level module directly, e.g …

backtesting.lib

Collection of common building blocks, helper auxiliary functions and composable strategy classes for reuse …

backtesting.test

Data and utilities for testing.