PyTorch, BeautifulSoup4, yfinance, FLASK
This is my stock dashboard, where with the input of stock ticker(s) of interest, a user will get access to a full wealth of formatted and calculated data of which to make decisions about the stock(s).
A user will also get access to sentiment analysis of recent (<3 Days Old) news about their stock of choice, which can be used to make more decisions about their respective stocks
Using the Financial Modeling Prep API and yfinance, I gather stock data from their balance sheets, income statements, company ratios, and Yahoo! Finance stock history to compile relevant information (current list of available data: Two-week history, EBITDA, Current ratio, Earnings per Share, Return on Assets, Return on Equity, Debt-to-Equity Ratio, Operating Cash Flow, Dividend Yield).
Then, using BeautifulSoup4, I scrape Yahoo! Finance news about respective stocks, and using a pretrained sentiment analysis neural network called distilbert, assign those news headlines a positive or negative label as well as a score, and calculate relevant information. I also use a pretrained model called Pegasus to regenerate the extreme-end headlines for possible further clarity (current list of available information: Headline Sentiment, Most Positive Headline, Most Positive Score, AI Positive Headline Regeneration, Most Negative Headline, Most Negative Score, AI Negative Headline Regeneration).
The licence can be found in LICENSE. This can only be hosted locally through running app_run. To run this locally on your machine, you'll need to provide a FLASK secret key to the config, as well as an API key generated by signing up for Financial Modeling Prep API (linked above) in utils. Mine are currently environmental variables.
All provided files are necessary to run this.
Future work includes providing more data, as well as the website improvements. Any questions or suggestions should be emailed to [email protected].
Sample Images for Veeva Systems (VEEV) Data and Sentiment (29/04/23)