Applications of deep learning in stock market prediction: recent progress — part 1/5

Cleaned-text code points [0, 15848). Bibliography omitted here; source.md includes it.

# Applications of deep learning in stock market prediction: recent progress

###### Abstract

Stock market prediction has been a classical yet challenging problem, with the attention from both economists and computer scientists. With the purpose of building an effective prediction model, both linear and machine learning tools have been explored for the past couple of decades. Lately, deep learning models have been introduced as new frontiers for this topic and the rapid development is too fast to catch up. Hence, our motivation for this survey is to give a latest review of recent works on deep learning models for stock market prediction. We not only category the different data sources, various neural network structures, and common used evaluation metrics, but also the implementation and reproducibility. Our goal is to help the interested researchers to synchronize with the latest progress and also help them to easily reproduce the previous studies as baselines. Base on the summary, we also highlight some future research directions in this topic.

###### Keywords:

## 1 Introduction

Stock market prediction is a classical problem in the intersection of finance and computer science. For this problem, the famous efficient market hypothesis (EMH) gives a pessimistic view and implies that financial market is efficient [ Fama, 1965 ] , which maintains that technical analysis or fundamental analysis (or any analysis) would not yield any consistent over-average profit to investors. However, many researchers disagree with EMH [ Malkiel, 2003 ] . Some studies are trying to measure the different efficiency levels for mature and emerging markets, while other studies are trying to build effective prediction models for stock markets, which is also the scope of this survey.

The effort starts with the stories of fundamental analysis and technical analysis. Fundamental analysis evaluates the stock price based on its intrinsic value, i.e. , fair value, while technical analysis only relies on the basis of charts and trends. The technical indicators from experience can be further used as hand-crafted input features for machine learning and deep learning models. Afterwards, linear models are introduced as the solutions for stock market prediction, which include autoregressive integrated moving average (ARIMA) [ Hyndman & Athanasopoulos, 2018 ] and generalized autoregressive conditional heteroskedasticity (GARCH) [ Bollerslev, 1986 ] . With the development of machine learning models, they are also applied for stock market prediction, e.g. , Logistic regression and support vector machine [ Alpaydin, 2014 ] .

Our focus in this survey would be the latest emerging deep learning, which is represents by various structures of deep neural networks [ Goodfellow et al., 2016 ] . Powered by the collection of big data from the Web, the parallel processing ability of graphics processing units (GPUs), and the new convolutional neural network family, deep learning has achieved a tremendous success in the past few years, for many different applications including image classification [ Rawat & Wang, 2017 , Jiang & Zhang, 2020 ] , object detection [ Zhao et al., 2019 ] , time series prediction [ Brownlee, 2018 , Jiang & Zhang, 2018 ] , etc. With a strong ability of dealing with big data and learning the nonlinear relationship between input features and prediction target, deep learning models have shown a better performance than both linear and machine learning models on the tasks that include stock market prediction.

In the past few years, both the basic tools for deep learning and the new prediction models are undergoing a rapid development. With the continuous improved programming packages, it becomes easier to implement and test a novel deep learning model. Also, the collection of online news or twitter data provides new sources of predicting stock market. More recently, graph neural networks using various knowledge graph data appear as new ideas. The study for stock market prediction is not limited to the academia. Attracted by the potential profit by stock trading powered by the latest deep learning models, asset management companies and investment banks are also increasing their research grant for artificial intelligence which is represented by deep learning models nowadays.

Since there are many new developments in this area, this situation makes it difficult for a novice to catch up with the latest progress. To alleviate this problem, we summarize the latest progress of deep learning techniques for stock market prediction, especially those which only appear in the past three years. We also present the trend of each step in the prediction workflow in these three years, which would help the new-comers to keep on the right track, without wasting time on obsolete technologies.

We focus on the application of stock market, however, machine learning and deep learning methods have been applied in many financial problems. It would be beyond the scope of this survey to cover all these problems. However, the findings presented in this survey would also be insightful for other time series prediction problems in the finance area, e.g. , exchange rate or cryptocurrency price prediction.

We also pay a special attention to the implementation and reproducibility of previous studies, which is often neglected in similar surveys. The list of open data and code from published papers would not only help the readers to check the validity of their findings, but also implement these models as baselines and make a fair comparison on the same datasets. Based on our summary of the surveyed papers, we try to point out some future research directions in this survey, which would help the readers to choose their next movement.

Our main contribution in this survey are summarized as follows: 1. We summarize the latest progress of applying deep learning techniques to stock market prediction, especially those which only appear in the past three years.

2. We give a general workflow for stock market prediction, based on which the previous studies can be easily classified and summarized. And the future studies can refer to the previous work in each step of the workflow.

3. We pay a special attention to implementation and reproducibility, which is often neglected in similar surveys.

4. We point out several future directions, some of which are on-going and help the readers to catch up with the research frontiers.

The rest of this survey is organize as follows: Section 2 presents related work; Section 3 gives an overview of the papers we cover; Section 4 describes the major findings in each step of the prediction workflow; Section 5 gives the discussion about implementation and reproducibility; Section 6 points up some possible future research directions; We conclude this survey in Section 7.

## 2 Related Work

Stock market prediction has been a research topic for a long time, and there are some review papers accompanied with the development and flourishment of deep learning methods prior to our work. While their focus could also be applications of deep learning methods, stock market prediction could only be one example of many financial problems in these previous surveys. In this section, we list some of them in a chronological order and discuss our motivation and unique perspectives.

Back to 2009, Atsalakis & Valavanis [2009] surveys more than 100 related published articles that focus on neural and neuro-fuzzy techniques derived and applied to forecast stock markets, with the discussion of classifications of input data, forecasting methodology, performance evaluation and performance measures used. Li & Ma [2010] gives a survey on the application of artificial neural networks in forecasting financial market prices, including the forecast of stock prices, option pricing, exchange rates, banking and financial crisis. Nikfarjam et al. [2010] surveys some primary studies which implement text mining techniques to extract qualitative information about companies and use this information to predict the future behavior of stock prices based on how good or bad are the news about these companies.

Aguilar-Rivera et al. [2015] presents a review of the application of evolutionary computation methods to solving financial problems, including the techniques of genetic algorithms, genetic programming, multi-objective evolutionary algorithms, learning classifier systems, co-evolutionary approaches, and estimation of distribution algorithms. Cavalcante et al. [2016] gives an overview of the most important primary studies published from 2009 to 2015, which cover techniques for preprocessing and clustering of financial data, for forecasting future market movements, for mining financial text information, among others. Tkáč & Verner [2016] provides a systematic overview of neural network applications in business between 1994 and 2015 and reveals that most of the research has aimed at financial distress and bankruptcy problems, stock price forecasting, and decision support, with special attention to classification tasks. Besides conventional multilayer feedforward network with gradient descent backpropagation, various hybrid networks have been developed in order to improve the performance of standard models.

More recently, Xing et al. [2018] reviews the application of cutting-edge NLP techniques for financial forecasting, which would be concerned when text including the financial news or twitters is used as input for stock market prediction. Rundo et al. [2019] covers a wider topic both in the machine learning techniques, which include deep learning, but also the field of quantitative finance from HFT trading systems to financial portfolio allocation and optimization systems. Nti et al. [2019] focuses on the fundamental and technical analysis, and find that support vector machine and artificial neural network are the most used machine learning techniques for stock market prediction. Based on its review of stock analysis, Shah et al. [2019] points out some challenges and research opportunities, including issues of live testing, algorithmic trading, self-defeating, long-term predictions, and sentiment analysis on company filings.

Different from other related works that cover more papers from the computer science community, Reschenhofer et al. [2019] reviews articles covered by the Social Sciences Citation Index in the category “Business, Finance” and gives more insight on economic significance. It also points out some problems in the existing literature, including unsuitable benchmarks, short evaluation periods, and nonoperational trading strategies.

Some latest reviews are trying to cover a wider range, e.g., Shah et al. [2019] covers machine learning techniques applied to the prediction of financial market prices, and Sezer et al. [2019] covers more financial instruments. However, our motivation is to catch up with the research trend of applying deep learning techniques, which have been proved to outperform traditional machine learning techniques, e.g., support vector machine in most of the publications, with only a few exceptions, e.g., Ballings et al. [2015] finds that Random Forest is the top algorithm followed by Support Vector Machines, Kernel Factory, AdaBoost, Neural Networks, K-Nearest Neighbors and Logistic Regression, and Ersan et al. [2019] finds that K-Nearest Neighbor and Artificial Neural Network both outperform Support Vector Machines, but there is no obvious pros and cons between the performances of them. With the accumulation of historical prices and diverse input data types, e.g., financial news and twitter, we think the advantages of deep learning techniques would continue and it is necessary to keep updated with this trend for the future research.

Compared with Sezer et al. [2019] , whose focus is deep learning for financial time series forecasting and a much longer time period (from 2005 to 2019 exactly), we focus on the recent progress in the past three years (2017-2019) and a narrower scope of stock price and market index prediction. For readers who are also interested in other financial instruments, e.g., commodity price, bond price, cryptocurrency price, etc., we would refer them to this work. We also care more about the implementation workflow and result reproducibility of previous studies, e.g., dataset and code availability, which is a problem that has drawn the attention from the AI researchers [ Gundersen & Kjensmo, 2018 ] . We would also pay more attention to the uniqueness of stock market prediction (or financial time series forecasting) from general time series prediction problems, e.g., the evaluation of profitability besides prediction accuracy.

## 3 Overview

In this section, we give an overview of the papers we are going to review in this study. All the works are searched and collected from Google Scholar, with searching keywords such as deep learning, stock prediction, stock forecasting, etc. Most of the covered papers (115 out of 124) are published in the past three years (2017-2019). In total, we cover 56 journal papers, 58 conference papers and 10 preprint papers. These preprint papers are all from arXiv.org, which is a famous website for e-print archive and we cover these papers to keep updated with the latest progress. The top source journals & conferences sorted by the number of papers we cover in this study are shown in Table 1 and Table 2 , respectively.

In this study, the major focus would be the prediction of the close prices of individual stocks and market indexes. Some financial instrument whose price is bounded to the market index is also covered, e.g., some exchange-traded fund (ETF) or equity index futures that track the underlying market index. For intraday prediction, we would also cover mid-price prediction for limit order books. Other financial instruments are not mentioned in this study, e.g., bond price and cryptocurrency price. More specifically, if the target to predict the specific value of the prices, we classify it as a regression problem, and if the target is to predict the price movement direction, e.g., going up or down, we classify it as a classification problem. Most studies are considering the daily prediction (105 of 124) and only a few of them are considering the intraday prediction (18 of 124), e.g., 5-minute or hourly prediction. Only one of the 124 papers is considering both the daily and intraday situations [ Liu & Wang, 2019 ] .

Based on the target output and frequency, the prediction problems can be classified into four types: daily classification (52 of 124), daily regression (54 of 124), intraday classification (8 of 124) and intraday regression (11 of 124). A detailed paper count of different prediction problem types is shown in Figure 1 . The reason behind this could be partially justified by the difficulty of collecting the corresponding data. The daily historical prices and news titles are easier to collect and process for research, while the intraday data is very limited in the academia. We would further discuss the data availability in Section 5 .

Surveyed markets as well as the most famous stock market index in these markets are shown in the Table 3 . The paper count of different surveyed markets is shown in Figure 2 1 1 1 An exception of using Europe for Ballings et al. [2015] , in which 5767 publicly listed European companies are covered. . Most of the studies would focus on one market, while some of them would evaluate their models on multiple markets 2 2 2 Due to the differences of trading rules, we list mainland China, Hong Kong and Taiwan separately. . Both mature markets (e.g., US) and emerging markets (e.g., China) are gaining a lot of attention from the research community in the past three years.

## 4 Prediction Workflow