Machine learning and sentiment analysis in behavioural investing: Evidence from Poland
Okładka czasopisma Ruch Prawniczy, Ekonomiczny i Socjologiczny, tom 88, nr 1, rok 2026
PDF (English)

Słowa kluczowe

behavioural investing
sentiment analysis
machine learning
natural language processing
PolBERT
JEL: G40

Jak cytować

Kołodziejczyk, Łukasz. (2026). Machine learning and sentiment analysis in behavioural investing: Evidence from Poland. Ruch Prawniczy, Ekonomiczny I Socjologiczny, 88(1), 219–239. https://doi.org/10.14746/rpeis.2026.88.1.12

Liczba wyświetleń: 0


Liczba pobrań: 0

Abstrakt

The recent popularity of behavioural finance, combined with machine learning, offers an opportunity to challenge the duopoly of fundamental and technical analysis in stock selection. Behavioural analysis – an indirect method of stock evaluation based on the direct analysis of investor behaviour – offers a novel approach to investing. Its most popular instrument, sentiment analysis, has been shown to be useful in investing, although the relation between investor sentiment and stock prices is not yet clear, and behavioural investing is not well described in the literature. Moreover, there are only a few papers concerning investor sentiment in the Polish equity market, which creates a research gap, compared to other developed markets. The goal of this paper is to examine this relation and to test the efficacy of sentiment-based methods in behavioural investing. The relationship between investor sentiment and stock price movements was  examined using Matthews and Pearson correlation coefficients, and the efficacy of sentiment-based investment strategies was compared with the buy-and-hold approach. By leveraging threads from the Bankier. pl forum, this paper confirms a positive but modest correlation between investor sentiment and returns of WIG20 stocks, consistent with prior findings. While previous papers found low correlations and modest investment gains, this paper recognizes a statistically significant and stronger relationship between cumulative sentiment and cumulative returns (29.7%) compared to daily sentiment and fluctuations (5.4%, 2.7%, 3.0%). Moreover, this study tests behavioural methods in investment strategies, where sentiment-based trading outperformed the buy-and-hold approach in two-thirds of cases. The theoretical profitability is eliminated by including transaction costs, underscoring limited practical utility, and suggesting future research.

https://doi.org/10.14746/rpeis.2026.88.1.12
PDF (English)

Bibliografia

Aggarwal, D. (2022). Defining and measuring market sentiments: A review of the literature. Qualitative Research in Financial Markets, 14(2), 270–288.

Akarsu, S., & Süer, Ö. (2022). How investor attention affects stock returns? Some international evidence. Borsa Istanbul Review, 22(3), 616–626.

Alanyali, M., Moat, H. S., & Preis, T. (2013). Quantifying the relationship between financial news and the stock market. Scientific Reports, 3(1), 1–6.

Antweiler, W., & Frank, M. Z. (2004). Is all that talk just noise? The information content of internet stock message boards. The Journal of Finance, 59(3), 1259–1294.

Anusakumar, S. V., Ali, R., & Wooi, H. C. (2017). The effect of investor sentiment on stock returns: Insight from emerging Asian markets. Asian Academy of Management Journal of Accounting and Finance, 13(1), 159–178.

Araci, D. T. (2019). FinBERT: Financial sentiment analysis with pre-trained language models. arXiv preprint arXiv:1908.10063, 1–10.

Asness, C. S., Frazzini, A., Israel, R., & Moskowitz, T. J. (2015). Fact, fiction, and value investing. Journal of Portfolio Management, 42(1), 1–31.

Ayala, M. J., Gonzálvez-Gallego, N., & Arteaga-Sánchez, R. (2024). Google search volume index and investor attention in stock market: A systematic review. Financial Innovation, 10(1), 70–99.

Baker, M., & Wurgler, J. (2006). Investor sentiment and the cross-section of stock returns. The Journal of Finance, 61(4), 1645–1680.

Baker, M., & Wurgler, J. (2007). Investor sentiment in the stock market. Journal of economic perspectives, 21(2), 129–151.

Batra, R., & Daudpota, S. M. (2018). Integrating StockTwits with sentiment analysis for better prediction of stock price movement. In 2018 international conference on computing, mathematics and engineering technologies (ICoMET) (pp. 1–15). IEEE.

Boehmer, E., Jones, C. M., Zhang, X., & Zhang, X. (2021). Tracking retail investor activity. The Journal of Finance, 76(5), 2249–2305.

Bollen, J., Mao, H., & Zeng, X. (2011). Twitter mood predicts the stock market. Journal of Computational Science, 2(1), 1–8.

Cornell, B., & Damodaran, A. (2021). Value investing: Requiem, rebirth or reincarnation? SSRN.

Dadas, S., Perełkiewicz, M., & Poświata, R. (2020). Pre-training Polish transformer-based language models at scale. Artificial Intelligence and Soft Computing: 19th International Conference, ICAISC 2020 (pp. 301–314). Springer International Publishing.

Das, S. R., & Chen, M. Y. (2007). Yahoo! for Amazon: Sentiment extraction from small talk on the web. Management Science, 53(9), 1375–1388.

De Bondt, W. F., Muradoglu, Y. G., Shefrin, H., & Staikouras, S. K. (2007). Behavioral finance: Quo vadis? Journal of Applied Finance, 18(2), 1–15.

Ding, W., Mazouz, K., Gwilym, O., & Wang, Q. (2023). Technical analysis as a sentiment barometer and the cross-section of stock returns. Quantitative Finance, 23(11), 1617–1636. Duz Tan, S., & Tas, O. (2021). Social media sentiment in international stock returns and trading activity. Journal of Behavioral Finance, 22(2), 221–234.

Hoffmann, A. O., & Shefrin, H. (2014). Technical analysis and individual investors. Journal of Economic Behavior & Organization, 107(1), 487–511.

Kłeczek, D. (2020). Polbert: Attacking Polish NLP tasks with transformers. In Proceedings of the PolEval 2020 workshop (pp. 79–88). Institute of Computer Science, Polish Academy of Sciences.

Kahneman, D., & Riepe, M. W. (1998). Aspects of investor psychology. Journal of Portfolio Management, 24(4), 52–65.

Kazemian, S., Zhao, S., & Penn, G. (2016). Evaluating sentiment analysis in the context of securities trading. In Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics (pp. 2094–2103). Association for Computational Linguistics.

Kearney, C., & Liu, S. (2014). Textual sentiment in finance: A survey of methods and models. International Review of Financial Analysis, 33(1), pp. 171–185.

Kim, S.-H., & Kim, D. (2014). Investor sentiment from internet message postings and the predictability of stock returns. Journal of Economic Behavior & Organization, 107(1), pp. 708–729.

Koptyra, B., Oleksy, M., Dzięcioł, E., & Kocoń, J. (2024). Small language models for emotion recognition in Polish stock market investor opinions. In 2024 IEEE International Conference on Data Mining Workshops (ICDMW) (pp. 463–470). IEEE.

Lee, C.-C., Gao, Z., & Tsai, C.-L. (2020). BERT-based stock market sentiment analysis. In 2020 IEEE International Conference on Consumer Electronics-Taiwan (ICCE-Taiwan) (pp. 1–2). ICCE.

Lev, B., & Gu, F. (2016). The end of accounting and the path forward for investors and managers. John Wiley & Sons.

Lev, B., & Srivastava, A. (2022). Explaining the recent failure of value investing. Critical Finance Review, 11(2), 330–360.

Liu, J.-X., Leu, J.-S., & Holst, S. (2023). Stock price movement prediction based on Stocktwits investor sentiment using FinBERT and ensemble SVM. PeerJ Computer Science, 9(1), 1–25.

Malkiel, B. (1981). A random walk down Wall Street. Norton.

McGurk, Z., Nowak, A., & Hall, J. C. (2020). Stock returns and investor sentiment: Textual analysis and social media. Journal of Economics and Finance, 44(1), 458–485.

Menkhoff, L., & Taylor, M. P. (2007). The obstinate passion of foreign exchange professionals: Technical analysis. Journal of Economic Literature, 45(4), 936–972.

Mishev, K., Gjorgjevikj, A., Vodenska, I., Chitkushev, L. T., & Trajanov, D. (2020). Evaluation of sentiment analysis in finance: From lexicons to transformers. IEEE Access, 8(1), 131662–131682.

Mitroi, A., & Oproiu, A. (2014). Behavioral finance: New research trends, socionomics and investor emotions. Theoretical and Applied Economics, 21(4), 153–166.

Mroczkowski, R., Rybak, P., Wróblewska, A., & Gawlik, I. (2021). HerBERT: Efficiently pretrained transformer-based language model for Polish. Proceedings of the 8th Workshop on Balto-Slavic Natural Language Processing (pp. 1–10). Association for Computational Linguistics.

Nardo, M., Petracco-Giudici, M., & Naltsidis, M. (2016). Walking down Wall Street with a tablet: A survey of stock market predictions using the web. Journal of Economic Surveys, 30(2), 356–369.

Nguyen, T. H., Shirai, K., & Velcin, J. (2015). Sentiment analysis on social media for stock movement prediction. Expert Systems with Applications, 42(24), 9603–9611.

Nti, I. K., Adekoya, A. F., & Weyori, B. A. (2020). A systematic review of fundamental and technical analysis of stock market predictions. Artificial Intelligence Review, 53(4), 3007–3057.

Olawale, I. O., Iworiso, J., & Amaunam, I. (2023). Predicting stock investments based on sentiment and historical price data. International Journal of Data Envelopment Analysis and Operations Research, 4(1), 1–32.

Oliveira, N., Cortez, P., & Areal, N. (2017). The impact of microblogging data for stock market prediction: Using Twitter to predict returns, volatility, trading volume and survey sentiment indices. Expert Systems with applications, 73(1), 125–144.

Pagolu, V. S., Reddy, K. N., Panda, G., & Majhi, B. (2016). Sentiment analysis of Twitter data for predicting stock market movements. In 2016 International Conference on Signal Processing, Communication, Power, and Embedded Systems (SCOPES) (pp. 1345–1350). IEEE.

Park, C.-H., & Irwin, S. H. (2007). What do we know about the profitability of technical analysis? Journal of Economic Surveys, 21(4), 786–826.

Polak, K. (2021). The impact of investor sentiment on direction of stock price changes: Evidence from the Polish stock market. Journal of Banking and Financial Economics, 16(2), 72–90.

Probierz, E., Gałuszka, A., Klimczak, K., Jędrasiak, K., Wiśniewski, T., & Dziada, T. (2021). Financial sentiment on Twitter’s community and it’s connection to Polish stock market movements in context of behavior modelling. European Research Studies Journal, 24(4B), 56–65.

Ranco, G., Aleksovski, D., Caldarelli, G., Grčar, M., & Mozetič, I. (2015). The effects of Twitter sentiment on stock price returns. PloS one, 10(9), 1–21.

Rao, T., & Srivastava, S. (2012). Analyzing stock market movements using Twitter sentiment analysis. In 2012 IEEE/ACM International Conference on Advances in Social Networks Analysis and Mining (pp. 119–123). IEEE.

Renault, T. (2017). Intraday online investor sentiment and return patterns in the U.S. stock market. Journal of Banking & Finance, 84(1), 25–40.

Statman, M. (2017). Finance for normal people: How investors and markets behave. Oxford University Press.

Statman, M. (2019). A second generation behavioral finance. In Behavioral finance: The coming of age (pp. 3–21). World Scientific.

Sul, H. K., Dennis, A. R., & Yuan, L. (2017). Trading on Twitter: Using social media sentiment to predict stock returns. Decision Sciences, 48(3), 454–488.

Teti, E., Dallocchio, M., & Aniasi, A. (2019). The relationship between Twitter and stock prices. Evidence from the US technology industry. Technological Forecasting and Social Change, 149(1), 1–9.

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.

Wojarnik, G. (2022). Sentiment analysis towards listed companies in the energy sector on the example of the WIG-Energia index on the WSE. Procedia Computer Science, 207(1), 2059–2067.

Woo, K.-Y., Mai, C., McAleer, M., & Wong, W.-K. (2020). Review on efficiency and anomalies in stock markets. Economies, 8(1), 1–51.

Yang, S. Y., & Mo, S. Y. (2016). Social media and news sentiment analysis for advanced investment strategies. In W. Pedrycz & S.-M. Chen, Sentiment analysis and ontology engineering: An environment of computational intelligence (pp. 237–272). Springer.

Zhang, W., & Skiena, S. (2010). Trading strategies to exploit blog and news sentiment. In Proceedings of the International AAAI Conference on Web and Social Media (pp. 375–378). AAAI.

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(1), 55–62.

Zielonka, P. (2004). Technical analysis as the representation of typical cognitive biases. International Review of Financial Analysis, 13(2), 217–225.