DOI QR코드

DOI QR Code

A Study on the stock price prediction and influence factors through NARX neural network optimization

NARX 신경망 최적화를 통한 주가 예측 및 영향 요인에 관한 연구

  • Cheon, Min Jong (Division of Information System, Hanyang University) ;
  • Lee, Ook (Division of Information System, Hanyang University)
  • 전민종 (한양대학교 정보시스템학과) ;
  • 이욱 (한양대학교 정보시스템학과)
  • Received : 2020.05.13
  • Accepted : 2020.08.07
  • Published : 2020.08.31

Abstract

The stock market is affected by unexpected factors, such as politics, society, and natural disasters, as well as by corporate performance and economic conditions. In recent days, artificial intelligence has become popular, and many researchers have tried to conduct experiments with that. Our study proposes an experiment using not only stock-related data but also other various economic data. We acquired a year's worth of data on stock prices, the percentage of foreigners, interest rates, and exchange rates, and combined them in various ways. Thus, our input data became diversified, and we put the combined input data into a nonlinear autoregressive network with exogenous inputs (NARX) model. With the input data in the NARX model, we analyze and compare them to the original data. As a result, the model exhibits a root mean square error (RMSE) of 0.08 as being the most accurate when we set 10 neurons and two delays with a combination of stock prices and exchange rates from the U.S., China, Europe, and Japan. This study is meaningful in that the exchange rate has the greatest influence on stock prices, lowering the error from RMSE 0.589 when only closing data are used.

주식 시장은 기업 실적 및 경기 상황뿐만 아니라 정치, 사회, 자연재해 등 예기치 못한 요소들에 영향을 받는다. 이런 요소들을 고려한 정확한 예측을 위해서 다양한 기법들이 사용된다. 최근 인공지능 기술이 화두가 되면서 이를 활용한 주가 예측 시도 또한 이루어지고 있다. 본 논문은 단순히 주식 관련 데이터뿐만 아닌, 거시 경제적 지표 등을 활용한 여러 종류의 데이터를 이용하여 주가에 영향을 미치는 요소에 관한 연구를 제안한다. KOSDAQ을 대상으로 1년 치 종가, 외국인 비율, 금리, 환율 데이터를 다양하게 조합한 후에 딥러닝의 Nonlinear AutoRegressive with eXternal input (NARX) 모델을 활용한다. 이 모델을 통해 1달 치 데이터를 생성하고 각 데이터 조합을 통해 만들어진 예측값을 RMSE를 통해 실제값과 비교, 분석한다. 또한, 은닉층에서 뉴런의 수, 지연 시간을 다양하게 설정하여 RMSE를 비교한다. 분석 결과 뉴런은 10개, 지연 시간은 2로 설정하고, 데이터는 미국, 중국, 유럽, 일본 환율의 조합을 사용할 때 RMSE 0.08을 보이며 가장 낮은 오차를 기록하였다. 본 연구는 환율이 주식에 가장 영향을 많이 미친다는 점과 종가 데이터만 사용했을 때의 RMSE 값인 0.589에서 오차를 낮췄다는 점에 의의가 있다.

Keywords

References

  1. Ji Hye Son, "Number of active stock accounts are about 30 millions", UPI news, Available From: https://upinews.kr/newsView/upi202001200035 (accessed March, 24, 2020)
  2. Tae Ki Won, "KB Stock launches non face-to-face service 'Open Trade'", Joseilbo, Available From : http://m.joseilbo.com/news/view.htm?newsid=391680 #_enliple (accessed March 23, 2020)
  3. Y. R. Song, H. G. Kim, D. H. Han, "A study on the Effective Relationship between Macroeconomic Variables and Stock Prices based on a Multi-Factor Model", The e-Business Studies , Vol. 10, No. 3, pp. 97-128, 2009. DOI: http://dx.doi.org/10.15719/geba.10.3.200909.97
  4. J. Y. Heo, J. Y. Yang, "SVM based Stock Price Forecasting Using Financial Statements", KISE Transactions on Computing Practices, Vol. 21, No. 3, pp. 167-172, 2015. DOI: https://dx.doi.org/10.5626/KTCP.2015.21.3.167
  5. D. H. Shin, K. H. Choi, C. B. Kim, "Deep Learning Model for Prediction Rate Improvement of Stock Price Using RNN and LSTM", The Journal of Korean Institute of Information Technology , Vol. 15, No. 10, pp. 9-16, 2017. DOI: https://doi.org/10.14801/jkiit.2017.15.10.9
  6. H. M. Jeong, J. H. Park, "Short-term Electric Load Forecsting in Winter and Summer Seasons using Narx Nueral Network", The Transactions of the Korean Institute of Electrical Engineers , Vol. 66, No. 7, pp. 1001-1006, 2017. DOI: https://doi.org/10.5370/KIEE.2017.66.7.1001
  7. Z. Boussada, O. Curea, A. Remaci, H. Camblong, N. M. Bellaaj, "A Nonlinear Auto Regressive Exogenous (NARX) Neural Network Model for th Prediction of the Daily Direct Solar Radiation", Energies , Vol. 11, No. 3, 2018. DOI: https://doi.org/10.3390/en11030620
  8. H. Y. Shen, L. C. Chang, "Online Multistep-ahead Inundation Depth Forecasts by Recurrent NARX Networks", Hydrol Earth Syst. Sci , 17 pp. 935-945, 2013. DOI: https://doi.org/10.5194/hess-17-935-2013
  9. Y. J. Song, J. W. Lee, J. W. Lee, "A Design and Implementation of Deep Learning Model for Stock Prediction using Tensorflow", The Korean Institute of Information Scientists and Engineers , KIISE Transactions on Computing Practices , Jeju, Korea, Vol. 2017, No. 66, pp. 799-801, 2017. DOI: https://doi.org/10.5626/KTCP.2017.23.11.625
  10. B. K. Chang, "The Impact of Exchange Rate and Interest Rate on Financial Institutions' Stock Returns and Volatility", Journal of The Korean Data Analysis Society , Vol. 14, No. 3, pp. 1,645-1,658, 2012.
  11. Y. G. Shin, "A Study for Trends of Stock Trading Value by Foreign Investors in the Korean Stock Market", Journal of the Korean Data Analysis Society , Vol. 9, No. 5, pp. 2383-2391, 2007.
  12. H. S. Kim, H. J. Shin, "Electricity Price Prediction Based on Semi-Supervised Learning and Neural Network Algorithms", Journal of the Korean Institute of Industrial Engineers , Vol. 39, No. 1, pp. 30-45, 2013. DOI: http://dx.doi.org/10.7232/JKIIE.2013.39.1.030
  13. S. N. S. Abdullah, A. Khamis, "Forecasting Wheat Price Using Backpropagation And NARX Neural Network", International Journal of Engineering Science, Vol. 3, No. 11, pp. 19-26, 2014.
  14. H. Singh, "Understanding Gradient Boosting Machines", Towards data science, Available From : https://towardsdatascience.com/understanding-gradie nt-boosting-machines-9be756fe76ab (accessed April 10, 2020)
  15. I. T. Joo, S. H. Choi, "Stock Prediction Model based on Bidirectional LSTM Recurrent Neural Network", The Journal of Korea Institute of Information, Electronics, and Communication Technology, Vol. 11, No. 2, pp. 204-208, 2018. DOI: https://doi.org/10.17661/jkiiect.2018.11.2.204