Introduction
GlowBack provides high-performance Python bindings built with PyO3, enabling you to leverage Rust’s speed and safety while writing backtesting strategies in Python. The API is designed to be intuitive for Python developers while maintaining the performance characteristics of the underlying Rust engine.Installation
Install GlowBack using pip:Quick start
Here’s a simple example to get started with GlowBack:Core classes
The GlowBack Python API consists of the following main components:DataManager
Load and manage market data from multiple sources
BacktestEngine
Execute backtests with custom strategies
Strategy Classes
Define and implement trading strategies
Data Types
Symbols, bars, and portfolio types
API conventions
Date formats
All dates must be in RFC3339/ISO8601 format with timezone information:Resolutions
GlowBack supports the following time resolutions:"minute"or"1m"- 1-minute bars"hour"or"1h"- 1-hour bars"day"or"1d"- Daily bars (default)
Asset classes
When creating symbols, you can specify the asset class:"equity"- Stocks (default)"crypto"- Cryptocurrencies"forex"- Foreign exchange"commodity"- Commodities"bond"- Bonds
Error handling
GlowBack raises standard Python exceptions:Working with results
Backtest results provide multiple ways to access and visualize data:Jupyter notebook integration
GlowBack is designed to work seamlessly in Jupyter notebooks:Next steps
Load market data
Learn how to load data from various sources
Run backtests
Execute backtests with the BacktestEngine
Custom strategies
Create your own trading strategies
API examples
View complete working examples