Stock market prediction using machine learning

Investors, economists, and researchers have always been interested in the stock market. Predicting stock prices accurately is challenging due to its complex nature, influenced by numerous factors, such as political events, economic indicators, and social media trends. Recently, machine learning mode...

Full description

Saved in:
Bibliographic Details
Main Author: Lim, Alloysius Zong Hong
Other Authors: Sourav S Bhowmick
Format: Final Year Project
Language:English
Published: Nanyang Technological University 2023
Subjects:
Online Access:https://hdl.handle.net/10356/166157
Tags: Add Tag
No Tags, Be the first to tag this record!
Institution: Nanyang Technological University
Language: English
Description
Summary:Investors, economists, and researchers have always been interested in the stock market. Predicting stock prices accurately is challenging due to its complex nature, influenced by numerous factors, such as political events, economic indicators, and social media trends. Recently, machine learning models have gained popularity in predicting stock prices due to their ability to analyze large amounts of data and detect patterns. This project aims to predict stock prices using machine learning, specifically the transformer model and time embedding. The project focuses on predicting the stock prices of technology companies such as Tesla and Google, using a dataset from Yahoo Finance comprising daily stock prices and volume data from January 1980 to March 2023. The project began with a comprehensive literature review that discusses traditional methods of stock prediction, time series models, and recurrent neural networks (RNN). The review reveals the limitations of these methods, such as handling large datasets, modeling long-term dependencies, and slow training times. To overcome these limitations, the project utilizes a transformer model and time embedding for stock prediction. The transformer model is a deep learning architecture, successful in natural language processing tasks and image recognition. Time embedding is a technique that encodes time- related features into a continuous vector space, allowing the model to learn long-term dependencies. The study evaluated the transformer model and time embedding's performance using Mean Average Error (MAE) and Mean Average Percentage Error (MAPE). The results showed that the transformer model and time embedding outperformed other traditional methods. These results demonstrate that the transformer model and time embedding are powerful tools for predicting stock prices and could provide valuable insights to investors. Overall, this project highlights the effectiveness of the transformer model and time embedding for stock prediction, providing a roadmap for future research in this area. The project's findings could assist in investment decision-making and improve stock price predictions' accuracy.