DOI QR코드

DOI QR Code

Stock Prediction Model based on Bidirectional LSTM Recurrent Neural Network

양방향 LSTM 순환신경망 기반 주가예측모델

  • Joo, Il-Taeck (Department of Computer Science, Dongshin University) ;
  • Choi, Seung-Ho (Department of Computer Science, Dongshin University)
  • Received : 2018.04.09
  • Accepted : 2018.04.19
  • Published : 2018.04.30

Abstract

In this paper, we proposed and evaluated the time series deep learning prediction model for learning fluctuation pattern of stock price. Recurrent neural networks, which can store previous information in the hidden layer, are suitable for the stock price prediction model, which is time series data. In order to maintain the long - term dependency by solving the gradient vanish problem in the recurrent neural network, we use LSTM with small memory inside the recurrent neural network. Furthermore, we proposed the stock price prediction model using bidirectional LSTM recurrent neural network in which the hidden layer is added in the reverse direction of the data flow for solving the limitation of the tendency of learning only based on the immediately preceding pattern of the recurrent neural network. In this experiment, we used the Tensorflow to learn the proposed stock price prediction model with stock price and trading volume input. In order to evaluate the performance of the stock price prediction, the mean square root error between the real stock price and the predicted stock price was obtained. As a result, the stock price prediction model using bidirectional LSTM recurrent neural network has improved prediction accuracy compared with unidirectional LSTM recurrent neural network.

본 논문에서는 시계열 데이터인 주가의 변동 패턴을 학습하고, 주가 가격을 예측하기 적합한 주가 예측 딥러닝 모델을 제시하고 평가하였다. 일반신경망에 시계열 개념이 추가되어 은닉계층에 이전 정보를 기억시킬 수 있는 순환신경망이 시계열 데이터인 주가 예측 모델로 적합하다. 순환신경망에서 나타나는 기울기 소멸문제를 해결하며, 장기의존성을 유지하기 위하여, 순환신경망의 내부에 작은 메모리를 가진 LSTM을 사용한다. 또한, 순환신경망의 시계열 데이터의 직전 패턴 기반으로만 학습하는 경향을 보이는 한계를 해결하기 위하여, 데이터의 흐름의 역방향에 은닉계층이 추가되는 양방향 LSTM 순환신경망을 이용하여 주가예측 모델을 구현하였다. 실험에서는 제시된 주가 예측 모델에 텐서플로우를 이용하여 주가와 거래량을 입력 값으로 학습을 하였다. 주가예측의 성능을 평가하기 위해서, 실제 주가와 예측된 주가 간의 평균 제곱근 오차를 구하였다. 실험결과로는 단방향 LSTM 순환신경망보다, 양방향 LSTM 순환신경망을 이용한 주가예측 모델이 더 작은 오차가 발생하여 주가 예측 정확성이 향상되었다.

Keywords

References

  1. Robert Engle, "GARCH 101: The use of ARCH/GARCH Models in Applied Econometrics," Journal of Economic Perspectives, vol. 15, no. 4, pp. 157-168, 2001. https://doi.org/10.1257/jep.15.4.157
  2. V. K. Menon, N. C. Vasireddy, S.A.Jami, V. T. Pedamallu, V. Sureshkumar, K. Soman, "Bulk price forecasting using spark over NSE data set," International Conference on Data Mining and Big Data. Springer, pp. 137-146, 2016.
  3. K. Chakraborty, K. Mehrotra, C.K. Mohan, Sanjay Ranka, "Forecasting the Behavior of Multivariate Time Series using Neural Network," Neural Networks vol. 5, pp. 961-970, 1992, https://doi.org/10.1016/S0893-6080(05)80092-9
  4. J. Roman, A. Jameel, "Backpropagation and recurrent neural networks in financial analysis of multiple stock market returns'" System Sciences, Proceedings of the Twenty-Ninth Hawaii International Conference on, vol. 2, pp. 454-460, 1996.
  5. E. W. Saad, D. V. Prokhorov, D. C. Wunsch, "Comparative study of stock trend prediction using time delay, recurrent and probabilistic neural networks," IEEE Transactions on Neural Networks, vol. 9, no. 6, pp. 1456- 1470, 1998. https://doi.org/10.1109/72.728395
  6. S. Hochreiter, J. Schmidhuber, J., "Long Short-Term Memory," Neural Computation, vol. 9, no. 8, pp. 1735-1780, 1997. https://doi.org/10.1162/neco.1997.9.8.1735
  7. T. Robinson. "An application of recurrent nets to phone probability estimation," IEEE Transactions on Neural Networks, vol. 5 no. 2, pp. 298-305, 1994. https://doi.org/10.1109/72.279192
  8. M. Schuster, K. K. Paliwal, "Bidirectional recurrent Neural Networks," IEEE Transactions on Signal Processing, vol. 45, no. 11, pp. 2673-2681, 1997. https://doi.org/10.1109/78.650093

Cited by

  1. 영어 리뷰데이터를 이용한 딥러닝 기반 다국어 감성분석 vol.19, pp.3, 2019, https://doi.org/10.7236/jiibc.2019.19.3.9
  2. Impact of COVID-19 on Forecasting Stock Prices: An Integration of Stationary Wavelet Transform and Bidirectional Long Short-Term Memory vol.2020, pp.None, 2018, https://doi.org/10.1155/2020/1846926
  3. 2D 레이싱 게임 학습 에이전트를 위한 강화 학습 알고리즘 비교 분석 vol.20, pp.1, 2018, https://doi.org/10.7236/jiibc.2020.20.1.171
  4. NTIS 시스템에서 딥러닝과 형태소 분석 기반의 대화형 검색 서비스 설계 및 구현 vol.10, pp.12, 2018, https://doi.org/10.22156/cs4smb.2020.10.12.009
  5. 강화학습을 이용한 트레이딩 전략 vol.22, pp.1, 2018, https://doi.org/10.5762/kais.2021.22.1.123
  6. 온라인 뉴스와 거시경제 지표, 금융 지표, 기술적 지표, 관심도 지표를 이용한 코스닥 상장 기업의 기계학습 기반 주가 변동 예측 vol.24, pp.3, 2018, https://doi.org/10.9717/kmms.2020.24.3.448
  7. Attention-Based STL-BiLSTM Network to Forecast Tourist Arrival vol.9, pp.10, 2021, https://doi.org/10.3390/pr9101759