
Forecasting US Stock Prices Through Sentiment Analysis and Machine Learning–A Case Study of Tesla Inc.
- 1 Hoosac School
- 2 Hoosac School
- 3 University of Wisconsin-Madison
* Author to whom correspondence should be addressed.
Abstract
The financial sector is characterized by high volatility, and the accurate forecasting of stock prices is an actively pursued area of research and analysis. This study extends the scope of machine learning techniques, such as Artificial Neural Networks and fuzzy-based techniques, to enhance the precision of stock price predictions. The central focus of this research is algorithmic trading, which combines various qualitative factors in stock buying and selling decisions. More specifically, this study delves into the unique relationship between Elon Musk’s tweets and Tesla’s stock value. To identify patterns in the pre-processed dataset, which has had stop words removed, exploratory data analysis is used as the primary research methodology. The study conclusively demonstrates that a positive correlation exists between the number of tweets/engagements and Tesla’s closing price, and this correlation holds true in reverse: a decrease in tweets/engagements corresponds with a decrease in Tesla’s closing price. This research has broader implications for macroeconomic analysis of the US stock market by highlighting the role of technology and innovation in financial markets, as well as the importance of data-driven approaches in economic
Keywords
stock market, Tesla stock , BP Neural Network Model, LSTM
[1]. W Ye, L Sun, and B Miao. Dynamic cointegration of gold and bitcoin based on semi-parametric midas fractional regression model. syst. Sci. Math, 40:1270–1285, 2020.
[2]. Pablo Agnese, Jonathan Thoss, et al. New moneys under the new normal? bitcoin and gold interdependence during covid times. Technical report, Institute of Labor Economics (IZA), 2021.
[3]. Zimu Lin, Han Wang, Xiang Zheng, Rongrong Shentu, and Luyan Wang. Gold and bitcoin price forecasting based on multiple models. 2022
[4]. Yang Jian-Hui and Dou Wei. Prediction of gold price based on wt-svr and emd-svr model. In 2012 Eighth International Conference on Computational Intelligence and Security, pages 415–419. IEEE, 2012.
[5]. Olufunke G Darley, Abayomi IO Yussuff, and Adetokunbo A Adenowo. Price analysis and forecasting for bitcoin using auto regressive integrated moving average model. Annals of Science and Technology, 6(2):47–56, 2021.
[6]. Tony Klein, Hien Pham Thu, and Thomas Walther. Bitcoin is not the new gold–a comparison of volatility, correlation, and portfolio performance. International Review of Financial Analysis, 59:105–116, 201
[7]. Elie Bouri, Peter Molnár, Georges Azzi, David Roubaud, and Lars Ivar Hagfors. On the hedge and safe haven properties of bitcoin: Is it really more than a diversifier? Finance Research Letters, 20:192–198, 2017.
[8]. Anne Haubo Dyhrberg. Bitcoin, gold and the dollar–a garch volatility analysis. Finance Research Letters, 16:85– 92, 2016.
[9]. Irene Henriques and Perry Sadorsky. Can bitcoin replace gold in an investment portfolio? Journal of Risk and Financial Management, 11(3):48, 2018.
[10]. YE Wuyi, DONG Xiaowen, and MIAO Baiqi. Linkage of international stock market and financial infection analysis based on cd-copula model. Journal of Systems Science and Mathematical Sciences, 38(5):553, 2018.
[11]. Nurhayati Buslim, Imam Lutfi Rahmatullah, Bayu Aji Setyawan, and Aryajaya Alamsyah. Comparing bitcoin’s prediction model using gru, rnn, and lstm by hyperparameter optimization grid search and random search. In 2021 9th International Conference on Cyber and IT Service Management (CITSM), pages 1–6. IEEE, 2021.
[12]. Eugene F Fama. Stock returns, real activity, inflation, and money. The American economic review, 71(4):545–565, 1981.
[13]. Andrew Ang and Geert Bekaert. Stock return predictability: Is it there? The Review of Financial Studies, 20(3):651– 707, 2007.
[14]. John H Cochrane. The dog that did not bark: A defense of return predictability. The Review of Financial Studies, 21(4):1533–1575, 2008
[15]. John Y Campbell and Robert J Shiller. The dividend-price ratio and expectations of future dividends and discount factors. The Review of Financial Studies, 1(3):195–228, 1988
[16]. M Hashem Pesaran and Allan Timmermann. Predictability of stock returns: Robustness and economic significance. The Journal of Finance, 50(4):1201–1228, 1995.
[17]. Ivo Welch and Amit Goyal. A comprehensive look at the empirical performance of equity premium prediction. The Review of Financial Studies, 21(4):1455–1508, 2008
[18]. Mark Kritzman, Sebastien Page, and David Turkington. Regime shifts: Implications for dynamic strategies (corrected). Financial Analysts Journal, 68(3):22–39, 2012.
[19]. David López-Salido, Jeremy C Stein, and Egon Zakrajšek. Credit-market sentiment and the business cycle. The Quarterly Journal of Economics, 132(3):1373–1426, 2017.
[20]. Rudolph A Lorentz. Multivariate hermite interpolation by algebraic polynomials: A survey. Journal of computational and applied mathematics, 122(1-2):167–201, 2000.
[21]. Feng Yu and Xiaozhong Xu. A short-term load forecasting model of natural gas based on optimized genetic algorithm and improved bp neural network. Applied
[22]. Zhi Xiao, Shi-Jie Ye, Bo Zhong, and Cai-Xin Sun. Bp neural network with rough set for short term load forecasting. Expert Systems with Applications, 36(1):273–279, 2009.
[23]. Felix A Gers and E Schmidhuber. Lstm recurrent networks learn simple context-free and context-sensitive languages. IEEE transactions on neural networks, 12(6):1333–1340, 2001.
[24]. Martin Sundermeyer, Ralf Schlüter, and Hermann Ney. Lstm neural networks for language modeling. In Thirteenth annual conference of the international speech communication association, 2012.
[25]. Jason PC Chiu and Eric Nichols. Named entity recognition with bidirectional lstm-cnns. Transactions of the association for computational linguistics, 4:357–370, 2016.
[26]. Francisco Javier Ordóñez and Daniel Roggen. Deep convolutional and lstm recurrent neural networks for multimodal wearable activity recognition. Sensors, 16(1):115, 20
[27]. Alex Graves and Jürgen Schmidhuber. Framewise phoneme classification with bidirectional lstm and other neural network architectures. Neural networks, 18(5-6):602–610, 2005.
[28]. Jan Hauke and Tomasz Kossowski. Comparison of values of pearson’s and spearman’s correlation coefficients on the same sets of data. Quaestiones geographicae, 30(2):87–93, 2011.
[29]. Wen Jin, Zhao Jia Li, Luo Si Wei, and Han Zhen. The improvements of bp neural network learning algorithm. In WCC 2000-ICSP 2000. 2000 5th international conference on signal processing proceedings. 16th world computer congress 2000, volume 3, pages 1647–1649. IEEE, 2000.
[30]. Felix A Gers, Jürgen Schmidhuber, and Fred Cummins. Learning to forget: Continual prediction with lstm. Neural computation, 12(10):2451–2471, 2000
Cite this article
Liu,Y.;Huang,J.;Yang,T. (2023). Forecasting US Stock Prices Through Sentiment Analysis and Machine Learning–A Case Study of Tesla Inc.. Advances in Economics, Management and Political Sciences,44,198-212.
Data availability
The datasets used and/or analyzed during the current study will be available from the authors upon reasonable request.
Disclaimer/Publisher's Note
The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of EWA Publishing and/or the editor(s). EWA Publishing and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.
About volume
Volume title: Proceedings of the 7th International Conference on Economic Management and Green Development
© 2024 by the author(s). Licensee EWA Publishing, Oxford, UK. This article is an open access article distributed under the terms and
conditions of the Creative Commons Attribution (CC BY) license. Authors who
publish this series agree to the following terms:
1. Authors retain copyright and grant the series right of first publication with the work simultaneously licensed under a Creative Commons
Attribution License that allows others to share the work with an acknowledgment of the work's authorship and initial publication in this
series.
2. Authors are able to enter into separate, additional contractual arrangements for the non-exclusive distribution of the series's published
version of the work (e.g., post it to an institutional repository or publish it in a book), with an acknowledgment of its initial
publication in this series.
3. Authors are permitted and encouraged to post their work online (e.g., in institutional repositories or on their website) prior to and
during the submission process, as it can lead to productive exchanges, as well as earlier and greater citation of published work (See
Open access policy for details).