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
- Ratu Ayu Asih Kusuma Putri (ORCID: https://orcid.org/0000-0003-0911-0735)
- Tanty Oktavia (ORCID: https://orcid.org/0000-0001-6453-9775)
Institutions
- Binus University (ID)
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