Quick answer
Lumibot is an open-source Python framework from Lumiwealth for writing trading bots once and running them as backtests or live. A Strategy implements initialize and on_trading_iteration; Lumibot handles scheduling, data (Yahoo, Polygon/Massive, ThetaData and others) and brokers including Alpaca, Interactive Brokers, Tradier, Schwab and Tradovate, for stocks, options, futures and crypto.
Lumibot at a glance
- Category
- Backtest + live trading engines
- Language
- Python
- License
- GPL-3.0
- Does
- Backtesting, Live trading, Paper trading
- Markets
- Stocks, ETFs, Options, Futures, Crypto, Forex
- Best for
- Retail traders who want a simple, broker-agnostic bot framework, especially for options.
- In AlgoGP
- Built-in bridge: add it to any project
Pick it if
Retail traders who want a simple, broker-agnostic bot framework, especially for options.
Watch out for
Less control over execution modelling than LEAN or Nautilus.
Lumibot strengths and limitations
Strengths
- Very approachable API and good tutorials.
- Same code for backtest and live; many brokers.
- Options support (chains, greeks) unusual for open-source frameworks.
Limitations
- Less control over execution modelling than LEAN or Nautilus.
- Backtests depend on the chosen data source’s quality and rate limits.
Lumibot example
pip install lumibotfrom datetime import datetime
from lumibot.strategies import Strategy
from lumibot.backtesting import YahooDataBacktesting
class BuyAndHold(Strategy):
def on_trading_iteration(self):
if self.first_iteration:
price = self.get_last_price("SPY")
self.submit_order(self.create_order("SPY", int(self.get_cash() // price), "buy"))
BuyAndHold.backtest(YahooDataBacktesting, datetime(2023, 1, 1), datetime(2024, 1, 1))Use Lumibot with AlgoGP
AlgoGP has a built-in Lumibot bridge. Describe the strategy to the copilot and backtest it in AlgoGP, then open the project’s APIs & keys tab and add Lumibot under Frameworks. The project gains these files, saved as a new version and included in every export:
frameworks/algogp_bridge.pyframeworks/tests/test_bridge.pyframeworks/lumibot_strategy.pyrequirements.txtgains:lumibot
python frameworks/lumibot_strategy.pyLumibot connects to Alpaca, Interactive Brokers, Tradier, Charles Schwab Trader API, Tradovate, Yahoo Finance, Massive (Polygon.io), ThetaData. Each guide shows how to create the API key, which you can store in the project’s Keys & secrets.
Lumibot: frequently asked questions
Is Lumibot free?
Yes, it is open source (GPL-3.0). Lumiwealth sells courses and hosted tools separately.
Which brokers does Lumibot support?
Alpaca, Interactive Brokers, Tradier, Schwab, Tradovate and crypto exchanges via CCXT, among others.
Lumibot alternatives
- BlanklyPythonPython framework for writing one strategy and running it as a backtest, paper or live bot on Alpaca, Coinbase, Binance, Kraken and OANDA.
- QuantConnect LEANC#, PythonThe open-source engine behind QuantConnect: event-driven backtesting and live trading in C# or Python across equities, options, futures, FX and crypto.
- BacktraderPythonThe classic Python event-driven backtesting library: Cerebro, data feeds, analyzers, sizers and plotting, with live stores for IB and OANDA.
- alpaca-pyPythonAlpaca’s official Python SDK for its Trading, Market Data and Broker APIs: stocks, options and crypto, REST and WebSocket streams.
Independent guide. AlgoGP is not affiliated with Lumibot. Features, licenses and maintenance change; check the official documentation. Nothing here is investment advice.