Abstract
The study of the impact of investor sentiment on stock returns has gained increasing momentum in the past few years. It has been widely accepted that public mood is correlated with financial markets. However, only a few studies discussed how the public mood would affect one of the fundamental problems of computational finance: portfolio management. In this study, we use public financial sentiment and historical prices collected from the New York Stock Exchange (NYSE) to train multiple machine learning models for automatic wealth allocation across a set of assets. Unlike previous studies which set as target variable the asset prices in the portfolio, the variable to predict here is represented by the best asset allocation strategy ex post. Experiments performed on five portfolios show that long short-term memory networks are superior to multi-layer perceptron and random forests producing, in the period under analysis, an average increase in the revenue across the portfolios ranging between 5% (without financial mood) and 19% (with financial mood) compared to the equal-weighted portfolio. Results show that our all-in-one and end-to-end approach for automatic portfolio selection outperforms the equal-weighted portfolio. Moreover, when using long short-term memory networks, the employment of sentiment data in addition to lagged data leads to greater returns for all the five portfolios under evaluation. Finally, we find that among the employed machine learning algorithms, long short-term memory networks are better suited for learning the impact of public mood on financial time series.
Similar content being viewed by others
References
Bollen J, Mao H, Zeng X. Twitter mood predicts the stock market. J Comput Sci 2011;2(1):1–8.
Howard N, Cambria E. Intention awareness: improving upon situation awareness in human-centric environments. Human-centric Computing and Information Sciences 2013;3(1):9.
Nassirtoussi AK, Aghabozorgi S, Wah TY, Chek D, Ngo L. Text mining for market prediction A systematic review. Expert Syst Appl 2014;41(16):7653–7670.
Fama EF. The behavior of stock-market prices. J Bus 1965;38(1):34–105.
Black F. Noise. J Finance 1986;41(3):528–543.
Bradford De Long J, Shleifer A, Summers LH, Waldmann RJ. Noise trader risk in financial markets. J Political Econ 1990;98(4):703–738.
Kavussanos MG, Dockery E. A multivariate test for stock market efficiency: the case of ase. Appl Financ Econ 2001;11(5):573–579.
Bo Q, Rasheed K. Stock market prediction with multiple classifiers. Appl Intell 2007;26(1):25–33.
Fama EF. Efficient capital markets: a review of theory and empirical work. J Finance 1970;25(2):383–417.
Li Q, Jiang L, Li P, Chen H. 2015. Tensor-based learning for predicting stock movements. In: AAAI, pp 1784–1790.
Gregory W. Brown and Michael T Cliff. Investor sentiment and the near-term stock market. J Rmpir Finance 2004;11(1):1–27.
Xing F, Cambria E, Welsch R. Natural language based financial forecasting: a survey. Artifx Intell Rev 2018;50(1):49–73.
Tetlock PC, Saar-Tsechansky M, Macskassy S. More than words: quantifying language to measure firms’ fundamentals. J Finance 2008;63(3):1437–1467.
Li F. The information content of forward-looking statements in corporate filings—a naïve Bayesian machine learning approach. J Account Res 2010;48(5):1049–1102.
Schumaker RP, Chen H. Textual analysis of stock market prediction using breaking financial news The azfin text system. ACM Trans Inf Syst (TOIS) 2009;27(2):12.
Smailović J, Grčar M, Lavrač N, žnidaršič M. Predictive sentiment analysis of tweets: a stock market application. Human-Computer Interaction and Knowledge Discovery in Complex, Unstructured, Big Data. Springer; 2013. p. 77–88.
Xing F, Cambria E, Malandri L, Vercellis C. Discovering Bayesian market views for intelligent asset allocation. ECML; 2018.
Si J, Mukherjee A, Liu B, Li Q, Li H, Deng X. Exploiting topic based twitter sentiment for stock prediction. Proceedings of the 51st Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers); 2013. p. 24–29.
Ranco G, Aleksovski D, Caldarelli G, Grčar M, Mozetič I. 2015. The effects of twitter sentiment on stock price returns, Vol. 10.
Papana A, Kyrtsou C, Kugiumtzis D, Diks C. Detecting causality in non-stationary time series using partial symbolic transfer entropy: evidence in financial data. Comput Econ 2016;47(3):341–365.
Tafti A, Zotti R, Jank W. 2016. Real-time diffusion of information on twitter and the financial markets, Vol. 11.
Akita R, Yoshihara A, Matsubara T, Uehara K. Deep learning for stock prediction using numerical and textual information. 2016 IEEE/ACIS 15th International Conference on Computer and Information Science (ICIS). IEEE; 2016. p. 1–6.
Das SR, Chen MY. Yahoo! for amazon: sentiment extraction from small talk on the web. Manag Sci 2007; 53(9):1375–1388.
Nguyen TH, Shirai K. Topic modeling based sentiment analysis on social media for stock market prediction. Proceedings of the 53rd Annual Meeting of the Association for Computational Linguistics and the 7th International Joint Conference on Natural Language Processing (Volume 1: Long Papers); 2015. p. 1354–1364.
Cambria E, Olsher D, Kwok K. Sentic activation: a two-level affective common sense reasoning framework. AAAI. Toronto; 2012. p. 186–192.
Poria S, Gelbukh A, Cambria E, Yang P, Hussain A, Durrani T. Merging senticnet and Wordnet-affect emotion lists for sentiment analysis. 2012 IEEE 11th International Conference on Signal Processing (ICSP). IEEE; 2012. p. 2012.
Cambria E, Hussain A, Havasi C, Eckl C. SenticSpace: visualizing opinions and sentiments in a multi-dimensional vector space. Knowledge-Based and Intelligent Information and Engineering Systems, volume 6279 of Lecture Notes in Artificial Intelligence. In: Setchi R, Jordanov I, Howlett R, and Jain L, editors. Berlin: Springer; 2010. p. 385–393.
Shravan Kumar B, Ravi V. A survey of the applications of text mining in financial domain. Knowl-Based Syst 2016;114:128–147.
Cambria E, Poria S, Gelbukh A, Thelwall M. Sentiment analysis is a big suitcase. IEEE Intell Syst 2017;32(6):74–80.
Koyano S, Ikeda K. Online portfolio selection based on the posts of winners and losers in stock microblogs. 2017 IEEE Symposium Series on Computational Intelligence (SSCI). IEEE; 2017. p. 2017.
Xing F, Cambria, E, Welsch R. Intelligent asset allocation via market sentiment views. IEEE Comput Intell Mag 2018;13(4):25–34.
Markowitz H. Portfolio selection. J Finance 1952;7(1):77–91.
Markowitz HM, Peter Todd G, Sharpe William F, Vol. 66. Mean-variance analysis in portfolio choice and capital markets. New York: Wiley; 2000.
Kelly Jr. JL. A new interpretation of information rate. The Kelly Capital Growth Investment Criterion: Theory and Practice. World Scientific; 2011. p. 25–34.
Samuelson PA. Lifetime portfolio selection by dynamic stochastic programming. Stochastic Optimization Models in Finance. Elsevier; 1975. p. 517–524.
Li B, Hoi SCH. Online portfolio selection: a survey. ACM Comput Surv (CSUR) 2014;46(3):35.
Quandl A. P. I. 2017. Various end-of-day data. https://www.quandl.com/data.
StockFluence API. 2017. Financial sentiment data series. https://www.stockfluence.com/.
Breiman L. Random forests. Mach Learn 2001;45(1):5–32.
Leo B, Friedman JH, Olshen RA, Stone CJ. 1984. Classification and regression trees. Wadsworth International Group.
Patel J, Shah S, Thakkar P, Kotecha K. Predicting stock and stock price index movement using trend deterministic data preparation and machine learning techniques. Expert Syst Appl 2015;42(1):259–268.
Pedregosa F, Varoquaux G, Gramfort A, Michel V, Thirion B, Grisel O, Blondel M, Prettenhofer P, Weiss R, Dubourg V, et al. Scikit-learn: m learning in python. J Mach Learn Res 2011;12 (Oct):2825–2830.
Lu C-J, Lee T-S, Chiu C-C. Financial time series forecasting using independent component analysis and support vector regression. Decis Support Syst 2009;47(2):115–125.
Cavalcante RC, Brasileiro RC, Souza VLF, Nobrega JP, Oliveira ALI. Computational intelligence and financial markets: a survey and future directions. Expert Syst Appl 2016;55:194–211.
Kara Y, Boyacioglu MA, Baykan ÖK. Predicting direction of stock price index movement using artificial neural networks and support vector machines: the sample of the Istanbul stock exchange. Expert Syst Appl 2011;38 (5):5311–5319.
de Oliveira FA, Nobre CN, Zárate LE. Applying artificial neural networks to prediction of stock price and improvement of the directional prediction index–case study of petr4, petrobras, Brazil. Expert Syst Appl 2013;40 (18):7596–7606.
Chollet F, et al. 2015. Keras. https://keras.io.
Hagan MT, Demuth HB, Beale MH, De Jesús O, Vol. 20. Neural network design. Boston: Pws Pub; 1996.
Plyakha Y, Uppal R, Vilkov G. 2012. Why does an equal-weighted portfolio outperform value-and price-weighted portfolios? Available at SSRN 1787045.
Ferguson R, Schofield D. 2010. Equal weighted portfolios perform better. Financial Times.
Sutskever I, Vinyals O, Le Quoc V. Sequence to sequence learning with neural networks. Advances in neural information processing systems; 2014. p. 3104–3112.
Minhas S, Hussain A. From spin to swindle: identifying falsification in financial text. Cogn Comput 2016;8 (4):729–745.
Author information
Authors and Affiliations
Corresponding author
Ethics declarations
Conflict of Interest
The authors declare that they have no conflict of interest.
Informed Consent
Informed consent was not required as no human or animals were involved.
Human and Animal Rights
This article does not contain any studies with human or animal subjects performed by any of the authors.
Rights and permissions
About this article
Cite this article
Malandri, L., Xing, F.Z., Orsenigo, C. et al. Public Mood–Driven Asset Allocation: the Importance of Financial Sentiment in Portfolio Management. Cogn Comput 10, 1167–1176 (2018). https://doi.org/10.1007/s12559-018-9609-2
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s12559-018-9609-2