Stock trading bot written in python that evaluates active stocks and buy/sells undervalued and up-trending stocks based on day trading patterns and news sentiment analysis.
This code for this bot can be broken into 3 different parts:
That's it!
Clone the repository: git clone https://github.com/aoberai/stock-trading-bot.git
Install dependencies
pip3 install -r requirements.txt
for linux bash
py -m pip install -r requirements.txt
for windows command prompt
Add a credentials.py file which has the information to your api keys / passwords 1)Alpaca api for stock buying and selling handler + front end : https://alpaca.markets 2)News API for stock sentiment analysis : https://newsapi.org
Put the following 3 variables into your credentials.py file:
docker build -t stock-trader-bot .
# you can change the timezone to be region specific
docker run --rm -it -e "TZ=America/New_York" -d -p 5000:5000 stock-trader-bot
Please create an issue if you are having problems getting the repo to work or if any part of the codebase look confusing -- I can help out.
This repository is constantly getting better so please feel free to work with it and post pull requests if you encounter any bugs or want to add additional functionality.
by Aditya Oberai