Lumibot Trading Framework

Build, backtest, and run Python trading strategies with deterministic rules or AI trading teams.

Stars
★ 2.2k
Last updated
1d ago
License
GPL-3.0
Primary language
Python

At a glance

How it runs
Library / SDKCLISelf-hosted service
Works with
Universal · cross-platformCodex · Claude Code
Cost
Free software; you pay for model usage
Setup effort
Medium · a few setup steps
You'll need
Shell / CLINetwork accessLocal filesystemMCP Server
Typical use
A Python trader who wants to validate a buy rule on Yahoo historical data for 2023–2024 before running the same class on Alpaca paper trading.
Not a fit if
  • Users who want a ready-made hosted service without configuring broker credentials
  • Users expecting blanket support for every CCXT exchange

What does this agent do, and when should you use it?

Lumibot is a Python algorithmic-trading framework that runs the same Strategy in historical backtests, paper trading, and broker-connected execution. Its documented interfaces include Strategy, Trader, Alpaca, and backtesting classes such as YahooDataBacktesting. The built-in AI agent runtime creates specialized agents inside a strategy loop; they can inspect market data, fundamentals, SEC filings, FRED data, indicators, and local memory, while authorized agents can submit orders. Agent runs can record memory, tool calls, decisions, orders, and other artifacts in local SQLite and Parquet files for review. The framework can be self-hosted, with BotSpot presented as an optional managed deployment path around Lumibot.

A developer subclasses Strategy, implements on_trading_iteration, creates orders with create_order, and submits them with submit_order. Strategy.backtest(YahooDataBacktesting, start, end) runs a strategy against historical data and simulated orders; paper or live execution constructs an Alpaca broker, adds the strategy to Trader, and calls trader.run_all(). AI strategies create agents with self.agents.create(name, model, allow_trading, system_prompt) and sequence them with self.agents[...].run(task_prompt, context) for research, bull, bear, and trading decisions; only agents with allow_trading=True may trade. Documented built-in tools cover market and account state, orders, DuckDB, documentation search, indicators, SEC, FRED, local memory, and Telegram notifications, and external MCP servers can be mounted.

  1. A Python trader who wants to validate a buy rule on Yahoo historical data for 2023–2024 before running the same class on Alpaca paper trading.
  2. A quant team that wants researcher, bull, bear, and portfolio-manager agents to build and challenge an ETF or stock trade decision in sequence.
  3. A developer who wants Python risk gates around agent research and inspect orders, logs, and backtest artifacts before connecting real capital.
  4. A strategy author selecting broker or data paths for stocks, options, crypto, futures, forex, or Polymarket prediction contracts.
  5. A researcher who wants DuckDB time-series analysis, local SQLite/Parquet agent memory, and traceability for the evidence behind a trade.

How do you install or deploy this agent?

Install with pip install lumibot. For source development, the documented command is pip install -r requirements_dev.txt && pip install -e .. The AI trading-team example needs a valid model-provider key; the README example uses GEMINI_API_KEY. Alpaca paper or live execution also requires ALPACA_API_KEY, ALPACA_API_SECRET, and optionally ALPACA_IS_PAPER=true.

How do you use this agent?

Create my_strategy.py, import Strategy from lumibot.strategies and YahooDataBacktesting from lumibot.backtesting, define on_trading_iteration, then call MyStrategy.backtest(YahooDataBacktesting, datetime(2023, 1, 1), datetime(2024, 1, 1)) and run python my_strategy.py. To use Alpaca, set ALPACA_API_KEY, ALPACA_API_SECRET, and ALPACA_IS_PAPER=true; construct Alpaca from the configuration dictionary, add MyStrategy(broker=broker) to Trader, and call trader.run_all(). For the AI team example, set GEMINI_API_KEY plus the Alpaca variables and run python ai_trading_team_bull_bear_leveraged_etf.py; setting IS_BACKTESTING = True in that file switches it to the example's Yahoo backtest path.

What are this agent's strengths and limitations?

Pros
  • The same Strategy code path is documented for backtests, paper trading, and broker execution rather than only research or prompt demonstrations.
  • Its AI runtime supports specialized multi-agent flows, read-only research agents, and trading permissions that can be combined with deterministic Python controls.
  • Backtests and agent runs can retain SQLite and Parquet memory, orders, tool calls, and decision artifacts for auditability.
  • The README documents multiple broker, market, and backtesting paths, including Alpaca, Interactive Brokers, Tradier, Schwab, options, futures, and Polymarket.
Limitations
  • Paper and live operation require the relevant broker credentials, while market data, routing, and execution depend on external network services.
  • The AI-team example depends on a valid model-provider key; the project stops with a provider-key error if a key is absent or invalid.
  • CCXT coverage is explicitly limited: the README lists selected automatic credential paths, manual setups, and backtesting examples rather than every exchange.
  • The supplied licensing evidence conflicts: repository metadata says GPL-3.0, while the README badge and license section say MIT; adopters need to verify the LICENSE file.

How does this agent compare with similar options?

The README compares Lumibot with TradingAgents, ai-hedge-fund, OpenAlice, QuantDinger, OpenBB, and Qlib, positioning it around Python strategies, flexible agent teams, replayable decision review, and broker execution. It also compares Lumibot with Backtrader, Freqtrade, Zipline, Backtesting.py, Jesse, vectorbt, NautilusTrader, and Hummingbot, emphasizing same-code backtest/live operation, options support, an embedded AI runtime, and the BotSpot managed path.

Key facts side by side with the most closely related agents.

Agent Source review Form / cost Stars Updated Language Full support on
Lumibot Trading Framework This agent 57 · Major gaps Library / SDKFree + model costs ★ 2.2k 1d ago Python Codex · Claude Code
Blave Agent 87 · Good Desktop appFreemium ★ 307 1d ago Python Codex · Claude Code
Vibe-Trading 64 · Some gaps CLIFree + model costs ★ 38k 1d ago Python OpenAI API · Claude API
Alpaca Multi-Agent Trading Workbench 48 · Major gaps CLIFree + model costs ★ 283 10d ago Python OpenAI API

How does FollowAgents rate this agent?

FollowAgents source review · FARS-2.1
Major gaps
57/ 100 5-point scale 2.9 / 5
This review covers the source as of Aug 09, 2026. The project has shipped 39 stable release(s) since, which have not been re-reviewed. The score and verdict describe the reviewed version only. Recent releases ↓
Trust 10/29
Reliability 9/14
Adaptability 14/18
Convention 11/18
Effectiveness 9/13
Verifiability 4/8
Why each dimension lost points
Trust10 / 29 · 1.7/5

Evidence shows: README emphasizes paper trading before live, examples set PAPER=true, and AI agents default allow_trading=False, only trader agent can trade, reflecting least privilege. But no user confirmation mechanism found, data flow transparency only partial (e.g., agent context passing), sensitive data handling has SECURITY.md and .env loading, but no explicit encryption or redaction. Dependency security has CI and dependency list, but no vulnerability scanning mentioned. External effects (e.g., order submission) are clearly described, but rollback mechanism is absent. Source attribution has LICENSE and author info, but publisher unverified.

Reliability9 / 14 · 3.2/5

Evidence shows: README and example code are consistent, CI configuration is complete, dependency list is explicit, failure messages have examples (e.g., 'No price available'), but no error handling documentation.

Adaptability14 / 18 · 3.9/5

Evidence shows: README clearly identifies target users (developers, traders), supports multiple asset classes and scenarios, capability boundaries are described (e.g., supported and unsupported assets), trigger conditions (e.g., trading signals) have examples, environment fit (e.g., Python versions, OS) is described.

Convention11 / 18 · 3.1/5

Evidence shows: README structure is clear, installation instructions are simple, naming is stable (e.g., Strategy class), examples are abundant, but known limitations are not explicitly listed, license is GPL-3.0 (inconsistent with MIT badge in README), versioning/changelog not provided, maintenance responsibility has community links.

Effectiveness9 / 13 · 3.5/5

Evidence shows: Output usability (e.g., backtest reports, logs) is described, marginal value (e.g., AI agent teams) is compared, cost-benefit (e.g., BotSpot hosting) is mentioned, but no specific data provided.

Verifiability4 / 8 · 2.5/5

Evidence shows: Claims in README are supported by code examples, but cross-source verification is insufficient (e.g., comparisons with other projects lack data), fact-inference separation is unclear (e.g., performance claims).

Risks and how to mitigate them
  • Not found in source: rollback or recovery pathBack up first, or work on a git branch or snapshot, so its changes can be undone.
  • License inconsistency: README shows MIT badge, but LICENSE file is GPL-3.0, need to confirm actual license.
  • Example strategy contains local absolute paths (e.g., /Users/robertgrzesik/...), which may leak development environment info and are not portable.
  • Dependency list includes many large libraries, but no version pinning or security audit, posing supply chain risk.
  • AI agents' trading permission is off by default, but users must ensure correct configuration to avoid unintended trades.
Evidence confidence: Low Reviewed Aug 09, 2026 Reviewed revision 07b2514700f4 New commits since this review; the score may not cover them
See the full review method →

Recent releases

Latest entries from the project's GitHub Releases. Notes are quoted from upstream as written, not rewritten or tested by FollowAgents.

  1. v4.6.47
    Release notes excerpt
    What's Changed * v4.6.47 - Broker lifecycle, Kalshi discovery and backtest correctness by @grzesir in https://github.com/Lumiwealth/lumibot/pull/1266 Full Changelog: https://github.com/Lumiwealth/lumibot/compare/v4.6.46...v4.6.47
    View on GitHub ↗
  2. v4.6.46
    Release notes excerpt
    What's Changed * Release 4.6.46: current ProjectX quote startup by @grzesir in https://github.com/Lumiwealth/lumibot/pull/1265 Full Changelog: https://github.com/Lumiwealth/lumibot/compare/v4.6.45...v4.6.46
    View on GitHub ↗
  3. v4.6.45
    Release notes excerpt
    What's Changed * Release 4.6.45: terminal-safe SmartLimit and broker lifecycle recovery by @grzesir in https://github.com/Lumiwealth/lumibot/pull/1264 Full Changelog: https://github.com/Lumiwealth/lumibot/compare/v4.6.44...v4.6.45
    View on GitHub ↗

FAQ

Can it be used for live trading?
It has documented integrations for the listed broker paths, but the project advises starting with paper trading. Live use requires an intentional account/configuration switch, and trading or software failures can cause substantial losses.
Can AI agents place orders on their own?
Yes, but the example sets its researcher, bull, and bear agents to allow_trading=False; only the final trader agent with allow_trading=True can submit trades.
Do backtests require a fresh model call every time?
The README says identical agent decisions can be replayed in backtests without paying for another model call.
Is BotSpot required?
No. The README documents pip install lumibot and a self-hosted Alpaca/Trader flow. BotSpot is an optional managed path for data, backtests, deployment, and monitoring.
Which license applies?
The supplied evidence is inconsistent: repository metadata identifies GPL-3.0, while the README identifies MIT. Verify the repository's LICENSE text before adoption or distribution.
View on GitHub ↗ Install ↓

Compare agents like this one

The same FARS review applied across the shortlist this agent qualifies for.

Related agents