High‑performance quantitative backtesting platform built in Rust with Python bindings and a Streamlit UI.
GlowBack provides a fast, realistic backtesting engine with data management, storage, and analytics. It includes:
- Event‑driven simulation engine with slippage/latency/commission models
- Data ingestion (CSV, Alpha Vantage, sample data)
- Arrow/Parquet columnar storage and SQLite metadata catalog
- Strategy library (4 built‑in strategies)
- Python bindings (async support)
- Streamlit UI for strategy development and analysis
Phase 0+ (Production Infrastructure) is complete. Phase 1 (Alpha) is in progress.
| Crate | Description |
|---|---|
| gb-types | Core data structures, orders, portfolio, strategy library |
| gb-data | Data ingestion, providers, SQLite catalog, Parquet storage/loader |
| gb-engine | Event‑driven backtesting engine and market simulation |
| gb-python | Python bindings with async support |
- Streamlit interface for data loading, strategy editing, running backtests, and result analysis
- Realistic market simulation with configurable market hours and resolution
- Multi‑asset backtesting: equities and crypto (spot) with asset-class-aware fees, market hours, and fractional quantities
- Multi‑symbol backtesting with chronological event ordering
- Performance analytics (Sharpe, Sortino, Calmar, CAGR, Max Drawdown, etc.)
- Risk analytics (VaR, CVaR, skewness, kurtosis)
- Strategy library: Buy & Hold, Moving Average Crossover, Momentum, Mean Reversion, RSI
- Storage: Arrow/Parquet with batch loading and round‑trip I/O
- Catalog: SQLite metadata with indexed queries
Prerequisites:
- Rust (latest stable)
- Python 3.8+ (for Python bindings)
# Clone
git clone <repository-url>
cd glowback
# Run tests
cargo test --workspace# Basic usage
cargo run --example basic_usage -p gb-types
# Market simulator tests
cargo test -p gb-engine simulator
# Parquet loader tests
cargo test -p gb-data parquetcd ui && python setup.py
# Opens http://localhost:8501cp .env.example .env # configure ports, API key, etc.
docker compose up --build -dServices:
- UI: http://localhost:8501
- API: http://localhost:8000 (set
GLOWBACK_API_KEYto require auth) - Engine: http://localhost:8081 (health JSON)
All services include health checks, restart policies, and resource limits. See the Deployment Guide for production configuration.
import glowback
manager = glowback.PyDataManager()
manager.add_sample_provider()
manager.add_csv_provider("/path/to/data")
manager.add_alpha_vantage_provider("your_api_key")
bars = manager.load_data(symbol, "2023-01-01T00:00:00Z", "2023-12-31T23:59:59Z", "day")cargo test --workspace
# 25 passed; 0 failedIn progress
- Performance benchmarking and optimization
- Additional strategies (Bollinger Bands, pairs trading)
Planned
- Advanced analytics (drawdown, factor exposure)
- Parameter sweep and walk‑forward optimization
- Expanded documentation
Contributions are welcome. Focus areas:
- Performance optimization
- Additional strategies and analytics
- UI enhancements
- Documentation and examples
Open an issue or PR with a clear description of the change.
MIT License — see LICENSE.
