Backtestable AI trading agents and Python algorithmic trading strategies for stocks, options, crypto, futures, forex, SEC filings, FRED macro data, and real brokers.
$git clone https://github.com/lumiwealth/lumibotInstalls into the current project.
Install lumibot by running `git clone https://github.com/lumiwealth/lumibot`, then use it for the current task and follow its documentation at https://github.com/lumiwealth/lumibot.
| 1 | [](https://github.com/Lumiwealth/lumibot/actions/workflows/cicd.yaml) |
| 2 | [](https://github.com/Lumiwealth/lumibot/actions/workflows/cicd.yaml) |
| 3 | |
| 4 | # Lumibot - A Backtesting and Trading Library for Stocks, Options, Crypto, Futures, FOREX and More! |
| 5 | |
| 6 | Lumibot is a backtesting and trading library for stocks, options, crypto, futures and more. It is made so that the same code you use for backtesting can be used for live trading, making it easy to transition from backtesting to live trading. Lumibot is a highly flexible library that allows you to create your own strategies and indicators, and backtest them on historical data. It is also highly optimized for speed, so you can backtest your strategies quickly and efficiently. |
| 7 | |
| 8 | **IMPORTANT: This library requires data for backtesting. The recommended data source is [Polygon.io](https://polygon.io/?utm_source=affiliate&utm_campaign=lumi10) (a free tier is available too). Please click the link to give us credit for the sale, it helps support this project. You can use the coupon code 'LUMI10' for 10% off.** |
| 9 | |
| 10 | ## Documentation - 👇 Start Here 👇 |
| 11 | |
| 12 | To get started with Lumibot, you can check out our documentation below. |
| 13 | |
| 14 | **Check out the documentation for the project here: 👉 <http://lumibot.lumiwealth.com/> 👈** |
| 15 | |
| 16 | ## Build Trading Bots with AI |
| 17 | |
| 18 | Want to build trading bots without code? Check out our new platform [BotSpot](https://botspot.trade/sales?utm_source=lumibot+docs&utm_medium=documentation&utm_campaign=GitHub+Readme) where you can create and deploy trading strategies using AI! BotSpot allows you to: |
| 19 | |
| 20 | - Build trading bots using natural language and AI |
| 21 | - Test your strategies with historical data |
| 22 | - Deploy your bots to trade automatically |
| 23 | - Join a community of algorithmic traders |
| 24 | |
| 25 | **Visit [BotSpot.trade](https://botspot.trade/sales?utm_source=lumibot+docs&utm_medium=documentation&utm_campaign=GitHub+Readme) to get started building AI-powered trading bots today!** |
| 26 | |
| 27 | ## Blog |
| 28 | |
| 29 | Our blog has lots of example strategies and shows you how to run a bot using LumiBot. Check the blog out here: |
| 30 | |
| 31 | **https://lumiwealth.com/blog/** |
| 32 | |
| 33 | ## Run a backtest |
| 34 | |
| 35 | To run a backtest, you can use the following code snippet: |
| 36 | |
| 37 | ```bash |
| 38 | python -m lumibot.example_strategies.stock_buy_and_hold |
| 39 | ``` |
| 40 | |
| 41 | ## Run an Example Strategy |
| 42 | |
| 43 | We made a small example strategy to show you how to use Lumibot in this GitHub repository: [Example Algorithm GitHub](https://github.com/Lumiwealth-Strategies/stock_example_algo) |
| 44 | |
| 45 | To run this example strategy, click on the `Deploy to Render` button below to deploy the strategy to Render (our recommendation). You can also run the strategy on Repl.it by clicking on the `Run on Repl.it` button below. |
| 46 | |
| 47 | [](https://render.com/deploy?repo=https://github.com/Lumiwealth-Strategies/stock_example_algo) |
| 48 | |
| 49 | [](https://replit.com/new/github/Lumiwealth-Strategies/stock_example_algo) |
| 50 | |
| 51 | **For more information on this example strategy, you can check out the README in the example strategy repository here: [Example Algorithm](https://github.com/Lumiwealth-Strategies/stock_example_algo)** |
| 52 | |
| 53 | ## Contributors |
| 54 | |
| 55 | If you want to contribute to Lumibot, you can check how to get started below. We are always looking for contributors to help us out! |
| 56 | |
| 57 | Here's a video to help you get started with contributing to Lumibot: [Watch The Video](https://youtu.be/Huz6VxqafZs) |
| 58 | |
| 59 | **Steps to contribute:** |
| 60 | |
| 61 | 0. Watch the video: [Watch The Video](https://youtu.be/Huz6VxqafZs) |
| 62 | 1. Clone the repository to your local machine |
| 63 | 2. Create a new branch for your feature |
| 64 | 3. Run `pip install -r requirements_dev.txt` to install the developer dependencies |
| 65 | 4. Install all the requirements from setup.py: `pip install -e .` |
| 66 | 5. Make your changes |