## 2 Background and Literature Review
### Deep Learning in Stock Prediction  
With the enormous growth of financial data in volume and complexity, machine-learning algorithms provide powerful tools to extract patterns from data processed all across the global. For many years, stock prediction always has drawn attention to the development of intelligent trading systems. There are substantial benefits to be gained from stock prediction for security selection and quantitative investment analysis.  
In practice, stock prediction can be conducted by fundamental analysis, technical analysis, and sentiment analysis. Fundamental analysis is the most conventional use, which tries to determine a stock's value or price based on financial statements such as income statement, balance sheet, and cash-flow statement. In other words, the main objective of fundamental analysis is to estimate a company's intrinsic value. Fundamental signals have a positive and significant correlation with future earnings performance [21]. Fundamental analysis is the prerequisite investigation for value investing as known as long-term investing. In contrast, technical analysis typically begins with charts and technical indicators based on historical data. Technical analysis is usually used to predict short- to medium-term time horizons. An artificial neural network-based stock trading system using technical analysis and big data framework has been proposed in the work of [22]. The results have shown that, by choosing the most appropriate technical indicators, the neural network model can obtain comparable results against the buy and hold strategy in most of the cases. Furthermore, fine-tuning the technical indicators and/or optimization strategy can enhance the overall trading performance.  
In the short-term, the stock market is irrational movement by the effect of emotion trading. Sentiment analysis is the new trend for stock prediction based on finding the correlation between public sentiment and market sentiment. The results show that social media content can give an impact on stock price via sentiment analysis [23; 24]. On the effort of improving the prediction accuracy, many studies have been conducted by combining multiple analysis approaches [25; 26].  
Recently, there is considerable interest in stock prediction using deep learning methods. Deep learning techniques have been receiving a lot of attention lately, with breakthroughs in image processing and natural language processing. However, its application to finance does not yet seem to be commonplace. It has been used for limit order book modeling, financial sentiment analysis, volatility prediction, and portfolio optimization [27; 28; 29; 30]. With the effort to decompose and eliminate the noise of the stock price time-series data, the wavelet transform was used. Features are extracted from the decomposed data using stacked autoencoders, and then the high-level de-noising features are fed into long short-term memory (LSTM) to build the model and forecast the next day's closing price [31]. Stock price exchange rates are forecasted by improving the deep belief network (DBN). The structure of the DBN is optimally determined through experiments and, to accelerate the speed of learning rate, conjugate gradient methods are applied. The model shows more efficiency at foreign exchange rate prediction compared with the feedforward network (FFNN) [32]. In the work of [33], the recurrent neural network was introduced and used, however, it suffers from the vanishing gradient problem. The vanishing gradient problem was improved in the LSTM and GRU model. The LSTM model has update, input, forget, and output gates, and maintains the internal memory state and applies a non-linearity(sigmoid) before the output gate, whereas GRU has only update and reset gates.