YAML Metadata
Warning:
empty or missing yaml metadata in repo card
(https://huggingface.co/docs/hub/model-cards#model-card-metadata)
SentimentAnalysis
Sentiment analysis with NLTK (Folder 79) Sentiment analysis with Roberta (Folder 159) Sentiment analysis with Roberta+Awk (Folder 209) Sentiment analysis with Roberta+Gradio (Folder 219)
Stock Sentiment Analysis of Tweets using RoBERTa
Table of Contents
- Project Description
- Objective
- Hypotheses
- Data Collection
- Sentiment Analysis
- Machine Learning Model
- Running the Model
- Huggingface
- Results and Insights
- License
Project Description
Welcome to the Stock Sentiment Analysis project! This repository houses the code and resources for analyzing Twitter data to predict stock price movements based on sentiment analysis, leveraging the powerful RoBERTa model. Gain valuable insights into market sentiment and enhance your trading strategies.
Objective
The primary aim of this project is to explore the intricate relationship between sentiment expressed in tweets and short-term stock price movements.
Hypotheses
- Hypothesis 1: Tweets with a positive sentiment will exhibit a positive correlation with stock price increases.
- Hypothesis 2: Tweets with a negative sentiment will display a negative correlation with stock price decreases.
- Hypothesis 3: Tweets with a neutral sentiment will display a neutral correlation with stock price.
Data Collection
- We meticulously gathered Twitter data from financial news and analyst accounts.
- Data preprocessing was performed, encompassing deduplication, tokenization, and sentiment label encoding (positive, negative, neutral).
Sentiment Analysis
- Harnessing RoBERTa, a state-of-the-art transformer-based model, we assigned sentiment scores.
- Challenges such as domain-specific sentiment expressions and model fine-tuning were addressed.
Machine Learning Model
- Our model is a robust ensemble of RoBERTa.
- Features encompass RoBERTa-generated F1 scores, tweet volume, and historical stock price data.
- This amalgamation empowers us to capture both sequential dependencies and non-linear relationships effectively.
Running the Model
Hosting with Gradio
Install Gradio:
pip install gradio import gradio as gr
Run the given gradio code in the Folder 219.
Hosting with FLASK
Install FLASK:
pip install flask cd 209 cd twitterka python app.py
Open the IP given address.
Huggingface Page
- Execution of the model can be done directly on Huggingface as well
- Huggingface
Results and Insights
- Our ensemble model boasts an impressive 96% accuracy in sentiment analysis.
- Notably, positive sentiment tweets correlate positively with stock price increases, while negative sentiment tweets correlate negatively with decreases. Neutral sentiment, while present, exhibits a weaker influence on stock price movements.
License
- This created by the team "The Lost Pendrive" (Sudhanva SP, Deepa Umesh, Chinmayi Rajaram)
- Downloads last month
- 10
This model does not have enough activity to be deployed to Inference API (serverless) yet. Increase its social
visibility and check back later, or deploy to Inference Endpoints (dedicated)
instead.