- Scrapes titles of news articles for a selected list of stocks
- Conduct sentiment analysis on scraped news headlines using Google Cloud Natural Language API
- Generate a report and a graph of the analyzed stocks
Use the package manager pip to install dependencies
pip install beautifulsoup4
pip install fake-useragent
pip install matplotlib
pip install numpy
pip install python-dotenv
pip install requests
Setup the Natural Language API on your local device by following the Google's quickstart guide
Set ADMIN_JSON_PATH variable in NL_Analysis.py to be the path to Cloud Authentication JSON file
- Run NL_Analysis.py
- Enter path to the txt file containing a list of ticker symbols to analyze, through console input
- Enter the time window to scrape news headlines from, through console input
- A csv file and a graph will be generated in the outputs folder
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.