Backtesting Data Sources¶
You do not need a broker account to backtest. LumiBot backtests run on historical data from one of these sources. Pick the one that covers your assets and bar size.
Strongly recommended: connect the free BotSpot MCP
Use Claude, ChatGPT, Codex or Cursor? Connect the free BotSpot MCP and your AI gets:
Strategy-building skills for LumiBot.
Free data: news, economic data and SEC filings.
Backtests with charts it can run and read for you.
Cheap scheduled deployments on BotSpot’s servers, so you do not have to keep your own computer or server running.
The community and marketplace: see what other people’s bots are doing, post your own, research strategies and publish yours.
Easy broker linking.
It also gives LumiBot’s own AI agents extra research tools inside your strategies. Connect it free at botspot.trade/agents · Why connect it
Data source |
Good for |
Setup |
|---|---|---|
Daily stocks and ETFs |
No account or key |
|
Intraday stocks and options |
ThetaData subscription |
|
Stocks, options, forex and crypto |
Polygon.io API key |
|
Futures |
Databento API key |
|
Interactive Brokers history |
Client Portal access |
|
Stocks and options with your Alpaca account |
Alpaca API key |
|
Your own CSV or DataFrame data |
Your files |
|
Prediction contract prices |
Polymarket market ids |
|
Spot crypto candles |
Exchange id |
Choose the source with BACKTESTING_DATA_SOURCE or pass a data source class in Python. The full guide is Backtesting Trading Strategies in Python with LumiBot.
Frequently asked questions¶
Do I need a broker to backtest?¶
No. Backtests use historical data only. Yahoo daily data needs no account and no key.
Which data source should I start with?¶
Yahoo, for daily stock and ETF strategies. For intraday stocks or options, use ThetaData, Polygon or Alpaca. For futures, use Databento or Interactive Brokers.
How do I pick the data source without changing my code?¶
Set BACKTESTING_DATA_SOURCE in your .env file. The environment setting takes precedence over the data source class in code.
Do backtest results tell me how a strategy will do live?¶
No. A backtest is a simulation on past data. Fills, fees and market conditions can differ in live trading.
Can I use my own CSV data?¶
Yes. Load it into a pandas DataFrame and use the Pandas backtester. See Pandas (CSV or other data).