Predicting Equity Price with Corporate Action Events Using LSTM-RNN

Show more

1. Introduction

In the practice of stock asset management business, forecasting the stock price is one of the important tasks. Stock prices are ultimately determined by supply and demand, but some investors judge buying and selling by examining the company’s future performance, and some investors judge only by looking at the movement of stock prices. Also, there are some investors who judge the under and over-valued stocks with reference to stock market index such as PER and PBR. Some investors buy because it is a favorite company. Thus, it is not easy to predict future stock prices because stock prices are determined by market participants with various perspectives and ideas.

The method of predicting stock prices from the company’s future performance includes, for example, a discounted cash flow model that seeks the present value of the future cash flow generated as a result of dividend discount model by discounting future stock dividend to its present value or as a result of company’s business. In addition, in the magnification method which considers that the stock price is composed by EPS (net earnings per share) and PER (price to earnings ratio), assuming that PER does not change; if EPS doubles in future because of strong performance, the stock price is also considered to be doubled. It is expected that at least it will converge to the stock price level in the long term.

The person who analyzes individual companies focuses on the announcement of company’s financial results that is published quarterly by many companies and daily press releases because by knowing the progress of results, it is significant to judge whether the prospects so far have been correct and to what extent the future growth of the company can be expected. The stock price rises if there is information that a lot of investors think about enhancing corporate value in the future. Thus, information such as announcement of company’s financial results and press releases has a very important meaning in predicting future stock prices. In addition, it can be said that stock prices in the past include the speculation of investors who have judged based on such information [1] .

Although it is difficult to know at what point of time the information presented is affecting the stock price, it seems that the LSTM-RNN will be an effective means to make prediction of stock price incorporating such situations.

2. About Related Research

Most neural networks are used for image-based analysis. However, Recurrent Neural Network (RNN) has been used in recent years to predict future events in time series as well. The LSTM-RNN (Long Short-Term Memory Recurrent Neural Network) proposed in this paper is a type of Recurrent Neural Network. Since it avoids the gradient problem that occurs when learning long-term series data in normal RNN, it is also possible to learn long-term time dependence and short-term time dependence. LSTM-RNN was developed from background which appeared from the problem keeping past information in the network which cannot be handled by the conventional RNN, as we want to acquire and replace the information only when it is necessary.

I will explain related research in which forecast of stock price was made using LSTM-RNN.

As for the research applied only to the stock price, Murtaza et al. [2] compared the accuracy of forecast of the stock price by LSTM-RNN when the stock price of NIFTY50 stocks of National Stock Exchange of India is combined with the data of Open, Close, High, and Low respectively. As a result, it was shown that it is most desirable to perform prediction using four data. In addition, Qun et al. [3] made prediction about the opening stock price of individual stocks considering emotion data acquired from the Shanghai General Index and the information in the Forum as variable. In conclusion it seems that better results have been obtained than by applying the traditional RNN. It is known that LSTM-RNN has high effect when applied in time series data analysis. However, there is a possibility that it can be a means of an effective forecast model depending on the method of setting the model from the viewpoint of predicting the stock price as in the earlier thesis.

Therefore, in this paper, I have proposed a method of stock forecasting that incorporates corporate events by using LSTM-RNN. Specifically, I will pick up a specific company and predict the future stock price using the announcement date of the financial results, press release of corporate action, and the order backlog published by that company for investors as the variables to predict future stock prices.

There are two aspects namely, practical social significance and academic significance in this paper. In practical social significance, when we predict the price, it is difficult to adapt to a sudden price change using the traditional statistical model (ARCH model, pure regression model et al.). However, there is a possibility to adapt to the sudden price change using learning method like LSTM-RNN. On the other hand in academic significance, there is no other research that includes the timing of events using LSTM-RNN. And it easily extends to add on the positive/negative information to the events in future research. Therefore, the model proposed by me can be expected to be a promising method as a first trial.

3. Stock Price Time Series Prediction Using LSTM-RNN

3.1. Model

When ${x}_{t}$ is an input value (vector) at time t and ${h}_{t}$ is output value, LSTM-RNN is formulated as follows.

${f}_{t}={\sigma}_{g}\left({W}_{f}{x}_{t}+{U}_{f}{h}_{t-1}+{b}_{f}\right)$ (1)

${i}_{t}={\sigma}_{g}\left({W}_{i}{x}_{t}+{U}_{i}{h}_{t-1}+{b}_{i}\right)$ (2)

${o}_{t}={\sigma}_{g}\left({W}_{o}{x}_{t}+{U}_{o}{h}_{t-1}+{b}_{o}\right)$ (3)

${c}_{t}={f}_{t}\odot {c}_{t-1}+{i}_{t}\odot {\sigma}_{c}\left({W}_{c}{x}_{t}+{U}_{c}{h}_{h-t}+{b}_{c}\right)$ (4)

${h}_{t}={o}_{t}\odot {\sigma}_{h}\left({c}_{t}\right)$ (5)

${c}_{t}$ is the state vector of the memory cell; W, U, and b are the parameter matrices and vectors. Further, ${f}_{t}$ represents an oblivion gate which is a weight vector for storing old information, ${i}_{t}$ represents an input gate which is a weight vector for obtaining new information, and ${o}_{t}$ represents an output gate for outputting a vector of output candidates. Among the activation functions, ${\sigma}_{g}$ is a sigmoid function, and ${\sigma}_{c\mathrm{,}h}$ are hyperbolic tangent functions.

3.2. Data

I analyzed the stock price of Tsugami Corporation (Securities Code: 6101) as an analysis target. Tsugami Corporation, a machine tool manufacturer, is a global niche company making automatic lathe machines. Since the majority of production and sales are in China, corporate performance depends largely on overseas orders as well as domestic orders. In addition, as the domestic market is shrinking, the company is progressing with the policies to transfer the foundation of our business to overseas, and at the same time we have also announced clear capital policy. So, it has actively announced corporate actions such as transfer of production factories, acquiring treasury stocks and stock options. Tsugami may also be classified as cyclical stock company in addition to being a small and medium-sized stock. The stock price is likely to be responsive to transition in domestic and overseas orders of the previous month, when the company announced the macro index (machine tool orders) and press releases of the corporate action.

The variables used for this analysis in addition to stock prices are event information (press release) that the company publishes on Companies Investor Relations Website, the backlog of domestic and overseas orders of the company, and machine tool orders provided by the Cabinet Office. The event information is considered as variable by dividing the information into the one which is related to the statutory disclosure such as the date of announcement of the financial results, and the information which is related to corporate actions such as acquisition of Treasury stock and issue of stock options.

The reason why I selected the Tsugami Corporation is Tugami has many events like corporate actions and is affected by market conditions. Generally, stock price of a company which has small capitalization and low liquidity, is easily affected by corporate actions and market condition.

For the monthly and quarterly macro indices to be analyzed on a daily basis, polynomial spline interpolation is performed. The period of the used data is from April 15th to September 11th, 2013 which can be acquired by sharing between the data. The event information is encoded in a numerical value as ID in the course of data cleaning. The lag is taken into account so that the data can be used for predictions from the day after it is published. 700 days out of the total 1082 days are the training period and the remaining period of 3% is the test period.

3.3. Verification of the Model

It is preferable that there is no deviation from the actual value if you assume the actual operation. Therefore, I decided to evaluate the model using RMSE (Root Mean Squared Error).

$\text{RMSE}=\sqrt{\frac{1}{N}{\displaystyle \sum}{\left({\stackrel{^}{y}}_{t}-{y}_{t}\right)}^{2}}$ (6)

${\stackrel{^}{y}}_{t}$ is the predicted value, ${y}_{t}$ is the actual value.

3.4. Implementation

It is based on LSTM-RNN proposed by Hochreiter et al. [4] . When calculating, Epoch number was calculated with three patterns of 50, 100, and 500 at the time of learning. The number of units of the hidden layer was 50, and of the LSTM layer was 1. As a learning framework, Keras was implemented on the front end and Tensorflow was implemented on the back end. I set the learning rate by Adam (Adaptive Moment Estimation) in order to optimize the stochastic gradient descent method [5] [6] . In addition, I used GeForce GTX 1060 3GB for GPU.

4. Verification Result

Table 1 shows Epoch number-wise summary for each RMSE considering the cases of using only the stock price, cases of using only the event, cases of using order backlog and macro index released by the company, and the cases of using all of the event, order backlog, and the macro index respectively as the variable to be explained. When the event is considered, the prediction error is generally smaller than the prediction using only the stock price. When macro index is used, prediction error is small only when Epoch number is 500. When all cases were considered as variables, the result would be less accurate. In practice, it is important to predict how much the actual value will rise or fall.

5. Conclusions

In this study, I tried to predict future stock prices by incorporating the event information and the order backlog issued by a specific company using LSTM- RNN. I compared the cases when only using stock price, when only the event was used, when the order backlog released by the company and the machine tool order which is the macro index were used, and when all of the event, the backlog and the macro index were used as a variable to be explained, and examined how much the difference between the predicted value and the actual value of the stock price differs. As a result, it was found that there was smallest error in the actual value in prediction using only the event. Even if the calculation is done by changing Epoch number, the trend will not change. So, the event information may be effective for predicting future stock price of the concerned company.

However, this paper is intended to propose time series prediction that takes such an event into consideration, and it is desirable to carry out a long-term analysis to improve the accuracy of analysis. If it is possible to get more long- term financial data in the future, the result is expected to be more satisfactory.

The model proposed in this study has the potential for a wide range of application in the financial world. It is interesting to try to analyze each individual

Table 1. RMSE.

company as the variables that affect the stock price may vary from company to company. In addition, it is also possible to perform the same analysis in overseas because not only domestic companies but also the listed companies are required to disclose regular information such as statutory disclosure documents and financial statements.

In this study, there was only information that there was an event, but it might be the one that gave the positive/negative attribute to the information with regards to further research. It would rather be appropriate to consider this event as an input to explain the stock price. In addition to predicting stock prices, it can also be applied to predict the macro index from the order status disclosed by the company. If it can be applied to evaluate the timing of acquisition of optimum treasury stock, it can be useful for companies as well. It is a future task.

Acknowledgements

This paper does not represent the official view of Asuka Asset Management Co., Ltd. to which the author belongs. Everything is the personal opinion.

References

[1] Shotaro, M. and Mitsusada, Y. (2017) Possibility and Limitations of Application of AI to Asset Management Business. Securities Analyst Journal, 55, 16-26.

https://www.saa.or.jp/dc/sale/apps/journal/JournalShowDetail.do?goDownload=itmNo=34508

[2] Roondiwala, M., Patel, H. and Varma, S. (2015) Predicting Prices Using LSTM. International Journal of Science and Research, 1754-1756.

https://www.ijsr.net/archive/v6i4/ART20172755.pdf

[3] Zhuge, Q., Xu, L.Y. and Zhang, G.W. (2015) LSTM Neural Network with Emotional Analysis for Prediction of Stock Price. Engineering Letters, 25, 167-175.

http://www.engineeringletters.com/issues_v25/issue_2/EL_25_2_09.pdf

[4] Hochreiter, S. and Schmidhuber, J. (1997) Long Short-Term Memory. Neural computation, 9, 1735-1780.

https://doi.org/10.1162/neco.1997.9.8.1735

[5] Brownlee, J. (2017) Long Short-Term Memory Networks with Python Develop Sequence Prediction Models with Deep Learning. Machine Learning Mastery, EBook.

[6] Arratia, A. (2014) Computational Finance: An Introductory Course with R. Atlantis Press, Amsterdam.

https://doi.org/10.2991/978-94-6239-070-6