Actively developed AlgoGP bridge

Lumibot guide

Lumibot is designed so a beginner can go from idea to live bot quickly, including options strategies.

Last reviewed

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 lumibot
Install
from 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))
Buy SPY once and hold.

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.py
  • frameworks/tests/test_bridge.py
  • frameworks/lumibot_strategy.py
  • requirements.txt gains: lumibot
python frameworks/lumibot_strategy.py
Run the AlgoGP strategy with Lumibot.

Lumibot 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

Independent guide. AlgoGP is not affiliated with Lumibot. Features, licenses and maintenance change; check the official documentation. Nothing here is investment advice.

Build a strategy