Lumibot is an algorithmic trading framework for Python 3.10+ that allows you to write strategies once and run them for backtesting or live trading across stocks, options, crypto, futures, and forex. It supports multiple brokers (e.g., Alpaca, Interactive Brokers, Tradier) and data sources. Current version is 4.5.47, with active development.
pip install lumibotNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Minimal Lumibot backtest. Runs a simple strategy for SPY in 2020.
Use correct imports: `from lumibot.lumibot import Lumibot`, `from lumibot.brokers import AlpacaBacktesting`, `from lumibot.strategies import TradingStrategy`.
Instantiate with `Backtesting(strategy, backtest_start, backtest_end)` instead of `Backtesting(broker, strategy, ...)`.
Use explicit imports like `from lumibot.strategies import TradingStrategy`.
Set environment variables before running live trading: `export ALPACA_API_KEY=...`
Start TWS/IB Gateway and ensure API settings allow connections from localhost.
No dependency data recorded yet.