Stock price forecasting with sentimental analysis of social media data
Quarterly Journal of Securities Exchange

Quarterly Journal of Securities Exchange

Stock price forecasting with sentimental analysis of social media data

Document Type : Original Article

Authors
1 PH. D Student, Faculty of Management, Tehran University, Tehran, Iran
2 Professor, Faculty of Management, Tehran University, Tehran, Iran
Abstract
In recent years, Telegram groups and channels become considerable parameter in user’s opinion. Previous researches show the importance of sentiments in forecasting models and researches find significant relation between sentimental analysis and stock price prediction. They consider buy, sell and hold contents as independent variable. But in reality, there is a difference between people who publish their opinion in social media. Means people consider the speaker’s background and also for the viral messages there are same situation. In this research we consider importance of the publisher and message in social media. Then we separate content into different variables. We analyse 15.736.204 Telegram messages and according to our sentimental dictionary, we tag them then put merge them with 19.312 records related to symbols in different days. Selected symbols are the stocks in 30 company index portfolio and the duration of survey is from march 2019 to august 2021. Six variable selection approach was considered in this survey, for each symbol (among 36 selected companies) we train different artificial neural network which the number of neurons in hidden layer varies from 6 to 10 and the lag of data for input variable differs from 1 to 5. In order to remove initial values effect in neural network, each network runs 10 times. Results showed binary prediction in a model which separates messages by importance of people and amount of view has better performance than other models and RMSE error in that model for return forecasting significantly lower than other models.
Keywords
Subjects

Aggarwal, C. C; & Zhai, C. (Eds.). (2012). Mining text data. Springer Science & Business Media. https://doi.org/10.1007/978-1-4614-3223-4_1
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
Baker, M; & Wurgler, J. (2007). Investor sentiment in the stock market. Journal of economic perspectives, 21(2), 129-152. DOI: 10.1257/jep.21.2.129
Oh, C; & Sheng, O. (2011). Investigating predictive power of stock micro blog sentiment in forecasting future stock price directional movement. https://aisel.aisnet.org/icis2011/proceedings/knowledge/17/
Duggan, M; Ellison, N. B; Lampe, C; Lenhart, A; & Madden, M. (2015). Social media update 2014. Pew research center, 19, 1-2. https://media.myworshiptimes22.com/wp-content/uploads/sites/6/2015/07/20140539/Social-Media-Site-Usage-2014-_-Pew-Research-Centers-Internet-American-Life-Project.pdf
Hong, H; & Stein, J. C. (1999). A unified theory of underreaction, momentum trading, and overreaction in asset markets. The Journal of finance, 54(6), 2143-2184. https://doi.org/10.1111/0022-1082.00184
Eppen, G. D; & Fama, E. F. (1969). Cash balance and simple dynamic portfolio problems with proportional costs. International Economic Review, 10(2), 119-133. https://doi.org/10.2307/2525547
Cooper. John C.B. (1999) ”Artificial neural network versus multivariate statistics: an application from economics”, Journal of applied statistics,vol.26”:8: 909-921. https://doi.org/10.1080/02664769921927
Medhat, W; Hassan, A; & Korashy, H. (2014). Sentiment analysis algorithms and applications: A survey. Ain Shams engineering journal, 5(4), 1093-1113. https://doi.org/10.1016/j.asej.2014.04.011
Neubeck, K. J; & Glasberg, D. S. (2004). Sociology: Diversity, conflict, and change. Recording for the Blind & Dyslexic. https://cir.nii.ac.jp/crid/1970304959948828299
Pradhan, V. M; Vala, J; & Balani, P. (2016). A survey on Sentiment Analysis Algorithms for opinion mining. International Journal of Computer Applications, 133(9), 7-11. DOI:10.5120/ijca2016907977
Sprenger, T. O; Tumasjan, A; Sandner, P. G; & Welpe, I. M. (2014). Tweets and trades: The information content of stock microblogs. European Financial Management, 20(5), 926-957. https://doi.org/10.1111/j.1468-036X.2013.12007.x
Shepard, J. M. (2012). Cengage advantage books: Sociology. Nelson Education. book link
Tsay, R. S. (2005). Analysis of financial time series. John wiley & sons. book link
Vinodhini, G; & Chandrasekaran, R. M. (2012). Sentiment analysis and opinion mining: a survey. International Journal, 2(6), 282-292. https://www.researchgate.net/profile/Vinodhini-G-2/publication/265163299_Sentiment_Analysis_and_Opinion_Mining_A_Survey/links/54018f330cf2bba34c1af133/Sentiment-Analysis-and-Opinion-Mining-A-Survey.pdf