Predicting Future Stock Price with Sentiment Analysis: Recurrent vs. Attention Based Learning for Regression Tasks

dc.contributor.authorMcdonald, Bernard
dc.contributor.supervisorNasejje, Justine
dc.date.accessioned2024-11-15T16:45:07Z
dc.date.available2024-11-15T16:45:07Z
dc.date.issued2023-08
dc.descriptionThis dissertation is submitted for the degree of Master of Science, to the Faculty of Science, School of Statistics and Actuarial Science, University of the Witwatersrand, Johannesburg, 2023.
dc.description.abstractStock price prediction is a lucrative challenge as successful prediction could yield significant profits for investors – attracting research utilising novel data sources and modelling techniques. This research aimed to accurately predict the future closing price of the top five stocks of the NASDAQ100 index by leveraging Twitter data and recent advancements in machine learning. Three representations of large-scale Twitter data were derived: company, stock market, and general public sentiment. Company sentiment and stock market sentiment were Granger-causal (p < 0.10) for the closing price of four and two of the five companies considered, respectively. Five stock price prediction models were built: ARIMA, RNN, LSTM, GRU, and a novel Transformer model. A hyperparameter grid search selected feature subsets containing sentiment data as optimal in sixteen of the twenty (80%) model-dataset combinations fitted. Assessed using the RMSE, all the machine learning models outperformed the ARIMA model. The attention-based Transformer model outperformed the recurrent models in both predictive performance and model computational training efficiency. The model produced test RMSEs of 1.22, 2.07, 35.54, 16.61, and 4.95 when predicting the closing price of Apple, Microsoft, Amazon, Alphabet, and Facebook respectively.
dc.description.sponsorshipWits Post Graduate Merit Award.
dc.description.submitterMMM2024
dc.facultyFaculty of Science
dc.identifier0000-0002-7954-4611
dc.identifier.citationMcdonald, Bernard. (2023). Predicting Future Stock Price with Sentiment Analysis: Recurrent vs. Attention Based Learning for Regression Tasks. [Master's dissertation, University of the Witwatersrand, Johannesburg]. https://hdl.handle.net/10539/42615
dc.identifier.urihttps://hdl.handle.net/10539/42615
dc.language.isoen
dc.publisherUniversity of the Witwatersrand, Johannesburg
dc.rights©2023 University of the Witwatersrand, Johannesburg. All rights reserved. The copyright in this work vests in the University of the Witwatersrand, Johannesburg. No part of this work may be reproduced or transmitted in any form or by any means, without the prior written permission of University of the Witwatersrand, Johannesburg.
dc.rights.holderUniversity of the Witwatersrand, Johannesburg
dc.schoolSchool of Statistics and Actuarial Science
dc.subjectStock price
dc.subjectReccurent
dc.subjectAttention Based Learning
dc.subjectARIMA model
dc.subjectUCTD
dc.subject.otherSDG-4: Quality education
dc.titlePredicting Future Stock Price with Sentiment Analysis: Recurrent vs. Attention Based Learning for Regression Tasks
dc.typeDissertation
Files
Original bundle
Now showing 1 - 1 of 1
Loading...
Thumbnail Image
Name:
McDonald_Predicting_2023.pdf
Size:
46.54 MB
Format:
Adobe Portable Document Format
License bundle
Now showing 1 - 1 of 1
No Thumbnail Available
Name:
license.txt
Size:
2.43 KB
Format:
Item-specific license agreed upon to submission
Description: