Science and Education Publishing
From Scientific Research to Knowledge
Submission
Browse by Subjects
Search
Journal Home
For Authors
Online Submission
Current Issue
Archive
About Us
Figures index
From
Predicting Stock Investments Based on Sentiment and Historical Price Data
I. O. Olawale, J. Iworiso, I. A. Amaunam
International Journal of Data Envelopment Analysis and *Operations Research*
.
2023
, 4(1), 1-32
Figure
1
.
Illustration of the SVM principle and of the one-versus-one multiclass classification method (https://www.researchgate.net/figure/Illustration-of-the-SVM-principle-and-of-the-one-versus-one-multiclass-classification_fig2_220098164)
Full size figure and legend
Figure
2
.
Bidirectional lstm model showing the input and output layers (https://www.researchgate.net/figure/Bidirectional-LSTM-model-showing-the-input-and-output-layers-The-red-arrows-represent_fig3_344554659)
Full size figure and legend
Figure
3
.
A transformer model architecture (https://machinelearningmastery.com/the-transformer-model/)
Full size figure and legend
Figure
4
.
The bert model architecture (https://notebook.community/zhreshold/mxnet/contrib/clojure-package/examples/bert/fine-tune-bert)
Full size figure and legend
Figure
5
.
Coca-Cola stock tweet DataFrame.
Full size figure and legend
Figure
6
.
Number of coca-cola tweets over time.
Full size figure and legend
Figure
7
.
Tweet frequency by hour and day of the week
Full size figure and legend
Figure
8
.
Correlation heatmap of numerical columns
Full size figure and legend
Figure
9
.
Top Users by Tweet Count
Full size figure and legend
Figure
10
.
Top words in tweet
Full size figure and legend
Figure
11
.
Scatter plot of retweets and favorites
Full size figure and legend
Figure
12
.
Distribution of token counts within tweets
Full size figure and legend
Figure
13
.
Word cloud plot of coca-cola tweet
Full size figure and legend
Figure 14
.
Distribution of Tweet Lengths
Full size figure and legend
Figure 15.
Text Preprocessing steps
Full size figure and legend
Figure
16
.
Missing values in data
Full size figure and legend
Figure
17
.
Cleaning of the datetime column
Full size figure and legend
Figure
18
.
Cleaning of the tweet id column
Full size figure and legend
Figure
1
9
.
Cleaning of the text column
Full size figure and legend
Figure
20
.
Cleaning of the Username column
Full size figure and legend
Figure
21
.
Cleaning of the Ticker column
Full size figure and legend
Figure
2
2
.
Cleaning of the favourite’s column
Full size figure and legend
Figure
2
3
.
Cleaning of the retweet’s column.
Full size figure and legend
Figure
2
4
.
Cleaning of the Followers column
Full size figure and legend
Figure
2
5
.
Cleaning of the following column
Full size figure and legend
Figure
2
6
.
Cleaning of the Is_RT column.
Full size figure and legend
Figure
2
7
.
Sentiment class Distribution of coca-cola stock tweet.
Full size figure and legend
Figure 2
8
.
Train test validation split
Full size figure and legend
Figure 2
9
.
Confusion matrix for multi-class classifier (https://geekflare.com/confusion-matrix-in-machine-learning/)
Full size figure and legend
Figure
30
.
A multiclass roc curve (https://www.analyticsvidhya.com/blog/2020/06/auc-roc-curve-machine-learning/)
Full size figure and legend
Figure
31
.
The creation of the tfidfvectorizer for the SVM model
Full size figure and legend
Figure
32
.
Initializing the class weight to handle class imbalance for the Svm model.
Full size figure and legend
Figure
33
.
SVM model showing the predicted sentiment on test set.
Full size figure and legend
Figure
3
4
.
The PyTorch class defining the RNN model layers.
Full size figure and legend
Figure
3
5
.
Preparing the necessary data structures to use pre-trained GloVe word embeddings in the rnn model.
Full size figure and legend
Figure
3
6
.
Initializing the class weights, Loss function and optimizer for the Svm model.
Full size figure and legend
Figure
3
7
.
RNN model showing the predicted sentiment on test set.
Full size figure and legend
Figure
3
8
.
The PyTorch class defining the BERT Model classifier.
Full size figure and legend
Figure
3
9
.
Function to preprocess the BERT classifier.
Full size figure and legend
Figure
40
.
Defining the hyperparameter, optimizer, scheduler, and loss function for the BERT model.
Full size figure and legend
Figure
41
.
BERT model showing the predicted sentiment on test set.
Full size figure and legend
Figure
42
.
SVM Model Result Output.
Full size figure and legend
Figure
4
3
.
SVM Model Confusion Matrix
Full size figure and legend
Figure
4
4
.
SVM Model Classification Report
Full size figure and legend
Figure
4
5
.
SVM Model Multi Class ROC Curve
Full size figure and legend
Figure
4
6
.
RNN Model Epoch Output
Full size figure and legend
Figure
4
7
.
Rnn Model Confusion Matrix
Full size figure and legend
Figure
4
8
.
RNN Model Classification Report
Full size figure and legend
Figure
4
9
.
RNN Model Loss Plot
Full size figure and legend
Figure
50
.
RNN Model Accuracy Plot
Full size figure and legend
Figure
51
.
RNN Model Multi Class ROC Curve
Full size figure and legend
Figure
52
.
BERT Model Epoch Output
Full size figure and legend
Figure
5
3
.
BERT Model Confusion Matrix
Full size figure and legend
Figure
5
4
.
BERT Model Classification Report
Full size figure and legend
Figure
5
5
.
BERT Model Loss Plot
Full size figure and legend
Figure
5
6
.
BERT Model Accuracy Plot
Full size figure and legend
Figure
5
7
.
BERT Model Multi Class ROC Curve
Full size figure and legend
Figure
5
8
.
Training and Testing Time Comparison Plot
Full size figure and legend
Figure
5
9
.
Training, Testing and Validation Loss Comparison Plot
Full size figure and legend
Figure
60
.
Precision, Recall and F1 Score Comparison Plot
Full size figure and legend
Figure
61
.
Test and Validation Accuracy Comparison Plot
Full size figure and legend
Figure
62
.
Output of the Sentiment Classified Ten Stocks
Full size figure and legend
Figure
6
3
.
Determining Follower’s and Retweet’s Mean and Standard Deviation
Full size figure and legend
Figure
6
4
.
Combined Stock Input
Full size figure and legend
Figure
6
5
.
DataFrame of the Combined Stock Input
Full size figure and legend
F
igure
6
6
.
showing the dataset, stock sentiment and the combined stock input for all ten stocks.
Full size figure and legend
Figure
6
7
.
Investment Strategies using Random Forest Classifier
Full size figure and legend
Figure
6
8
.
Investment Strategies using XGBoost Classifier
Full size figure and legend