A TensorFlow machine learning algorithm using YFinance (Yahoo finance) data alongside scraped Twitter data that has been run through a sentient analyzer (textblob) to attempt to predict stock movements.
- Ensure that you have Python 3 installed on your system.
- Clone the project repository from GitHub.
- Navigate to the project directory.
- Run "pip install -r requirements.txt" in the root directory to install all the dependencies.
- Create a .env file with the following format (all Twitter information):
- TW_EMAIL=
- TW_USERNAME=
- TW_PASSWORD=
- Once the dependencies are installed successfully and the .env file is created, you are ready to use the project by running "Python3 MarketPredictor.py" in the root directory and following the prompts. [HINT: Use AAPL as the first ticker for testing]
- /MarketPredictionModel
- The TensorFlow model, was created and uploaded so people don't need to train their own with my data.
- /analyzed
- The tweets with sentiment values already attached to them.
- /finances
- The financial data that YFinanace provides us.
- /scraped
- The raw tweets scraped straight from Twitter.
- /scripts
- FinanaceScraper.py
- This is the script that requests data from YFinance.
- SentimentAnalyzer.py
- This is the script that analyzes the sentiment of the Twitter data.
- TweetScraper.py
- This is the script that scrapes tweets off of Twitter.
- FinanaceScraper.py
- /training
- MarketTrainer.py
- This is the script that created, and saves the model; it grabs the existing data in the training folder and also request from YFinanace.
- MarketTrainer.py
- MarketPredictor.py
- This is the main drivers of the predictor, this should be the file you call.
- Tweet Dataset:
- Stock Information Dataset:
- Grabbed using YFinance for the maximal date range of the Kaggle dataset.
