Table of Contents
This is a Streamlit deployed Web Application, used to analyze and compare stocks. Mass psychology's effects may be one of the factors driving the market. We can measure and use to predict market movement with surprising accuracy levels. We used the the social media and news contents for scrapping real-time information.
A list of commonly used resources that I find helpful are listed in the literature references.
This section should list any major frameworks that we built our project using. Leave any add-ons/plugins for the acknowledgements section. Here are a few examples.
We have used a pre-trained sentiment analysis model from the flair(DistilBERT Model) library. This model splits the text into character-level tokens and uses the DistilBERT model to make predictions of words, that the network has never seen before can assign it a sentiment.
DistilBERT is a distilled version of the powerful BERT transformer model — which in-short means — it is a ‘small’ model (only 66 million parameters), and is still super powerful. We have used the flair model for calculating the Prediction Score. Prediction Score is a measure of how well the stock gone to be performing on the basis of past hour tweets.
We are also comapring the input stock performance with two competitor stocks on a NLTK trained sentiment analysis model and parses the FinViz stock screener for past one week news headlines.
-
Installing PyTorch on Windows
conda install pytorch torchvision torchaudio cudatoolkit=10.2 -c pytorch
Installing PyTorch on Linux
conda install pytorch torchvision torchaudio cudatoolkit=10.2 -c pytorch
Installing PyTorch on Mac
conda install pytorch torchvision torchaudio -c pytorch
MacOS Binaries dont support CUDA, install from source if CUDA is needed
-
Installing Streamlit
pip install streamlit
-
Installing Flair
pip install flair
-
Installing packages from requirements.txt
-
Cloning the Repo
git clone https://github.com/ssjky6/Stocks-Sentiment-Analyzer.git
-
Running the Application
streamlit run app.py
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated 😍.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
- Twitter Sentiment Analysis. Available from: https://www.researchgate.net/publication/352780855_Twitter_Sentiment_Analysis.
- Twitter Developer Docs. Available from: https://developer.twitter.com/en/docs.
- FLAIR: An Easy-to-Use Framework for State-of-the-Art NLP. Available from: https://aclanthology.org/N19-4010/.
- Multilingual Twitter Sentiment Classification: The Role of Human Annotators. Available from: https://arxiv.org/pdf/1602.07563v2.pdf.