Bridging Behavioral Insights and Automated Trading: An Internet of Behaviors Approach for Enhanced Financial Decision-Making
Abstract
:1. Introduction
2. Literature Review
3. Materials and Methods
3.1. IoB Ecosystem Workflow and Methodology Description
3.2. Data Collection
3.3. BERT-Based Sentiment Analysis
3.4. Exploratory Data Analysis
3.5. Feature Engineering and Selection
3.6. Time-Series XAI
3.7. Model Design
3.8. Portfolio Management
Algorithm 1: Portfolio Management Algorithm |
4. Results and Discussion
5. Conclusions
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
References
- Kusuma, R.M.I.; Ho, T.-T.; Kao, W.-C.; Ou, Y.-Y.; Hua, K.-L. Using Deep Learning Neural Networks and Candlestick Chart Representation to Predict Stock Market. arXiv 2019, arXiv:1903.12258. [Google Scholar]
- Jain, R.; Vanzara, R. Emerging Trends in AI-Based Stock Market Prediction: A Comprehensive and Systematic Review. Eng. Proc. 2023, 56, 254. [Google Scholar] [CrossRef]
- Altuner, A.B.; Kilimci, Z.H. A Novel Deep Reinforcement Learning Based Stock Direction Prediction using Knowledge Graph and Community Aware Sentiments. Turk. J. Electr. Eng. Comput. Sci. 2021, 30, 1506–1524. [Google Scholar] [CrossRef]
- Wang, S.; Bai, Y.; Fu, K.; Wang, L.; Lu, C.-T.; Ji, T. ALERTA-Net: A Temporal Distance-Aware Recurrent Networks for Stock Movement and Volatility Prediction. In Proceedings of the International Conference on Advances in Social Networks Analysis and Mining, Kusadasi, Turkiye, 6–9 November 2023; ACM: New York, NY, USA, 2023; pp. 538–542. [Google Scholar] [CrossRef]
- Li, M.; Zhang, Y. Integrating Social Media Data and Historical Stock Prices for Predictive Analysis: A Reinforcement Learning Approach. Int. J. Adv. Comput. Sci. Appl. 2023, 14, 26. [Google Scholar] [CrossRef]
- Tarsi, M.; Douzi, S.; Marzak, A. Forecasting financial market dynamics: An in-depth analysis of social media data for predicting price movements in the next day. Soc. Netw. Anal. Min. 2024, 14, 169. [Google Scholar] [CrossRef]
- Moustati, I.; Gherabi, N.; Saadi, M. Building an IoB ecosystem for influencing energy consumption in smart cities. Data Metadata 2024, 3, 441. [Google Scholar] [CrossRef]
- Moustati, I.; Gherabi, N.; El Massari, H.; Saadi, M. From The Internet of Things (IoT) to The Internet of Behaviors (IoB) for Data Analysis. In Proceedings of the 2023 7th IEEE Congress on Information Science and Technology (CiSt), Essaouira, Morocco, 16–23 December 2023; IEEE: Piscataway, NJ, USA, 2023; pp. 634–639. [Google Scholar] [CrossRef]
- Moustati, I.; Gherabi, N.; Saadi, M. Leveraging the internet of behaviours and digital nudges for enhancing customers financial decision-making. Int. J. Comput. Appl. Technol. 2024, 74, 208–221. [Google Scholar] [CrossRef]
- Moustati, I.; Gherabi, N.; Saadi, M. Time-Series Forecasting Models for Smart Meters Data: An Empirical Comparison and Analysis. J. Eur. Des Systèmes Autom. 2024, 57, 1419–1427. [Google Scholar] [CrossRef]
- Černevičienė, J.; Kabašinskas, A. Explainable artificial intelligence (XAI) in finance: A systematic literature review. Artif. Intell. Rev. 2024, 57, 216. [Google Scholar] [CrossRef]
- Teti, E.; Dallocchio, M.; Aniasi, A. The relationship between twitter and stock prices. Evidence from the US technology industry. Technol. Forecast. Soc. Change 2019, 149, 119747. [Google Scholar] [CrossRef]
- Sezer, O.B.; Gudelek, M.U.; Ozbayoglu, A.M. Financial Time Series Forecasting with Deep Learning: A Systematic Literature Review: 2005–2019. Appl. Soft Comput. 2020, 90, 106181. [Google Scholar] [CrossRef]
- Mujhid, A.; Charisma, R.A.; Girsang, A.S. Comparative Algorithms for Stock Price Prediction Based on Market Sentiment Analysis. In Proceedings of the 2023 6th International Seminar on Research of Information Technology and Intelligent Systems (ISRITI), Batam, Indonesia, 11–12 December 2023; IEEE: Piscataway, NJ, USA, 2023; pp. 530–535. [Google Scholar] [CrossRef]
- Das, S.R.; Chen, M.Y. Yahoo! for Amazon: Sentiment Extraction from Small Talk on the Web. Manag. Sci. 2007, 53, 1375–1388. [Google Scholar] [CrossRef]
- De Choudhury, M.; Sundaram, H.; John, A.; Seligmann, D.D. Can blog communication dynamics be correlated with stock market activity? In Proceedings of the Nineteenth ACM Conference on Hypertext and Hypermedia, Pittsburgh, PA, USA, 19–21 June 2008; ACM: New York, NY, USA, 2008; pp. 55–60. [Google Scholar] [CrossRef]
- Xu, Y.; Cohen, S.B. Stock Movement Prediction from Tweets and Historical Prices. In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), Melbourne, Australia, 15–20 July 2018; Association for Computational Linguistics: Stroudsburg, PA, USA, 2018; pp. 1970–1979. [Google Scholar] [CrossRef]
- Long, S.; Lucey, B.; Xie, Y.; Yarovaya, L. ‘I just like the stock’: The role of Reddit sentiment in the GameStop share rally. Financ. Rev. 2023, 58, 19–37. [Google Scholar] [CrossRef]
- Anshul, M.; Arpit, G. Stock Prediction Using Twitter Sentiment Analysis. 2012. Available online: https://cs229.stanford.edu/proj2011/GoelMittal-StockMarketPredictionUsingTwitterSentimentAnalysis.pdf (accessed on 4 March 2025).
- Al-Amri, R.M.; Hadi, A.A.; Mousa, A.H.; Hasan, H.F.; Kadhim, M.S. The Development of a Deep Learning Model for Predicting Stock Prices. J. Adv. Res. Appl. Sci. Eng. Technol. 2023, 31, 208–219. [Google Scholar] [CrossRef]
- Chhajer, P.; Shah, M.; Kshirsagar, A. The applications of artificial neural networks, support vector machines, and long–short term memory for stock market prediction. Decis. Anal. J. 2022, 2, 100015. [Google Scholar] [CrossRef]
- Nabipour, M.; Nayyeri, P.; Jabani, H.; Mosavi, A.; Salwana, E.; S., S. Deep Learning for Stock Market Prediction. Entropy 2020, 22, 840. [Google Scholar] [CrossRef] [PubMed]
- Gupta, R.; Chen, M. Sentiment Analysis for Stock Price Prediction. In Proceedings of the 2020 IEEE Conference on Multimedia Information Processing and Retrieval (MIPR), Shenzhen, China, 6–8 August 2020; IEEE: Piscataway, NJ, USA, 2020; pp. 213–218. [Google Scholar] [CrossRef]
- Theissler, A.; Spinnato, F.; Schlegel, U.; Guidotti, R. Explainable AI for Time Series Classification: A Review, Taxonomy and Research Directions. IEEE Access 2022, 10, 100700–100724. [Google Scholar] [CrossRef]
- Schlegel, U.; Oelke, D.; Keim, D.A.; El-Assady, M. An Empirical Study of Explainable AI Techniques on Deep Learning Models for Time Series Tasks. arXiv 2020. [Google Scholar]
- Jakubiak, N. Analysis of Explainable Artificial Intelligence on Time Series Data. Master’s Thesis, Universitat Politècnica de Catalunya, Barcelona, Spain, 2022. [Google Scholar]
- Ccoya, W.; Pinto, E. Comparative Analysis of Libraries for the Sentimental Analysis. arXiv 2023, arXiv:2307.14311. [Google Scholar]
- Saha, S.; Showrov, M.I.H.; Rahman, M.M.; Majumder, M.Z.H. VADER vs. BERT: A Comparative Performance Analysis for Sentiment on Coronavirus Outbreak. In Proceedings of the International Conference on Machine Intelligence and Emerging Technologies, Noakhali, Bangladesh, 23–25 September 2022; pp. 371–385. [Google Scholar] [CrossRef]
Column | Description | |
---|---|---|
The tweets dataset | Date | Date and time of the tweet |
Tweet | Full text of the tweet | |
Stock name | Full stock ticker name for which the tweet was scraped | |
Company name | Full company name for corresponding tweet and stock ticker | |
The stock market dataset | Open | The opening price for the corresponding day |
High | The highest price for the corresponding day | |
Low | The lowest price for the corresponding day | |
Close | The closing price for the corresponding day | |
Adj close | The adjusted close price for the corresponding day | |
Volume | The volume for the corresponding day | |
Stock name | The stock name |
Date | Open | High | Low | Close | Adj Close | Volume | Stock Name | Sentiment Score |
---|---|---|---|---|---|---|---|---|
30 September 2021 | 260.3333 | 263.0433 | 258.3333 | 258.4933 | 258.4933 | 53,868,000 | TSLA | −0.124677 |
1 October 2021 | 259.4666 | 260.2600 | 254.5299 | 258.4066 | 258.4066 | 51,094,200 | TSLA | −0.057836 |
4 October 2021 | 265.5000 | 268.9899 | 258.7066 | 260.5100 | 260.5100 | 91,449,900 | TSLA | −0.113931 |
5 October 2021 | 261.6000 | 265.7699 | 258.0666 | 260.1966 | 260.1966 | 55,297,800 | TSLA | −0.106666 |
6 October 2021 | 258.7333 | 262.2200 | 257.7399 | 260.9166 | 260.9166 | 43,898,400 | TSLA | −0.023411 |
Parameter | Value | Description |
---|---|---|
Input Sequence Length | 20 | Number of timesteps per input sequence |
Input Dimension | 12 | Number of engineered features per timestep |
Hidden Dimension | 64 | Number of hidden units in each LSTM layer |
Number of LSTM Layers | 2 | Stacked LSTM layers for capturing complex dynamics |
Dropout Rate | 0.2 | Fraction of units to drop for regularization |
Output Dimension | 1 | Single-step prediction (future_returns_lag_7) |
Loss Function | MSE | Regression loss for forecasting |
Optimizer | Adam | Adaptive optimizer with learning rate 0.001 |
Number of Epochs | 100 | Training iterations |
Batch Size | 64 | Number of samples per gradient update |
Metric | Root Mean Squared Error (RMSE) | Mean Absolute Error (MAE) | Mean Squared Error (MSE) | Mean Absolute Percentage Error (MAPE) | Directional Accuracy |
---|---|---|---|---|---|
Reconstructed model | 0.0312 | 0.0250 | 0.0010 | 1.0238 | 95.24% |
Original model | 0.3759 | 0.3010 | 0.1413 | 1.1523 | 90.48% |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2025 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Moustati, I.; Gherabi, N. Bridging Behavioral Insights and Automated Trading: An Internet of Behaviors Approach for Enhanced Financial Decision-Making. Information 2025, 16, 338. https://doi.org/10.3390/info16050338
Moustati I, Gherabi N. Bridging Behavioral Insights and Automated Trading: An Internet of Behaviors Approach for Enhanced Financial Decision-Making. Information. 2025; 16(5):338. https://doi.org/10.3390/info16050338
Chicago/Turabian StyleMoustati, Imane, and Noreddine Gherabi. 2025. "Bridging Behavioral Insights and Automated Trading: An Internet of Behaviors Approach for Enhanced Financial Decision-Making" Information 16, no. 5: 338. https://doi.org/10.3390/info16050338
APA StyleMoustati, I., & Gherabi, N. (2025). Bridging Behavioral Insights and Automated Trading: An Internet of Behaviors Approach for Enhanced Financial Decision-Making. Information, 16(5), 338. https://doi.org/10.3390/info16050338