A batteries-included pythonic library for AlgoGators members
Project description
🚀 AlgoSystem
A batteries-included Python library for algorithmic trading backtesting and beautiful, interactive dashboard visualization.
Transform your trading strategy performance analysis with professional-grade dashboards that rival institutional trading platforms.
✨ Features
- 🔄 Simple Backtesting: Run backtests with just a price series
- 📊 Interactive Dashboards: Generate beautiful HTML dashboards with 20+ metrics and charts
- 🎨 Visual Dashboard Editor: Drag-and-drop interface for customizing dashboard layouts
- 📈 Comprehensive Analytics: Performance metrics, risk analysis, rolling statistics, and more
- 🆚 Benchmark Comparison: Compare strategies against market benchmarks with alpha/beta analysis
- ⚙️ Flexible Configuration: JSON-based system for complete dashboard customization
- 💻 CLI Tools: Command-line interface for quick dashboard generation
- 🌐 Standalone Dashboards: Export self-contained HTML files that work offline
📦 Installation
Quick Install (Recommended)
pip install algosystem
Requirements
- Python 3.9 or newer
- Core dependencies: pandas, numpy, matplotlib
- All other dependencies are installed automatically
🚀 Quick Start
Command Line Usage
Generate a dashboard from CSV data:
algosystem dashboard strategy.csv
Launch the visual dashboard editor:
algosystem launch
Python API
import pandas as pd
from algosystem.api import quick_backtest
# Load your data (CSV with date index and price column)
data = pd.read_csv('strategy.csv', index_col=0, parse_dates=True)
# Run backtest and show results
engine = quick_backtest(data)
📚 Documentation
Full documentation is available in the docs/ directory:
- Installation and Getting Started
- CLI Documentation
- Python API Reference
- Dashboard Customization Guide
- Benchmark Integration Guide
- Data Connectors Guide
🔍 Key Components
Engine Class
Core backtesting engine for running tests:
from algosystem.backtesting import Engine
engine = Engine(
data=price_series,
benchmark=benchmark_series, # Optional
start_date='2022-01-01', # Optional
end_date='2022-12-31' # Optional
)
results = engine.run()
API Class
High-level interface with more functionality:
from algosystem.api import AlgoSystem
# Run backtest
engine = AlgoSystem.run_backtest(price_series, benchmark_series)
# Print formatted results
AlgoSystem.print_results(engine, detailed=True)
# Generate dashboard
AlgoSystem.generate_dashboard(engine, open_browser=True)
Dashboard Configuration
Create custom dashboards via JSON configuration:
from algosystem.api import AlgoSystem
# Load and modify configuration
config = AlgoSystem.load_config()
config["layout"]["title"] = "My Custom Dashboard"
# Save configuration
AlgoSystem.save_config(config, "my_config.json")
# Use configuration for dashboard
engine.generate_dashboard(config_path="my_config.json")
🔧 Common Use Cases
Basic Backtesting
from algosystem.backtesting import Engine
# Run backtest
engine = Engine(price_series)
results = engine.run()
# Print key metrics
print(f"Total Return: {results['returns']:.2%}")
print(f"Sharpe Ratio: {results['metrics']['sharpe_ratio']:.2f}")
print(f"Max Drawdown: {results['metrics']['max_drawdown']:.2%}")
Benchmark Comparison
from algosystem.data.benchmark import fetch_benchmark_data
# Fetch S&P 500 data
sp500_data = fetch_benchmark_data('sp500')
# Run backtest with benchmark
engine = Engine(price_series, benchmark=sp500_data)
results = engine.run()
# Print benchmark comparison metrics
print(f"Alpha: {results['metrics']['alpha']:.2%}")
print(f"Beta: {results['metrics']['beta']:.2f}")
Standalone Dashboard
# Generate standalone HTML dashboard
dashboard_path = engine.generate_standalone_dashboard('my_dashboard.html')
🛠️ Troubleshooting
Package Not Found
If you see ImportError: No module named 'algosystem':
- Verify installation:
pip list | grep algosystem - Try reinstalling:
pip install --upgrade --force-reinstall algosystem
Configuration Issues
Reset to default configuration:
algosystem reset-user-config
Quick Start for Contributors
# Clone repository
git clone https://github.com/yourusername/algosystem.git
cd algosystem
# Install with dev dependencies
poetry install --with dev
# Run tests
pytest
📖 License & Usage Terms
trade-ngin is licensed under the GPL v3 License. See LICENSE file for details.
📚 Citing
If you use AlgoSystem in your research, please cite:
@software{algosystem,
author = {AlgoGators Team},
title = {AlgoSystem: A Python Library for Algorithmic Trading},
url = {https://github.com/algogators/algosystem},
year = {2025},
}
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file algosystem-0.1.3.tar.gz.
File metadata
- Download URL: algosystem-0.1.3.tar.gz
- Upload date:
- Size: 2.1 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.2 CPython/3.12.8 Windows/11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
533a89860fe86c415a21f5502ea245b199536d20aa4a6211769b0792236c7659
|
|
| MD5 |
5d44acfb9dea94033be5885f5888b9d5
|
|
| BLAKE2b-256 |
cc24373cc3ae48c9a3452a069b68a9e5b8e397b712ee3e429904e0ea1da8e30c
|
File details
Details for the file algosystem-0.1.3-py3-none-any.whl.
File metadata
- Download URL: algosystem-0.1.3-py3-none-any.whl
- Upload date:
- Size: 2.1 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.2 CPython/3.12.8 Windows/11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4b48c940622119e2d08bdd9ba6f7e857d543c3729f28d531f152a95b28680a41
|
|
| MD5 |
c91dbc8e47c8448e1c8a10a921cc5547
|
|
| BLAKE2b-256 |
94617ef8075d014e3fef539778c6e2db0230d87ec2d98f8742311071fb562e58
|