TY - UNPB
T1 - Innovative Sentiment Analysis and Prediction of Stock Price Using FinBERT, GPT-4, and Logistic Regression
T2 - A Data- Driven Approach
AU - Shobayo, Olamilekan
AU - Adeyemi-Longe , Sidikat
AU - Popoola, Olusogo
AU - Ogunleye, Bayode
PY - 2024/9/13
Y1 - 2024/9/13
N2 - This study explores the comparative performance of FinBERT, GPT-4, and Logistic Regression for sentiment analysis and stock index prediction using the NGX All-Share Index dataset. By leveraging advanced language models like GPT-4 and FinBERT, alongside a traditional machine learning model, Logistic Regression, we aim to classify market sentiment, generate sentiment score, and predict market pricemovements. The models were assessed using metrics such as accuracy, precision, recall, F1 score, and ROCAUC. Results indicate that Logistic Regression outperformed both FinBERT and GPT-4, with an accuracy of81.83% and a ROC AUC of 89.76%. GPT-4 predefined approach exhibited a lower accuracy of 54.19% but demonstrated strong potential in handling complex data. FinBERT, while offering more sophisticated analysis, was computationally demanding and yielded a moderate performance. Hyperparameter optimization using Optuna and cross-validation techniques ensured the robustness of the models. This study highlights the strengths and limitations of these approaches in stock market prediction and presents Logistic Regression as the most efficient model for this task, with FinBERT and GPT-4 showing promise for future exploration.
AB - This study explores the comparative performance of FinBERT, GPT-4, and Logistic Regression for sentiment analysis and stock index prediction using the NGX All-Share Index dataset. By leveraging advanced language models like GPT-4 and FinBERT, alongside a traditional machine learning model, Logistic Regression, we aim to classify market sentiment, generate sentiment score, and predict market pricemovements. The models were assessed using metrics such as accuracy, precision, recall, F1 score, and ROCAUC. Results indicate that Logistic Regression outperformed both FinBERT and GPT-4, with an accuracy of81.83% and a ROC AUC of 89.76%. GPT-4 predefined approach exhibited a lower accuracy of 54.19% but demonstrated strong potential in handling complex data. FinBERT, while offering more sophisticated analysis, was computationally demanding and yielded a moderate performance. Hyperparameter optimization using Optuna and cross-validation techniques ensured the robustness of the models. This study highlights the strengths and limitations of these approaches in stock market prediction and presents Logistic Regression as the most efficient model for this task, with FinBERT and GPT-4 showing promise for future exploration.
KW - FinBERT model
KW - logistic regression
KW - FinBERT
KW - Optuna
KW - timeseries cross validation
U2 - 10.20944/preprints202409.1089.v1
DO - 10.20944/preprints202409.1089.v1
M3 - Preprint
BT - Innovative Sentiment Analysis and Prediction of Stock Price Using FinBERT, GPT-4, and Logistic Regression
ER -