IDEAS home Printed from https://ideas.repec.org/a/gam/jmathe/v12y2024i20p3192-d1497063.html
   My bibliography  Save this article

Online Investor Sentiment via Machine Learning

Author

Listed:
  • Zongwu Cai

    (Department of Economics, University of Kansas, Lawrence, KS 66045, USA)

  • Pixiong Chen

    (Division of Model Risk Management, Wells Fargo Bank, Charlotte, NC 28202, USA)

Abstract

In this paper, we propose utilizing machine learning methods to determine the expected aggregated stock market risk premium based on online investor sentiment and employing the multifold forward-validation method to select the relevant hyperparameters. Our empirical studies provide strong evidence that some machine learning methods, such as extreme gradient boosting or random forest, show significant predictive ability in terms of their out-of-sample performances with high-dimensional investor sentiment proxies. They also outperform the traditional linear models, which shows a possible unobserved nonlinear relationship between online investor sentiment and risk premium. Moreover, this predictability based on online investor sentiment has a better economic value, so it improves portfolio performance for investors who need to decide the optimal asset allocation in terms of the certainty equivalent return gain and the Sharpe ratio.

Suggested Citation

  • Zongwu Cai & Pixiong Chen, 2024. "Online Investor Sentiment via Machine Learning," Mathematics, MDPI, vol. 12(20), pages 1-14, October.
  • Handle: RePEc:gam:jmathe:v:12:y:2024:i:20:p:3192-:d:1497063
    as

    Download full text from publisher

    File URL: https://www.mdpi.com/2227-7390/12/20/3192/pdf
    Download Restriction: no

    File URL: https://www.mdpi.com/2227-7390/12/20/3192/
    Download Restriction: no
    ---><---

    References listed on IDEAS

    as
    1. Malcolm Baker & Jeffrey Wurgler, 2006. "Investor Sentiment and the Cross‐Section of Stock Returns," Journal of Finance, American Finance Association, vol. 61(4), pages 1645-1680, August.
    2. Steve Y. Yang & Sheung Yin Kevin Mo & Anqi Liu, 2015. "Twitter financial community sentiment and its predictive relationship to stock market movement," Quantitative Finance, Taylor & Francis Journals, vol. 15(10), pages 1637-1656, October.
    3. Zhi Da & Joseph Engelberg & Pengjie Gao, 2015. "Editor's Choice The Sum of All FEARS Investor Sentiment and Asset Prices," The Review of Financial Studies, Society for Financial Studies, vol. 28(1), pages 1-32.
    4. Stefan Wager & Susan Athey, 2018. "Estimation and Inference of Heterogeneous Treatment Effects using Random Forests," Journal of the American Statistical Association, Taylor & Francis Journals, vol. 113(523), pages 1228-1242, July.
    5. Malcolm Baker & Jeffrey Wurgler, 2007. "Investor Sentiment in the Stock Market," Journal of Economic Perspectives, American Economic Association, vol. 21(2), pages 129-152, Spring.
    6. Paul C. Tetlock & Maytal Saar‐Tsechansky & Sofus Macskassy, 2008. "More Than Words: Quantifying Language to Measure Firms' Fundamentals," Journal of Finance, American Finance Association, vol. 63(3), pages 1437-1467, June.
    7. John Y. Campbell & Samuel B. Thompson, 2008. "Predicting Excess Stock Returns Out of Sample: Can Anything Beat the Historical Average?," The Review of Financial Studies, Society for Financial Studies, vol. 21(4), pages 1509-1531, July.
    8. Jiang, Fuwei & Lee, Joshua & Martin, Xiumin & Zhou, Guofu, 2019. "Manager sentiment and stock returns," Journal of Financial Economics, Elsevier, vol. 132(1), pages 126-149.
    9. Michael Lemmon & Evgenia Portniaguina, 2006. "Consumer Confidence and Asset Prices: Some Empirical Evidence," The Review of Financial Studies, Society for Financial Studies, vol. 19(4), pages 1499-1529.
    10. Dashan Huang & Fuwei Jiang & Jun Tu & Guofu Zhou, 2015. "Investor Sentiment Aligned: A Powerful Predictor of Stock Returns," The Review of Financial Studies, Society for Financial Studies, vol. 28(3), pages 791-837.
    11. Gabriele Ranco & Darko Aleksovski & Guido Caldarelli & Miha Grčar & Igor Mozetič, 2015. "The Effects of Twitter Sentiment on Stock Price Returns," PLOS ONE, Public Library of Science, vol. 10(9), pages 1-21, September.
    12. Zongwu Cai & Pixiong Chen, 2022. "New Online Investor Sentiment and Asset Returns," WORKING PAPERS SERIES IN THEORETICAL AND APPLIED ECONOMICS 202216, University of Kansas, Department of Economics, revised Nov 2022.
    13. Philip Ndikum, 2020. "Machine Learning Algorithms for Financial Asset Price Forecasting," Papers 2004.01504, arXiv.org.
    14. Brown, Gregory W. & Cliff, Michael T., 2004. "Investor sentiment and the near-term stock market," Journal of Empirical Finance, Elsevier, vol. 11(1), pages 1-27, January.
    15. Paul C. Tetlock, 2007. "Giving Content to Investor Sentiment: The Role of Media in the Stock Market," Journal of Finance, American Finance Association, vol. 62(3), pages 1139-1168, June.
    16. Hui Zou & Trevor Hastie, 2005. "Addendum: Regularization and variable selection via the elastic net," Journal of the Royal Statistical Society Series B, Royal Statistical Society, vol. 67(5), pages 768-768, November.
    17. Tim Loughran & Bill Mcdonald, 2011. "When Is a Liability Not a Liability? Textual Analysis, Dictionaries, and 10‐Ks," Journal of Finance, American Finance Association, vol. 66(1), pages 35-65, February.
    18. Hui Zou & Trevor Hastie, 2005. "Regularization and variable selection via the elastic net," Journal of the Royal Statistical Society Series B, Royal Statistical Society, vol. 67(2), pages 301-320, April.
    Full references (including those not matched with items on IDEAS)

    Most related items

    These are the items that most often cite the same works as this one and are cited by the same works as this one.
    1. Zongwu Cai & Pixiong Chen, 2022. "New Online Investor Sentiment and Asset Returns," WORKING PAPERS SERIES IN THEORETICAL AND APPLIED ECONOMICS 202216, University of Kansas, Department of Economics, revised Nov 2022.
    2. Liang, Chao & Xu, Yongan & Wang, Jianqiong & Yang, Mo, 2022. "Whether dimensionality reduction techniques can improve the ability of sentiment proxies to predict stock market returns," International Review of Financial Analysis, Elsevier, vol. 82(C).
    3. Zachary McGurk & Adam Nowak & Joshua C. Hall, 2020. "Stock returns and investor sentiment: textual analysis and social media," Journal of Economics and Finance, Springer;Academy of Economics and Finance, vol. 44(3), pages 458-485, July.
    4. Szymon Lis, 2022. "Investor Sentiment in Asset Pricing Models: A Review," Working Papers 2022-14, Faculty of Economic Sciences, University of Warsaw.
    5. Jiang, Fuwei & Lee, Joshua & Martin, Xiumin & Zhou, Guofu, 2019. "Manager sentiment and stock returns," Journal of Financial Economics, Elsevier, vol. 132(1), pages 126-149.
    6. Mahmoudi, Nader & Docherty, Paul & Melia, Adrian, 2022. "Firm-level investor sentiment and corporate announcement returns," Journal of Banking & Finance, Elsevier, vol. 144(C).
    7. Jin, Xuejun & Chen, Cheng & Yang, Xiaolan, 2024. "The effect of international media news on the global stock market," International Review of Economics & Finance, Elsevier, vol. 89(PA), pages 50-69.
    8. Ung, Sze Nie & Gebka, Bartosz & Anderson, Robert D.J., 2023. "Is sentiment the solution to the risk–return puzzle? A (cautionary) note," Journal of Behavioral and Experimental Finance, Elsevier, vol. 37(C).
    9. Gric, Zuzana & Ehrenbergerova, Dominika & Hodula, Martin, 2022. "The power of sentiment: Irrational beliefs of households and consumer loan dynamics," Journal of Financial Stability, Elsevier, vol. 59(C).
    10. Al-Nasseri, Alya & Menla Ali, Faek & Tucker, Allan, 2021. "Investor sentiment and the dispersion of stock returns: Evidence based on the social network of investors," International Review of Financial Analysis, Elsevier, vol. 78(C).
    11. Wang, Wenzhao & Duxbury, Darren, 2021. "Institutional investor sentiment and the mean-variance relationship: Global evidence," Journal of Economic Behavior & Organization, Elsevier, vol. 191(C), pages 415-441.
    12. An, Suwei, 2023. "Essays on incentive contracts, M&As, and firm risk," Other publications TiSEM dd97d2f5-1c9d-47c5-ba62-f, Tilburg University, School of Economics and Management.
    13. Sun, Licheng & Najand, Mohammad & Shen, Jiancheng, 2016. "Stock return predictability and investor sentiment: A high-frequency perspective," Journal of Banking & Finance, Elsevier, vol. 73(C), pages 147-164.
    14. Bennett, Donyetta & Mekelburg, Erik & Strauss, Jack & Williams, T.H., 2024. "Unlocking the black box of sentiment and cryptocurrency: What, which, why, when and how?," Global Finance Journal, Elsevier, vol. 60(C).
    15. Kostopoulos, Dimitrios & Meyer, Steffen, 2018. "Disentangling investor sentiment: Mood and household attitudes towards the economy," Journal of Economic Behavior & Organization, Elsevier, vol. 155(C), pages 28-78.
    16. Renault, Thomas, 2017. "Intraday online investor sentiment and return patterns in the U.S. stock market," Journal of Banking & Finance, Elsevier, vol. 84(C), pages 25-40.
    17. Ruan, Qingsong & Wang, Zilin & Zhou, Yaping & Lv, Dayong, 2020. "A new investor sentiment indicator (ISI) based on artificial intelligence: A powerful return predictor in China," Economic Modelling, Elsevier, vol. 88(C), pages 47-58.
    18. Prajwal Eachempati & Praveen Ranjan Srivastava, 2021. "Accounting for unadjusted news sentiment for asset pricing," Qualitative Research in Financial Markets, Emerald Group Publishing Limited, vol. 13(3), pages 383-422, May.
    19. Guofu Zhou, 2018. "Measuring Investor Sentiment," Annual Review of Financial Economics, Annual Reviews, vol. 10(1), pages 239-259, November.
    20. Fang, Hao & Chung, Chien-Ping & Lu, Yang-Cheng & Lee, Yen-Hsien & Wang, Wen-Hao, 2021. "The impacts of investors' sentiments on stock returns using fintech approaches," International Review of Financial Analysis, Elsevier, vol. 77(C).

    Corrections

    All material on this site has been provided by the respective publishers and authors. You can help correct errors and omissions. When requesting a correction, please mention this item's handle: RePEc:gam:jmathe:v:12:y:2024:i:20:p:3192-:d:1497063. See general information about how to correct material in RePEc.

    If you have authored this item and are not yet registered with RePEc, we encourage you to do it here. This allows to link your profile to this item. It also allows you to accept potential citations to this item that we are uncertain about.

    If CitEc recognized a bibliographic reference but did not link an item in RePEc to it, you can help with this form .

    If you know of missing items citing this one, you can help us creating those links by adding the relevant references in the same way as above, for each refering item. If you are a registered author of this item, you may also want to check the "citations" tab in your RePEc Author Service profile, as there may be some citations waiting for confirmation.

    For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: MDPI Indexing Manager (email available below). General contact details of provider: https://www.mdpi.com .

    Please note that corrections may take a couple of weeks to filter through the various RePEc services.

    IDEAS is a RePEc service. RePEc uses bibliographic data supplied by the respective publishers.