Enhancing stock price prediction using machine learning techniques: a comparative analysis of ARIMA, LSTM with sentiment analysis, Transformers, and GPT-3

This project aims to explore the use of various machine learning techniques for predicting stock prices, focusing on Apple Inc. (AAPL) stock data from 2015 to 2019. Traditional models like ARIMA are compared with more advanced architectures, including Long Short-Term Memory (LSTM) networks and Trans...

Full description

Saved in:
Bibliographic Details
Main Author: Agarwal, Anusha
Other Authors: Long Cheng
Format: Final Year Project
Language:English
Published: Nanyang Technological University 2024
Subjects:
Online Access:https://hdl.handle.net/10356/181161
Tags: Add Tag
No Tags, Be the first to tag this record!
Institution: Nanyang Technological University
Language: English
Description
Summary:This project aims to explore the use of various machine learning techniques for predicting stock prices, focusing on Apple Inc. (AAPL) stock data from 2015 to 2019. Traditional models like ARIMA are compared with more advanced architectures, including Long Short-Term Memory (LSTM) networks and Transformer models. The study also investigates the impact of incorporating sentiment analysis, using Twitter data within the LSTM model. This is used to determine whether sentiment features improve predictive performance. Additionally, GPT-3 is studied to assess its usage in predicting stock prices based on historical data. The models are evaluated using key performance metrics such as Mean Squared Error (MSE), Mean Absolute Percentage Error (MAPE), and R2. Results indicate that advanced models like LSTM and Transformer significantly outperform traditional approaches like ARIMA. However, the incorporation of sentiment analysis did not lead to any substantial improvement in the performance of the LSTM model. GPT-3 demonstrated strong performance in predicting stock prices, even when tested on recent stock data indicating its flexibility to adapt to financial analysis even though its primary motive is to perform natural language processing. This project concludes that Transformer-based models, particularly those incorporating multiple features, offer the best performance for stock price prediction.