sudhanvasp commited on
Commit
8aa1124
·
1 Parent(s): 94c72b4

Upload 6 files

Browse files
Files changed (6) hide show
  1. Media/1.jpeg +0 -0
  2. Media/2.jpeg +0 -0
  3. Media/3.png +0 -0
  4. Media/4.png +0 -0
  5. Media/5.png +0 -0
  6. README.md +114 -2
Media/1.jpeg ADDED
Media/2.jpeg ADDED
Media/3.png ADDED
Media/4.png ADDED
Media/5.png ADDED
README.md CHANGED
@@ -1,3 +1,115 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
- license: afl-3.0
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # SentimentAnalysis
2
+ Sentiment analysis with NLTK (Folder 79)
3
+ Sentiment analysis with Roberta (Folder 159)
4
+ Sentiment analysis with Roberta+Awk (Folder 209)
5
+ Sentiment analysis with Roberta+Gradio (Folder 219)
6
+
7
+ <!-- MARKER: Start of README -->
8
+
9
+ # Stock Sentiment Analysis of Tweets using RoBERTa
10
+
11
+
12
+ ![Feature 1 Screenshot](Media/1.jpeg)
13
+ ![Feature 1 Screenshot](Media/2.jpeg)
14
+ ![Feature 1 Screenshot](Media/3.png)
15
+ ![Feature 1 Screenshot](Media/4.png)
16
+ ![Feature 1 Screenshot](Media/5.png)
17
+
18
+ ## Table of Contents
19
+
20
+ - [Project Description](#project-description)
21
+ - [Objective](#objective)
22
+ - [Hypotheses](#hypotheses)
23
+ - [Data Collection](#data-collection)
24
+ - [Sentiment Analysis](#sentiment-analysis)
25
+ - [Machine Learning Model](#machine-learning-model)
26
+ - [Running the Model](#running-the-model)
27
+ - [Huggingface](https://huggingface.co/sudhanvasp/Sentiment-Analysis)
28
+ - [Results and Insights](#results-and-insights)
29
+ - [License](#license)
30
+
31
  ---
32
+
33
+ <!-- MARKER: Project Description -->
34
+
35
+ ## Project Description
36
+
37
+ 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.
38
+
39
+ <!-- MARKER: Objective -->
40
+
41
+ ## Objective
42
+
43
+ The primary aim of this project is to explore the intricate relationship between sentiment expressed in tweets and short-term stock price movements.
44
+
45
+ <!-- MARKER: Hypotheses -->
46
+
47
+ ## Hypotheses
48
+
49
+ - *Hypothesis 1:* Tweets with a positive sentiment will exhibit a positive correlation with stock price increases.
50
+ - *Hypothesis 2:* Tweets with a negative sentiment will display a negative correlation with stock price decreases.
51
+ - *Hypothesis 3:* Tweets with a neutral sentiment will display a neutral correlation with stock price.
52
+
53
+ <!-- MARKER: Data Collection -->
54
+
55
+ ## Data Collection
56
+
57
+ - We meticulously gathered Twitter data from financial news and analyst accounts.
58
+ - Data preprocessing was performed, encompassing deduplication, tokenization, and sentiment label encoding (positive, negative, neutral).
59
+
60
+ <!-- MARKER: Sentiment Analysis -->
61
+
62
+ ## Sentiment Analysis
63
+
64
+ - Harnessing RoBERTa, a state-of-the-art transformer-based model, we assigned sentiment scores.
65
+ - Challenges such as domain-specific sentiment expressions and model fine-tuning were addressed.
66
+
67
+ <!-- MARKER: Machine Learning Model -->
68
+
69
+ ## Machine Learning Model
70
+
71
+ - Our model is a robust ensemble of RoBERTa.
72
+ - Features encompass RoBERTa-generated F1 scores, tweet volume, and historical stock price data.
73
+ - This amalgamation empowers us to capture both sequential dependencies and non-linear relationships effectively.
74
+
75
+ <!-- MARKER: Running the Model -->
76
+
77
+ ## Running the Model
78
+
79
+ ## Hosting with Gradio
80
+
81
+ 1. *Install Gradio:*
82
+ ```bash
83
+ pip install gradio
84
+ import gradio as gr
85
+
86
+ 2. Run the given gradio code in the Folder 219.
87
+ ## Hosting with FLASK
88
+
89
+ 1. *Install FLASK:*
90
+ ```bash
91
+ pip install flask
92
+ cd 209
93
+ cd twitterka
94
+ python app.py
95
+
96
+ 2. Open the IP given address.
97
+ <!-- MARKER: Project Description -->
98
+
99
+ ## Huggingface Page
100
+ - Execution of the model can be done directly on Huggingface as well
101
+ - [Huggingface](https://huggingface.co/sudhanvasp/Sentiment-Analysis)
102
+
103
+
104
+ <!-- MARKER: Results and Insights-->
105
+
106
+ ## Results and Insights
107
+
108
+ - Our ensemble model boasts an impressive 96% accuracy in sentiment analysis.
109
+ - 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.
110
+
111
+
112
+ <!-- MARKER: License-->
113
+ ## License
114
+
115
+ - This created by the team "The Lost Pendrive" (Sudhanva SP, Deepa Umesh, Chinmayi Rajaram)