- Create a virtual environment
virtualenv -p python3 venv - Create an .env file (see .env.example)
- Activate the virtual environment
source venv/bin/activate pip install -r requirements.txt- Run the bot :
python main.py
Things to care about:
- The .env file takes precedence over the environment variables and the default values.
- The only differences between a live bot and a test bot are the APCA_API_KEY_ID and APCA_API_SECRET_KEY
- If you want to test the bot, you use the PAPER APCA_API_KEY_ID and APCA_API_SECRET_KEY
- The bot will only trade if it is in the market day (9:30-16:00 ET) if trading STOCKS
The bot uses the moving average to detect buy and sell signals. Pretty dumb. At the moment loses money.
- Refactor the code in order to follow the code style and make it more readable (SOLID principles)
- Add more tests
- Add more tests
- Add more tests, because they are never enough
- Create a StrategyFactory in order to use different strategies
[WIP]