Python's pluggable backtester
Project description
Python's pluggable Backtester
Schedule your functions today, run them tomorrow... or backtest them yesterday.
Anterior is an open-source Python backtester that lets you schedule and backtest functions. It is lightweight, easy to use, and works with your DataFrames and Series data. Check out the Documentation for more information.
Quickstart
1. Install
Installation is simple:
pip install anterior
Alternatively, to install the latest features, clone this GitHub repository and run the following command inside the downloaded directory:
pip install .
2. Start backtesting!
You're now ready to run backtests with Anterior. The following example shows how to dynamically create a Fibonacci sequence by computing the next number every hour.
from anterior import BackTester
fibonacci = [0, 1]
def hourly_fibonacci():
fibonacci.append(sum(fibonacci[-2:]))
bt = BackTester()
bt.every(hours=1).do(hourly_fibonacci)
bt.run(start="2021-01-01", end="2022-01-02")
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file anterior-0.0.1.tar.gz
.
File metadata
- Download URL: anterior-0.0.1.tar.gz
- Upload date:
- Size: 16.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.2 CPython/3.12.2 Darwin/23.4.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a2e570cb06c399300b25cdc4350ef6aadb1c8451eff46fd2dce4a7856760aaa8 |
|
MD5 | 2d0fbd3e6f3887330a549a7b0840d0e9 |
|
BLAKE2b-256 | a67f52b9e590b682f39744db3ab5907da9e01d8ab6b4190e0a7dd5004fbb51fe |
File details
Details for the file anterior-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: anterior-0.0.1-py3-none-any.whl
- Upload date:
- Size: 19.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.2 CPython/3.12.2 Darwin/23.4.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | eb195080fb05236bd07f9fc94bff7919867f660271534cf019eb1325e40c2ffb |
|
MD5 | b6737112badeb258cae2e8273da061e4 |
|
BLAKE2b-256 | de16b984c1b89d54a1902ea5c360f057b9fe135487fde2ebd2136b375d0c4852 |