Analyzing Twitter Sentiment on Stock Using the Bidirectional Encoder Representations (BERT) Based on the Transformer Model

This study explores sentiment analysis on Indonesian social media data related to stock investments, focused on GOTO stocks. Using the Knowledge Discovery in Database (KDD) methodology, data was collected from the social media platform X (formerly Twitter) during the period from January 2023 to December 2024, preprocessed, and manually labeled into positive, neutral, and negative categories. A deep learning model, Bidirectional Encoder Representations from Transformers (BERT), was employed to analyze the data. The model demonstrated strong performance, achieving a weighted average precision, recall, and F1-score of 0.95 on the test set, with precision scores of 0.99 for positive sentiments and recall scores of 0.97 for neutral sentiments. However, the F1-score for negative sentiments was comparatively lower at 0.87, indicating an area for improvement. These results highlight the effectiveness of sentiment analysis for monitoring stock market trends and public opinion. However, the study is limited by its reliance on data from a single platform (Twitter) and the relatively small dataset size. Future research should incorporate data from multiple platforms, such as Instagram and Facebook, and explore alternative models alongside BERT to enhance performance and generalizability.

Authors

Institutions

Publication Details

Published
2025-02-19
DOI
https://doi.org/10.1109/it64745.2025.10930290
Citations
2
Primary Topic
Sentiment Analysis and Opinion Mining
Type
article
Field-Weighted Citation Impact
4.96
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Analyzing Twitter Sentiment on Stock Using the Bidirectional Encoder Representations (BERT) Based on the Transformer Model

Ratu Ayu Asih Kusuma Putri, Tanty Oktavia
2 citations
Sentiment Analysis and Opinion Mining
4.96
article

Analyzing Twitter Sentiment on Stock Using the Bidirectional Encoder Representations (BERT) Based on the Transformer Model

Ratu Ayu Asih Kusuma Putri, Tanty Oktavia
article en
2 citations

Abstract

This study explores sentiment analysis on Indonesian social media data related to stock investments, focused on GOTO stocks. Using the Knowledge Discovery in Database (KDD) methodology, data was collected from the social media platform X (formerly Twitter) during the period from January 2023 to December 2024, preprocessed, and manually labeled into positive, neutral, and negative categories. A deep learning model, Bidirectional Encoder Representations from Transformers (BERT), was employed to analyze the data. The model demonstrated strong performance, achieving a weighted average precision, recall, and F1-score of 0.95 on the test set, with precision scores of 0.99 for positive sentiments and recall scores of 0.97 for neutral sentiments. However, the F1-score for negative sentiments was comparatively lower at 0.87, indicating an area for improvement. These results highlight the effectiveness of sentiment analysis for monitoring stock market trends and public opinion. However, the study is limited by its reliance on data from a single platform (Twitter) and the relatively small dataset size. Future research should incorporate data from multiple platforms, such as Instagram and Facebook, and explore alternative models alongside BERT to enhance performance and generalizability.

Binus University (ID)
Reduced inequalities
Openalex Percentile: Top 6%
Sentiment Analysis and Opinion Mining
4.96
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.