Author: Chen_H wechat & QQ: 862251340 wechat official account: Coderpai My blog: please click here

Link to paper: arxiv

1. Abstract

In this paper, the author proposes a neural network architecture to predict stock prices, using some technical analysis indicators of stocks as data sources. First of all, the author develops a model training set and test set to convert financial stock sequence data into a series of buying and selling signals. Then, I studied all the Dow stocks from 1997 to 2007. The authors used the Apache Spark Big data framework for the training process and finally tested the model with data from 2007 to 2017. The results show that the neural network model can achieve better strategy results in most cases by selecting the most appropriate technical indicators. In addition, fine tuning of technical indicators and/or optimization strategies can improve overall trading performance.

2. Data processing

There are many technical indicators in the stock market. Here we mainly choose three: RSI, MACD and Williams %R (WR).

2.1 Relative Strength Index (RSI)

The relative strength Index (RSI) is a technical momentum indicator that shows the historical strength and weakness of stock prices. It also compares losses and gains over a specific time period, using the following formula:

2.2 Convergence and Convergence (MACD)

MACD is a technical indicator of stock price movements. It is the difference between the 12-day exponential moving average (EMA) and the 26-day moving average (EMA). The specific formula is as follows:

2.3 Williams %R (WR)

The Williams indicator is a momentum-based technical indicator that shows overbought and oversold changes in stock prices. The specific formula is as follows:

3. Model analysis

In this paper, the author uses two models: one is financial sequence model, which is used to process raw data and get our points and selling points; The other is a neural network model used to predict buying and selling points.

3.1 Financial sequence model

We write models that automatically analyze the peaks and troughs in stock history data to get buy and selling point data.

3.2 Neural network model

The neural network model has a total of four layers, namely an input layer (4 nodes), two hidden layers (5 nodes and 4 nodes) and an output layer (3 nodes). The data we input are close Price, RSI, WR and MACD. The output data is buy, sell and do not operate (three categories). The specific model is as follows:

The complete algorithm steps of the paper can be summarized as follows:


CoderPai is a platform that focuses on algorithms in action, from basic algorithms to artificial intelligence algorithms. If you are interested in algorithms in action, please follow us. Join AI combat wechat group, AI combat QQ group, ACM algorithm wechat group, ACM algorithm QQ group. For details, please pay attention to the wechat account CoderPai.