Machine Learning vs. Human Investors: Analyzing Adaptive Herding Behaviour in U.S. Stocks vs. Shariah-Compliant Stocks in Malaysia and Indonesia

Keywords: Machine Learning, Adaptive Herding, Market Sentiment, Financial Stability, Stock Returns

Abstract

This study examined the effectiveness of machine learning models in capturing adaptive herding behaviour in the US, Malaysia, and Indonesia. Utilising data from January 2010 to December 2023, the study incorporates market sentiment (Thomson Reuters MarketPsych Indices), news sentiment (Bloomberg Sentiment Analysis), and investor happiness measures (Hedonometer). The methodology employs both static and adaptive herding analyses using the CSAD approach, enhanced by real-time sentiment analysis and various machine learning models, including single- and multi-layer neural networks. The results indicate significant differences in herding behaviour across the three markets, with machine learning models demonstrating superior performance in capturing herding behaviour and faster normalisation after major macroeconomic events than traditional methods. These findings highlight the potential of machine learning models to challenge the static assumptions of the Efficient Market Hypothesis and provide insights for designing better trading algorithms by considering the impact of market sentiment, news sentiment, and investor happiness.

Author Biographies

Ooi Kok Loang, Universiti Malaya

Ooi, Kok Loang is a Senior Lecturer at the Faculty of Business and Economics, Universiti Malaya. He earned his Doctor of Philosophy (PhD) in Finance in 2022 from Universiti Sains Malaysia (USM), a Master of Arts in Law in 2019 from USM, and subsequently obtained his Master of Laws (LLM) in 2023 from the International Islamic University Malaysia (IIUM).

His research interests include behavioral finance, financial economics, ESG investing, fintech innovation, and capital market development in Asia. He has published in leading academic journals such as Finance Research Letters, International Journal of Islamic and Middle Eastern Finance and Management, Singapore Economic Review, Journal of Applied Economics, and China Finance Review International.

Author’s contact detail: Address: Faculty of Business and Economics, Universiti Malaya 50603, Kuala Lumpur, Malaysia; phone number: - ; Email: markooi@um.edu.my

Sevenpri Candra, Universitas Bina Nusantara

Candra, Sevenpri is a Professor of Management at BINUS Business School, BINUS University. He earned his Doctoral degree in Business Management from BINUS University, Master of Management in General Management from BINUS University, Bachelor’s in Computer Science from BINUS University, Bachelor’s in Economics/ Management from Open University and Professional Engineer from Gadjah Mada University & and ASEAN Federation of Engineering Organisations.

Prior to joining BINUS University, he has more than 7 years professional career in Consulting Business that give a credence as a Manager and IT Consulting as well as his speciality. And these moments, he serves as Deputy Campus Director for Academic & Student Development at BINUS University @Bekasi Campus. He also active as a Reviewer for several prominent journals & conferences and published in leading academic journals. His research interest area is in Digital Business Man- agement.

Author’s contact detail: Address: BINUS Univesity @Bekasi Campus, Summarecon Bekasi, 17142, Kota Bekasi, Jawa Barat, Indonesia; phone number: - ; Email: seven@binus.ac.id

References

Amanda, C., & Pradipta, A. D. (2024). Risk-Based Premiums of Insurance Guarantee Schemes: A Machine-Learning Approach. Journal of Indonesian Economy and Business, 39(2), Article 2. https://doi.org/10.22146/jieb.v39i2.9323

Athota, V. S., Hasan, Z., Vaz, D., Désiré, S. S. M., & Pereira, V. (2023). Can Artificial Intelligence (AI) Manage Behavioral Biases Among Financial Planners? J. Glob. Inf. Manage., 31(2), 1–18. https://doi.org/10.4018/JGIM.321728

Baker, M., & Wurgler, J. (2007). Investor Sentiment in the Stock Market. Journal of Economic Perspectives, 21(2), 129–152. https://doi.org/10.1257/jep.21.2.129

Barberis, N., & Thaler, R. (2003). Chapter 18 A survey of behavioral finance. In Handbook of the Economics of Finance (Vol. 1, pp. 1053–1128). Elsevier. https://doi.org/10.1016/S1574-0102(03)01027-6

Bihari, A., Dash, M., Muduli, K., Kumar, A., Mulat-Weldemeskel, E., & Luthra, S. (2023). Does cognitive biased knowledge influence investor decisions? An empirical investigation using machine learning and artificial neural network. VINE Journal of Information and Knowledge Management Systems, ahead-of-print(ahead-of-print). https://doi.org/10.1108/VJIKMS-08-2022-0253

Bikhchandani, S., Hirshleifer, D., & Welch, I. (1992). A Theory of Fads, Fashion, Custom, and Cultural Change as Informational Cascades. Journal of Political Economy, 100(5), 992–1026. https://doi.org/10.1086/261849

Bollen, J., Mao, H., & Zeng, X. (2011). Twitter mood predicts the stock market. Journal of Computational Science, 2(1), 1–8. https://doi.org/10.1016/j.jocs.2010.12.007

Bouri, E., Gupta, R., & Roubaud, D. (2019). Herding behavior in cryptocurrencies. Finance Research Letters, 29, 216–221. https://doi.org/10.1016/j.frl.2018.07.008

Chang, E. C., Cheng, J. W., & Khorana, A. (2000). An examination of herd behavior in equity markets: An international perspective. Journal of Banking & Finance, 24(10), 1651–1679. https://doi.org/10.1016/S0378-4266(99)00096-5

Chiang, T. C., & Zheng, D. (2010). An empirical analysis of herd behavior in global stock markets. Journal of Banking & Finance, 34(8), 1911–1921. https://doi.org/10.1016/j.jbankfin.2009.12.014

Choi, J., & Park, H. J. (2023). Financial Distress and Audit Report Lags: An Empirical Study in Korea. Gadjah Mada International Journal of Business, 25(3), Article 3. https://doi.org/10.22146/gamaijb.72251

Da, Z., Engelberg, J., & Gao, P. (2015). The Sum of All FEARS Investor Sentiment and Asset Prices. The Review of Financial Studies, 28(1), 1–32. https://doi.org/10.1093/rfs/hhu072

Dodds, P. S., Harris, K. D., Kloumann, I. M., Bliss, C. A., & Danforth, C. M. (2011). Temporal Patterns of Happiness and Information in a Global Social Network: Hedonometrics and Twitter. PLOS ONE, 6(12), e26752. https://doi.org/10.1371/journal.pone.0026752

Engelberg, J. E., & Parsons, C. A. (2011). The Causal Impact of Media in Financial Markets. The Journal of Finance, 66(1), 67–97. https://doi.org/10.1111/j.1540-6261.2010.01626.x

Fama, E. F. (1970). Efficient Capital Markets: A Review of Theory and Empirical Work. The Journal of Finance, 25(2), 383–417. https://doi.org/10.2307/2325486

Feng, G., Giglio, S., & Xiu, D. (2019). Taming the Factor Zoo: A Test of New Factors (SSRN Scholarly Paper No. 2934020). https://doi.org/10.2139/ssrn.2934020

Fischer, T., & Krauss, C. (2018). Deep learning with long short-term memory networks for financial market predictions. European Journal of Operational Research, 270(2), 654–669. https://doi.org/10.1016/j.ejor.2017.11.054

Gao, Y., Zhao, C., & Wang, Y. (2024). Investor sentiment and stock returns: New evidence from Chinese carbon-neutral stock markets based on multi-source data. International Review of Economics & Finance, 92, 438–450. https://doi.org/10.1016/j.iref.2024.02.049

Goodell, J. W. (2020). COVID-19 and finance: Agendas for future research. Finance Research Letters, 35, 101512. https://doi.org/10.1016/j.frl.2020.101512

Gopal, S., & Loang, O. K. (2024). The Rationality Conundrum: Exploring Herd Mentality among Individual Investors in the Indian Stock Market. Indian Journal of Finance, 18(6), Article 6. https://doi.org/10.17010/ijf/2024/v18i6/173967

Gu, S., Kelly, B., & Xiu, D. (2020). Empirical Asset Pricing via Machine Learning. The Review of Financial Studies, 33(5), 2223–2273. https://doi.org/10.1093/rfs/hhaa009

Henrique, B. M., Sobreiro, V. A., & Kimura, H. (2019). Literature review: Machine learning techniques applied to financial market prediction. Expert Systems with Applications, 124, 226–251. https://doi.org/10.1016/j.eswa.2019.01.012

Hu, J., Sui, Y., & Ma, F. (2021). The Measurement Method of Investor Sentiment and Its Relationship with Stock Market. Computational Intelligence and Neuroscience, 2021(1), 6672677. https://doi.org/10.1155/2021/6672677

Hwang, S., & Salmon, M. (2004). Market stress and herding. Journal of Empirical Finance, 11(4), 585–616. https://doi.org/10.1016/j.jempfin.2004.04.003

Kliegr, T., Bahník, Š., & Fürnkranz, J. (2021). A review of possible effects of cognitive biases on interpretation of rule-based machine learning models. Artificial Intelligence, 295, 103458. https://doi.org/10.1016/j.artint.2021.103458

Krauss, C., Do, X. A., & Huck, N. (2017). Deep neural networks, gradient-boosted trees, random forests: Statistical arbitrage on the S&P 500. European Journal of Operational Research, 259(2), 689–702. https://doi.org/10.1016/j.ejor.2016.10.031

Kumbure, M. M., Lohrmann, C., Luukka, P., & Porras, J. (2022). Machine learning techniques and data for stock market forecasting: A literature review. Expert Systems with Applications, 197, 116659. https://doi.org/10.1016/j.eswa.2022.116659

Lo, A. W. (2004). The Adaptive Markets Hypothesis. The Journal of Portfolio Management, 30(5), 15–29. https://doi.org/10.3905/jpm.2004.442611

Mahadwartha, P. A., Ismiyanti, F., & Zunairoh, Z. (2023). The Gambler’s Fallacy, the Halo Effect, and the Familiarity Effect Based on Risk Profile: Bullish and Bearish Market in Indonesia Stock Exchange. Gadjah Mada International Journal of Business, 25(2), Article 2. https://doi.org/10.22146/gamaijb.64801

Mnif, E., Jarboui, A., & Mouakhar, K. (2020). How the cryptocurrency market has performed during COVID 19? A multifractal analysis. Finance Research Letters, 36, 101647. https://doi.org/10.1016/j.frl.2020.101647

Nguyen, Y. V. B., & Vo, A. H. K. (2023). Herding behavior before and after COVID-19 pandemic: Evidence from the Vietnam stock market. Journal of Economic Studies, 51(2), 357–374.

Noda, A. (2016). A test of the adaptive market hypothesis using a time-varying AR model in Japan. Finance Research Letters, 17, 66–71. https://doi.org/10.1016/j.frl.2016.01.004

Nugroho, R., & Pratiwi, N. R. (2023). Revisiting Islamic Leadership: Clarifying Theoretical Issues. Journal of Leadership in Organizations, 5(2), Article 2. https://doi.org/10.22146/jlo.78412

Oliveira, N., Cortez, P., & Areal, N. (2016). Stock market sentiment lexicon acquisition using microblogging data and statistical measures. Decision Support Systems, 85, 62–73. https://doi.org/10.1016/j.dss.2016.02.013

Omane-Adjepong, M., Paul Alagidede, I., Lyimo, A. G., & Tweneboah, G. (2021). Herding behavior in cryptocurrency and emerging financial markets. Cogent Economics & Finance, 9(1), 1933681. https://doi.org/10.1080/23322039.2021.1933681

Schmeling, M. (2009). Investor sentiment and stock returns: Some international evidence. Journal of Empirical Finance, 16(3), 394–408. https://doi.org/10.1016/j.jempfin.2009.01.002

Soni, P., Tewari, Y., & Krishnan, D. (2022). Machine Learning Approaches in Stock Price Prediction: A Systematic Review. Journal of Physics: Conference Series, 2161(1), 012065. https://doi.org/10.1088/1742-6596/2161/1/012065

Tetlock, P. C. (2007). Giving Content to Investor Sentiment: The Role of Media in the Stock Market. The Journal of Finance, 62(3), 1139–1168. https://doi.org/10.1111/j.1540-6261.2007.01232.x

Urquhart, A., & McGroarty, F. (2016). Are stock markets really efficient? Evidence of the adaptive market hypothesis. International Review of Financial Analysis, 47, 39–49. https://doi.org/10.1016/j.irfa.2016.06.011

Youssef, M., & Waked, S. S. (2022). Herding behavior in the cryptocurrency market during COVID-19 pandemic: The role of media coverage. The North American Journal of Economics and Finance, 62, 101752. https://doi.org/10.1016/j.najef.2022.101752

Zhang, X., Fuehres, H., & Gloor, P. A. (2011). Predicting Stock Market Indicators Through Twitter “I hope it is not as bad as I fear.” Procedia - Social and Behavioral Sciences, 26, 55–62. https://doi.org/10.1016/j.sbspro.2011.10.562

Published
2025-09-01
How to Cite
Loang, O. K., & Candra, S. (2025). Machine Learning vs. Human Investors: Analyzing Adaptive Herding Behaviour in U.S. Stocks vs. Shariah-Compliant Stocks in Malaysia and Indonesia. Gadjah Mada International Journal of Business, 27(3), 297-319. https://doi.org/10.22146/gamaijb.v27i3.16112