Performance Evaluation of Machine Learning Algorithms for Stock Price and Stock Index Movement Prediction Using Trend Deterministic Data Prediction

Performance Evaluation of Machine Learning Algorithms for Stock Price and Stock Index Movement Prediction Using Trend Deterministic Data Prediction

Munish Khanna, Mohak Kulshrestha, Law K. Singh, Shankar Thawkar, Kapil Shrivastava
Copyright: © 2022 |Pages: 30
DOI: 10.4018/IJAMC.292511
Article PDF Download
Open access articles are freely available for download

Abstract

This experimental study addresses the problem of predicting the direction of stocks and the movement of stock price indices for three major stocks and stock indices. The proposed approach for processing input data involves the computation of ten technical indicators using stock trading data. The dataset used for the evaluation of all the prediction models consists of 11 years of historical data from January 2007 to December 2017. The study comprises four prediction models which are Long Short-Term Memory, XGBoost, Support Vector Machine ( and Random forests. Accuracy scores and F1 scores for each of the prediction models have been evaluated using this input approach. Experimental results reveal that a continuous data approach using ten technical indicators gives the best performance in the case of the Random Forest classifier model with the highest accuracy of 84.89% (average wise 83.74%) and highest F1 score of 89.33% (average wise 83.74%). The experiments also give us an insight into why a Naïve Bayes Classification model is not a suitable prediction model for the above task.
Article Preview
Top

1. Introduction

Everyone wants to earn money in the shortest possible time; stock market can be one of the instruments to fulfill such dreams. The stock market of a developing country like India has grown multi-folds during the last 30 years which is why it attracts plenty of investors. A major chunk of the community assumes that making money from the stock market is child’s play. Prediction of the stock price index along with its movement is an exigent task in time series prediction. Many macroeconomic factors such as firms’ policies, investors’ expectations, political scenarios, institutional investor’s choices, economic conditions, etc. have a significant impact on the way the stock market behaves. Meanwhile, smart investors always consult fundamental analysts or technical analysts before purchasing any script. In the case of fundamental analysis, various factors are taken into consideration before investing such as economic growth, demand and supply, political stability in the country. For a technical analyst, it is not a simple task to forecast script price index and movement due to the uncertainties involved. They focus on factors based on statistics such as volume per day, price movement above/below the daily moving average(DMA), trends and patterns and founded on these they suggest future movement. A study by (Malkiel & Fama,1970) suggests that data prediction of the stock price is possible based on trading. Various factors such as political circumstances, the image of the management of the company and purchasing/selling of the own script by management are generally reflected in the prices. Thus, if the information of previous stock prices can be proficiently pre-processed and if suitable algorithms are applied, and then it is possible to predict the trend of a stock or stock price index.

Several studies have already been conducted in the past by various researchers regarding the pricing of different stock market and stock index financial instruments. However, one factor that all such studies seem to exempt from their research is an examination of the predictability of the direction of the stock market movement. Predicting the direction of the stock market in the near future is of great importance and value to several types of stock market researchers and investors. Predicting the track of the stock market movement in the near future accurately gives numerous insights about shares to invest in, current market conditions, the economy of a region etc.

There are various studies already conducted dealing with stock direction prediction with the help of Artificial Neural Networks (ANN), specifically with the use of Backpropagation ANN referred to as BNN. But these studies were not able to predict the direction of market movement with much accuracy. One significant reason for it was that the BNN model does not take into account past trends of the stock market while making predictions. To overcome this shortcoming, the presented study makes use of an improvement in ANN models that is LSTM. This is a type of Recurrent Neural Network which has a memory element that helps in taking into account previous trends while making future predictions, thus improving the accuracy score.

XGBoost is a relatively new technique for ensemble machine learning. However, because of its performance and speed, it is gaining popularity among researchers and data scientists. It improves on the basic gradient boosting method.

Machine learning techniques such as Support Vector Machine (SVM) and Random Forest have proven to be extremely effective in time series forecasting, particularly in stock market prediction. These techniques are focused on developing accurate predictions for some variables given other variables. On the other hand, solutions generated by neural network models may be local optimal, whereas solutions generated by SVM and random forest may be global optimal.

As a case study for evaluating the performances of various shortlisted machine learning algorithms, standard data from reputable stocks and indexes was selected. Apple, Amazon, and Google are among the FAANG Stocks, an acronym for the world's five technology behemoths that trade publicly on the market. The S&P 500, Dow Jones Industrial Average, and Nasdaq Composite are the three most widely followed indices in the United States, accounting for a significant portion of the US equity market.

Complete Article List

Search this Journal:
Reset
Volume 15: 1 Issue (2024)
Volume 14: 1 Issue (2023)
Volume 13: 4 Issues (2022): 2 Released, 2 Forthcoming
Volume 12: 4 Issues (2021)
Volume 11: 4 Issues (2020)
Volume 10: 4 Issues (2019)
Volume 9: 4 Issues (2018)
Volume 8: 4 Issues (2017)
Volume 7: 4 Issues (2016)
Volume 6: 4 Issues (2015)
Volume 5: 4 Issues (2014)
Volume 4: 4 Issues (2013)
Volume 3: 4 Issues (2012)
Volume 2: 4 Issues (2011)
Volume 1: 4 Issues (2010)
View Complete Journal Contents Listing