IDEAS home Printed from https://ideas.repec.org/a/vrs/ecocul/v22y2025i1p70-80n1006.html
   My bibliography  Save this article

The Technological Bridge: R Programming’s Utility in Converting Social Media Data for Quantitative Financial Analysis

Author

Listed:
  • Litvinenko Alexey

    (University of Tartu, School of Economics and Business Administration, Tartu, Estonia)

  • Samuli Saarinen

    (Estonian Business School, Tallinn, Estonia)

  • Litvinenko Anna

    (Tallinn University of Technology, Department of Business Administration, Tallinn, Estonia)

Abstract

Research purpose. This study explores whether R programming can transform unstructured qualitative social media data into a quantitative format suitable for econometric modelling. It specifically examines how elements such as text, emojis, and sentiment from Reddit and X (formerly Twitter) can be converted into variables for regression analysis. With the aim to enhance the predictive power of traditional financial models using alternative data sources, the paper outlines comprehensive guidelines with specific technical steps, from scripting an API to extracting data from Reddit and X, through cleaning and tokenising to incorporating the data into regression models using R programming. The study addresses the growing need in financial economics to incorporate alternative data streams by offering a structured, replicable process for transforming high-volume, unstructured online content into statistically valid variables, thereby bridging the gap between qualitative market sentiment and quantitative modelling. Design / Methodology / Approach. Focusing on the methodology and R scripts, this research adopts a quantitative approach, transforming qualitative social media data into a format suitable for multiple linear and instrumental variable regression models to assess the effect of social media signals on asset prices, with GameStop (GME) and Best Buy (BBY) as case studies. The process ensures reproducibility and includes open-source code, enhancing transparency and applicability for both academic and professional financial data analysis contexts. Findings. The findings demonstrate that qualitative social media data can be quantified for financial analysis. It was effectively extracted, cleaned, and used for regression analysis. Results show that traditional market indicators fail to explain GME’s price shifts, while the frequency of rocket emojis (interpreted as speculative sentiment) was statistically significant. BBY’s returns, however, aligned more closely with market and industry indices, suggesting a lower influence of private sentiment. Originality / Value / Practical implications. The research provides a replicable method for integrating social media data into econometric models, contributing new tools for analysing market sentiment. By adapting classical financial models to modern data sources, the paper opens new directions for asset pricing research. The paper provides technical tools created in R for use in econometric analysis, useful both for academics and practitioners.

Suggested Citation

  • Litvinenko Alexey & Samuli Saarinen & Litvinenko Anna, 2025. "The Technological Bridge: R Programming’s Utility in Converting Social Media Data for Quantitative Financial Analysis," Economics and Culture, Sciendo, vol. 22(1), pages 70-80.
  • Handle: RePEc:vrs:ecocul:v:22:y:2025:i:1:p:70-80:n:1006
    DOI: 10.2478/jec-2025-0006
    as

    Download full text from publisher

    File URL: https://doi.org/10.2478/jec-2025-0006
    Download Restriction: no

    File URL: https://libkey.io/10.2478/jec-2025-0006?utm_source=ideas
    LibKey link: if access is restricted and if your library uses this service, LibKey will redirect you to where you can use your library subscription to access this item
    ---><---

    References listed on IDEAS

    as
    1. Acharya, Viral V. & Pedersen, Lasse Heje, 2005. "Asset pricing with liquidity risk," Journal of Financial Economics, Elsevier, vol. 77(2), pages 375-410, August.
    2. Pastor, Lubos & Stambaugh, Robert F., 2003. "Liquidity Risk and Expected Stock Returns," Journal of Political Economy, University of Chicago Press, vol. 111(3), pages 642-685, June.
    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. Ping‐Wen Sun & Yifan Shen & Meifen Qian & Wu Yan, 2021. "Risk of holding stocks with liquidity sensitive to market uncertainty: evidence from China," Accounting and Finance, Accounting and Finance Association of Australia and New Zealand, vol. 61(S1), pages 1993-2029, April.
    2. Gniadkowska-Szymańska Agata, 2017. "The impact of trading liquidity on the rate of return on emerging markets: the example of Poland and the Baltic countries," Financial Internet Quarterly (formerly e-Finanse), Sciendo, vol. 13(4), pages 136-148, December.
    3. Andres, Christian & Cumming, Douglas & Karabiber, Timur & Schweizer, Denis, 2014. "Do markets anticipate capital structure decisions? — Feedback effects in equity liquidity," Journal of Corporate Finance, Elsevier, vol. 27(C), pages 133-156.
    4. Stephen Morris & Hyun Song Shin, 2004. "Liquidity Black Holes," Review of Finance, Springer, vol. 8(1), pages 1-18.
    5. Chen, Jiun-Lin & Jia, Z. Tingting & Sun, Ping-Wen, 2016. "Real option component of cash holdings, business cycle, and stock returns," International Review of Financial Analysis, Elsevier, vol. 45(C), pages 97-106.
    6. Atanda Mustapha Saidi, 2017. "Working Paper 273 - Stock (Mis)pricing and investment dynamics in Africa," Working Paper Series 2390, African Development Bank.
    7. Mselmi, Nada & Hamza, Taher & Lahiani, Amine & Shahbaz, Muhammad, 2019. "Pricing corporate financial distress: Empirical evidence from the French stock market," Journal of International Money and Finance, Elsevier, vol. 96(C), pages 13-27.
    8. Jeong, Giho & Kang, Jangkoo & Kwon, Kyung Yoon, 2018. "Liquidity skewness premium," The North American Journal of Economics and Finance, Elsevier, vol. 46(C), pages 130-150.
    9. Gagnon, Marie-Hélène & Gimet, Céline, 2013. "The impacts of standard monetary and budgetary policies on liquidity and financial markets: International evidence from the credit freeze crisis," Journal of Banking & Finance, Elsevier, vol. 37(11), pages 4599-4614.
    10. Mayordomo, Sergio & Rodriguez-Moreno, Maria & Peña, Juan Ignacio, 2014. "Liquidity commonalities in the corporate CDS market around the 2007–2012 financial crisis," International Review of Economics & Finance, Elsevier, vol. 31(C), pages 171-192.
    11. François-Éric Racicot & Raymond Théoret, 2022. "Tracking market and non-traditional sources of risks in procyclical and countercyclical hedge fund strategies under extreme scenarios: a nonlinear VAR approach," Financial Innovation, Springer;Southwestern University of Finance and Economics, vol. 8(1), pages 1-56, December.
    12. Agarwal, Vikas & Hanouna, Paul & Moussawi, Rabih & Stahel, Christof W., 2021. "Do ETFs increase the commonality in liquidity of underlying stocks?," CFR Working Papers 21-04, University of Cologne, Centre for Financial Research (CFR).
    13. Chernenko, Sergey & Sunderam, Adi, 2020. "Do fire sales create externalities?," Journal of Financial Economics, Elsevier, vol. 135(3), pages 602-628.
    14. Vu, Van & Chai, Daniel & Do, Viet, 2015. "Empirical tests on the liquidity-adjusted capital asset pricing model," Pacific-Basin Finance Journal, Elsevier, vol. 35(PA), pages 73-89.
    15. Jiang, Lei, 2014. "Stock liquidity and the Taylor rule," Journal of Empirical Finance, Elsevier, vol. 28(C), pages 202-214.
    16. Peter Christoffersen & Ruslan Goyenko & Kris Jacobs & Mehdi Karoui, 2018. "Illiquidity Premia in the Equity Options Market," The Review of Financial Studies, Society for Financial Studies, vol. 31(3), pages 811-851.
    17. Saad, Mohsen & Samet, Anis, 2020. "Collectivism and commonality in liquidity," Journal of Business Research, Elsevier, vol. 116(C), pages 137-162.
    18. Thomas Paul & Thomas Walther & André Küster-Simic, 2022. "Empirical analysis of the illiquidity premia of German real estate securities," Financial Markets and Portfolio Management, Springer;Swiss Society for Financial Market Research, vol. 36(2), pages 203-260, June.
    19. João Pedro Pereira & António Rua, 2018. "Asset Pricing with a Bank Risk Factor," Journal of Money, Credit and Banking, Blackwell Publishing, vol. 50(5), pages 993-1032, August.
    20. Aragon, George O. & Strahan, Philip E., 2012. "Hedge funds as liquidity providers: Evidence from the Lehman bankruptcy," Journal of Financial Economics, Elsevier, vol. 103(3), pages 570-587.

    More about this item

    Keywords

    ;
    ;
    ;
    ;
    ;

    JEL classification:

    • C58 - Mathematical and Quantitative Methods - - Econometric Modeling - - - Financial Econometrics
    • C87 - Mathematical and Quantitative Methods - - Data Collection and Data Estimation Methodology; Computer Programs - - - Econometric Software
    • G14 - Financial Economics - - General Financial Markets - - - Information and Market Efficiency; Event Studies; Insider Trading

    Statistics

    Access and download statistics

    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:vrs:ecocul:v:22:y:2025:i:1:p:70-80:n:1006. 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: Peter Golla (email available below). General contact details of provider: https://www.sciendo.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.