React based web-application for stock price forecasting with a novel stacking algorithm
Accurately predicting the stock market could help traders incur significant profits. However, intrinsic volatility in the stock market, coupled with its nonlinear and dynamic nature makes the task of stock price forecasting challenging. Predicting trends in stock market prices has thus been an area...
Saved in:
Main Author: | |
---|---|
Other Authors: | |
Format: | Final Year Project |
Language: | English |
Published: |
Nanyang Technological University
2022
|
Subjects: | |
Online Access: | https://hdl.handle.net/10356/156510 |
Tags: |
Add Tag
No Tags, Be the first to tag this record!
|
Institution: | Nanyang Technological University |
Language: | English |
id |
sg-ntu-dr.10356-156510 |
---|---|
record_format |
dspace |
spelling |
sg-ntu-dr.10356-1565102022-04-19T05:41:28Z React based web-application for stock price forecasting with a novel stacking algorithm Mittal, Madhav Ng Wee Keong School of Computer Science and Engineering AWKNG@ntu.edu.sg Engineering::Computer science and engineering Accurately predicting the stock market could help traders incur significant profits. However, intrinsic volatility in the stock market, coupled with its nonlinear and dynamic nature makes the task of stock price forecasting challenging. Predicting trends in stock market prices has thus been an area of interest for researchers for many years. The recent technological advances have led to an increase in the computational power of computers as well as the amount of readily accessible data. This has allowed for the implementation of extremely complicated machine learning systems that solve large-scale complex problems at extremely fast speeds. A plethora of machine learning based stock forecasting models have since been introduced. Today, the majority of the research papers that attempt stock price forecasting utilize machine learning models. Gradient Boosting Machines (GBMs) are an example of one such machine learning algorithm that is widely used in the field of stock price forecasting. GBM’s have been around for more than twenty years, however, they have recently received a revival in popularity, in the form of modern Gradient-Boosted Decision Trees such as Extreme Gradient Boosting (XgBoost) [1] in 2014 and Light Gradient Boosting Machine (LightGBM) [2] in 2017. This paper aims to build an XgBoost model by finding the optimal data features and hyperparameters required for the task of stock price forecasting. It proposes a novel ensemble using model stacking, that utilizes XgBoost, Supported Vector Regressor and Linear Regressor as the base models, and Linear Regressor as the meta-learner. It is concluded that this ensemble outperforms all the other models tested in the paper. The models are evaluated using three error metrics –Root Mean Square Error (RMSE), Mean Absolute Percentage Error (MAPE) and Mean Absolute Error (MAE). The model performances are compared against a threshold performance of the “Last Value” algorithm. The “Last Value” algorithm is a naïve algorithm that assumes zero volatility in the data and thus sets all forecasts to be the value of the last observation. The data is collected through the Yahoo Finance API. Additionally, the paper discusses the ideation and design processes of an interactive cross-platform React based web-application. Finally, it integrates the web-application with the Stacked XgBoost model using Flask. Bachelor of Engineering (Computer Engineering) 2022-04-19T05:41:28Z 2022-04-19T05:41:28Z 2022 Final Year Project (FYP) Mittal, M. (2022). React based web-application for stock price forecasting with a novel stacking algorithm. Final Year Project (FYP), Nanyang Technological University, Singapore. https://hdl.handle.net/10356/156510 https://hdl.handle.net/10356/156510 en SCSE21-0081 application/pdf Nanyang Technological University |
institution |
Nanyang Technological University |
building |
NTU Library |
continent |
Asia |
country |
Singapore Singapore |
content_provider |
NTU Library |
collection |
DR-NTU |
language |
English |
topic |
Engineering::Computer science and engineering |
spellingShingle |
Engineering::Computer science and engineering Mittal, Madhav React based web-application for stock price forecasting with a novel stacking algorithm |
description |
Accurately predicting the stock market could help traders incur significant profits. However, intrinsic volatility in the stock market, coupled with its nonlinear and dynamic nature makes the task of stock price forecasting challenging. Predicting trends in stock market prices has thus been an area of interest for researchers for many years.
The recent technological advances have led to an increase in the computational power of computers as well as the amount of readily accessible data. This has allowed for the implementation of extremely complicated machine learning systems that solve large-scale complex problems at extremely fast speeds. A plethora of machine learning based stock forecasting models have since been introduced. Today, the majority of the research papers that attempt stock price forecasting utilize machine learning models.
Gradient Boosting Machines (GBMs) are an example of one such machine learning algorithm that is widely used in the field of stock price forecasting. GBM’s have been around for more than twenty years, however, they have recently received a revival in popularity, in the form of modern Gradient-Boosted Decision Trees such as Extreme Gradient Boosting (XgBoost) [1] in 2014 and Light Gradient Boosting Machine (LightGBM) [2] in 2017.
This paper aims to build an XgBoost model by finding the optimal data features and hyperparameters required for the task of stock price forecasting. It proposes a novel ensemble using model stacking, that utilizes XgBoost, Supported Vector Regressor and Linear Regressor as the base models, and Linear Regressor as the meta-learner. It is concluded that this ensemble outperforms all the other models tested in the paper.
The models are evaluated using three error metrics –Root Mean Square Error (RMSE), Mean Absolute Percentage Error (MAPE) and Mean Absolute Error (MAE). The model performances are compared against a threshold performance of the “Last Value” algorithm. The “Last Value” algorithm is a naïve algorithm that assumes zero volatility in the data and thus sets all forecasts to be the value of the last observation. The data is collected through the Yahoo Finance API.
Additionally, the paper discusses the ideation and design processes of an interactive cross-platform React based web-application. Finally, it integrates the web-application with the Stacked XgBoost model using Flask. |
author2 |
Ng Wee Keong |
author_facet |
Ng Wee Keong Mittal, Madhav |
format |
Final Year Project |
author |
Mittal, Madhav |
author_sort |
Mittal, Madhav |
title |
React based web-application for stock price forecasting with a novel stacking algorithm |
title_short |
React based web-application for stock price forecasting with a novel stacking algorithm |
title_full |
React based web-application for stock price forecasting with a novel stacking algorithm |
title_fullStr |
React based web-application for stock price forecasting with a novel stacking algorithm |
title_full_unstemmed |
React based web-application for stock price forecasting with a novel stacking algorithm |
title_sort |
react based web-application for stock price forecasting with a novel stacking algorithm |
publisher |
Nanyang Technological University |
publishDate |
2022 |
url |
https://hdl.handle.net/10356/156510 |
_version_ |
1731235786268868608 |