Amer, Ahmed2023-08-092023-08-0920232023-08-09http://hdl.handle.net/1828/15241Predicting the stock market is an infamous problem that many people have tried to solve. Can real time textual data in the form of tweets be used to predict stock movements? In this project, the use of different natural language processing methods are used to process twitter data to try to find out their sentiment. Furthermore, based on the sentiment, further analysis is done using machine learning techniques to try and predict next day returns for individual stocks. Two and Three different features were used to try and predict the next day's percentage change. The metrics used to assess the methodology were accuracy, precision and cumulative percentage gain or loss using a specific strategy or method. The results of this project suggest that using tweets as input for natural language processing and machine learning can achieve average accuracies and result in strategies that have consistently beaten the market in terms of cumulative returns.enAvailable to the World Wide WebNatural Language ProcessingMachine LearningNLPMLKNNRFK-Nearest NeigboursRandom ForestsStock Price Prediction Using Natural Language Processing and Machine Learningproject[1] D. E. Allen, M. McAleer, and A. K. Singh, “Daily market news sentiment and stock prices,” Applied Economics, vol. 51, no. 30, pp. 3212–3235, Feb. 2019, doi: https://doi.org/10.1080/00036846.2018.1564115. [2] A. Lopez-Lira and Y. Tang, “Can ChatGPT Forecast Stock Price Movements? Return Predictability and Large Language Models,” SSRN Electronic Journal, 2023, doi: https://doi.org/10.2139/ssrn.4412788. [3] [A. L. Hansen and S. Kazinnik, “Can ChatGPT Decipher Fedspeak?,” SSRN Electronic Journal, Mar 24, 2023, doi: https://doi.org/10.2139/ssrn.4399406. [4] Q. Xie, W. Han, Y. Lai, M. Peng, and J. Huang, “The Wall Street Neophyte: A Zero-Shot Analysis of ChatGPT Over MultiModal Stock Movement Prediction Challenges,” Apr. 2023, doi: https://doi.org/10.48550/arxiv.2304.05351. [5] Y. Soun, J. Yoo, M. Cho, J. Jeon and U. Kang, "Accurate Stock Movement Prediction with Self-supervised Learning from Sparse Noisy Tweets," 2022 IEEE International Conference on Big Data (Big Data), Osaka, Japan, 2022, pp. 1691-1700, doi:10.1109/BigData55660.2022.10020720. [6] J. Devlin, M.-W. Chang, K. Lee, and K. Toutanova, “BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding,” 2018, Article, Google AI Language, doi:10.48550/arxiv.1810.04805. [7] Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A. N., Kaiser, L., & Polosukhin, I. (2017). Attention Is All You Need., Article, 31st Conference on Neural Information Processing Systems, https://doi.org/10.48550/ARXIV.1706.03762