DOI QR코드

DOI QR Code

Prediction of the direction of stock prices by machine learning techniques

기계학습을 활용한 주식 가격의 이동 방향 예측

  • Received : 2021.06.19
  • Accepted : 2021.07.21
  • Published : 2021.10.31

Abstract

Prediction of a stock price has been a subject of interest for a long time in financial markets, and thus, many studies have been conducted in various directions. As the efficient market hypothesis introduced in the 1970s acquired supports, it came to be the majority opinion that it was impossible to predict stock prices. However, recent advances in predictive models have led to new attempts to predict the future prices. Here, we summarize past studies on the price prediction by evaluation measures, and predict the direction of stock prices of Samsung Electronics, LG Chem, and NAVER by applying various machine learning models. In addition to widely used technical indicator variables, accounting indicators such as Price Earning Ratio and Price Book-value Ratio and outputs of the hidden Markov Model are used as predictors. From the results of our analysis, we conclude that no models show significantly better accuracy and it is not possible to predict the direction of stock prices with models used. Considering that the models with extra predictors show relatively high test accuracy, we may expect the possibility of a meaningful improvement in prediction accuracy if proper variables that reflect the opinions and sentiments of investors would be utilized.

금융시장에서 주식 가격 자체 또는 가격의 방향성에 대한 예측은 오래 전부터 관심의 대상이 되어 왔기에 여러 방면에서 다양한 연구가 이어져 왔다. 특히 1960년대에 들어서며 많은 연구가 진행되었고 예측가능성에 대해 찬반의 의견들이 있었는데, 1970년대에 나타난 효율적 시장 가설이 지지를 받으면서 주식 가격의 예측은 불가능하다는 의견이 주를 이루었다. 그러나 최근 기계학습 등 예측기술의 발달로 인해 주식 시장에서 미래를 예측해 보려는 새로운 시도가 이어져, 주식시장의 효율성을 부정하고 높은 예측력을 주장하는 연구들이 등장하고 있다. 이 논문에서는 과거 연구들을 평가방법 별로 정리하고, 새로운 주장의 신빙성을 확인하기 위해 이차판별분석, support vector machine, random forest, extreme gradient boost, 심층신경망 등 다양한 기계학습 모형을 적용하여 한국유가증권시장에 상장된 종목 중 삼성전자, LG화학, Naver 주식 가격의 방향성을 예측해보았다. 이때, 널리 사용되는 기술적 지표 변수들과 더불어 price earning ratio, price book-value ratio 등 회계지표를 활용한 변수와, 은닉마르코프모형의 출력값 변수를 사용하였다. 분석결과, 이번 연구의 조건 하에서는 통계적으로 유의미한 예측력을 제시하는 모형이 존재하지 않았고, 현 시점에서 단기 주가 방향성의 예측은 어렵다고 판단되었다. 비교적 단순한 이차판별분석 모형과 회계지표를 활용한 변수를 추가한 모형이 상대적으로 높은 예측력을 보였다는 점에서, 복잡한 모형을 시도하기 보다는 주식 가격에 대한 투자자들의 의견 및 심리가 반영될 수 있는 다양한 변수를 개발하여 활용한다면 향후 유의미한 예측이 가능할 수도 있을 것이다.

Keywords

Acknowledgement

이 논문은 정부(과학기술정보통신부)의 재원으로 한국연구재단의 지원을 받아 수행된 연구임(No. 2021R1F1A1048986)

References

  1. Abouloula K, Habil BE, and Krit S (2018). Money management limits to trade by robot trader for automatic trading , International Journal of Engineering, Science and Mathematics, 7, 195-206.
  2. Akgiray V (1989). Conditional heteroscedasticity in time series of stock returns: evidence and forecasts, Journal of Business, 62, 55-80. https://doi.org/10.1086/296451
  3. Appel G (2005). Technical Analysis Power Tools for Active Investors, FT Press, Upper Saddle River.
  4. Basak S, Kar S, Saha S, Khaidem L, and Dey SR (2019). Predicting the direction of stock market prices using tree-based classifiers, North American Journal of Economics and Finance, 47, 552-567. https://doi.org/10.1016/j.najef.2018.06.013
  5. Breiman L (2001). Random forests, Machine Learning, 45, 5-32. https://doi.org/10.1023/A:1010933404324
  6. Bussiere M (2013). In defense of early warning signals, ' Banque De France Working Paper, 420.
  7. Chen T and Guestrin C (2016). XGBoost: A scalable tree boosting system. In KDD'16: Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, 785-794.
  8. Cheng TCE, Lo YK, and Ma KW (1990). Forecasting stock price index by multiple regression, Managerial Finance, 16, 27-31 https://doi.org/10.1108/eb013637
  9. Chong TT and Ng W (2008). Technical analysis and the London stock exchange: testing the MACD and RSI rules using the FT30, Applied Economics Letters, 15, 1111-1114. https://doi.org/10.1080/13504850600993598
  10. Cowles A (1933). Can stock market forecasters forecast, Econometrica, 1, 309-324. https://doi.org/10.2307/1907042
  11. Cristianini N and Shawe-Taylor J (2000). An Introduction to Support Vector Machines and Other Kernel-based Learning Methods, Cambridge University Press, Cambridge.
  12. Dsouze JF and Mallikarjunappa T (2015). Do the stock market indices follow random walk?, Asia-Pacific Journal of Management Research and Innovation, 11, 251-273. https://doi.org/10.1177/2319510x15602969
  13. Durusu-Ciftci D, Ispir MS, and Kok D (2019). Do stock markets follow a random walk? New evidence for an old question, International Review of Economics and Finance, 64, 165-175. https://doi.org/10.1016/j.iref.2019.06.002
  14. Fama EF (1970). Efficient capital markets: A review of theory and empirical work, Journal of Finance, 25, 383-417. https://doi.org/10.1111/j.1540-6261.1970.tb00518.x
  15. Farshchian M and Jahan MV (2015). Stock market prediction with hidden Markov model, International Congress on Technology, Communication and Knowledge, 473-477.
  16. Fletcher R (1987). Practical Methods of Optimization, John Wiley & Sons Ltd, Chichester.
  17. Granville JE (1976). Granville's New Strategy of Daily Stock Market Timing for Maximum Profit, Simon & Schuster, New York.
  18. Gu S, Kelly B, and Xiu D (2020). Empirical asset pricing via machine learning, Review of Financial Studies, 33, 2223-2273. https://doi.org/10.1093/rfs/hhaa009
  19. Gupta A and Dhingra B (2012). Stock market prediction using hidden Markov models, Students Conference on Engineering and Systems, 16-18.
  20. Huang W, Nakamori Y, and Wang SY (2005). Forecasting stock market movement direction with support vector machine, Computers and Operations Research, 32, 2513-2522. https://doi.org/10.1016/j.cor.2004.03.016
  21. Hwang H (2018). Daily stock price forecasting using deep neural network model, Journal of the Korea Convergence Society, 9, 39-44.
  22. Ikoku AE, Hosseini A, and Okany CT (2010). Can price-earnings ratios predict stock prices?, The International Journal of Finance, 4, 6581-6611.
  23. Kim H and Seong B (2016). EMD based hybrid models to forecast the KOSPI, The Korean Journal of Applied Statistics, 29, 525-537. https://doi.org/10.5351/KJAS.2016.29.3.525
  24. Kim M, Min S, and Han I (2006). An evolutionary approach to the combination of multiple classifiers to predict a stock price index, Expert Systems with Applications, 31, 241-247. https://doi.org/10.1016/j.eswa.2005.09.020
  25. Kim S and Lee D (1997). Extended forecasts of a stock index using learning techniques : A study of predictive granularity and input diversity, Asia Pacific Journal of Information Systems, 7, 67-83. https://doi.org/10.1046/j.1365-2575.1997.00005.x
  26. Kolodner JL (1993). Case-Based Reasoning, Morgan Kaufmann Publishers, Massachusetts.
  27. Larson M (2015). Price Rate of Change: 12 Simple Technical Indicators: That Really Work, Wiley, New Jersey
  28. Metghalchi M, Chang Y, and Garza-Gomez X (2012). Technical analysis of the Taiwanese stock market, International Journal of Economics and Finance, 4, 90-102.
  29. Kim D, Oh H, and Suh J (2009). A multi-resolution approach to non-stationary financial time series using the Hilbert-Huang transform, Korean Journal of Applied Statistics, 22, 499-513. https://doi.org/10.5351/KJAS.2009.22.3.499
  30. Rabiner L and Juang B (1986). An introduction to hidden Markov models, IEEE ASSP Magazine, 3, 4-16. https://doi.org/10.1109/MASSP.1986.1165342
  31. Ren R, Wu DD, and Liu T (2019). Forecasting stock market movement direction using sentiment analysis and support vector machine, IEEE Systems Journal, 13, 760-770. https://doi.org/10.1109/jsyst.2018.2794462
  32. Sopipan N, Kanjanavajee W, and Sattayatham P (2012). Forecasting SET50 index with multiple regression based on principal component analysis, Journal of Applied Finance & Banking, 2, 271-294.
  33. Tharwat A (2016). Linear vs. quadratic discriminant analysis classifier: a tutorial, International Journal of Applied Pattern Recognition, 3, 145-180. https://doi.org/10.1504/IJAPR.2016.079050
  34. Umstead DA (1977). Forecasting stock market prices, Journal of Finance, 32, 427-441. https://doi.org/10.1111/j.1540-6261.1977.tb03282.x
  35. Wang J and Kim J (2018). Predicting stock price trend using MACD optimized by historical volatility, Mathematical Problems in Engineering, ID 9280590, 1-12
  36. Wang JJ, Wang JZ, Zhang ZG, and Guo SP (2012). Stock index forecasting based on a hybrid model, Omega, 40, 758-766. https://doi.org/10.1016/j.omega.2011.07.008
  37. Zhao Y, Yang M, and Qi C (2008). Forecast stock market returns based on risk anticipation, International Conference on Information Management, Innovation Management and Industrial Engineering, 2, 377-380.