Backtesting¶
Lumibot has multiple modes for backtesting:
Yahoo Backtesting: Daily stock backtesting with data from Yahoo.
Pandas Backtesting: Intra-day and inter-day testing of stocks and futures using CSV data supplied by you.
Polygon Backtesting: Intra-day and inter-day testing of stocks and futures using Polygon data from polygon.io.
DataBento Backtesting: Backtesting with high-quality data from DataBento for stocks, futures, and options.
ThetaData Backtesting: Backtesting with ThetaData (via the LumiBot Data Downloader).
Interactive Brokers (REST) Backtesting: Backtesting with IBKR Client Portal Gateway (via the LumiBot Data Downloader).
It is recommended to use Yahoo Backtesting for daily stock backtesting, ThetaData Backtesting for stocks/options/index data, and Interactive Brokers (REST) Backtesting for futures and crypto data. Pandas Backtesting is an advanced feature that allows you to test any type of data you have in CSV format but requires more work to setup and is not recommended for most users.
Files Generated from Backtesting¶
When you run a backtest, several important files are generated, each prefixed by the strategy name and the date. These files provide detailed insights into the performance and behavior of the strategy.
Contents:
- How To Backtest
- Files Generated from Backtesting
- Backtesting Function
- Backtesting Performance (Speed + Parity)
- Yahoo
- Pandas (CSV or other data)
- Polygon.io Backtesting
- DataBento Backtesting
- ThetaData Backtesting
- Interactive Brokers (REST) Backtesting
- Tearsheet HTML
- Trades Files
- Indicators Files
- Logs CSV