Stock Price Prediction with Fluctuation Patterns Using Indexing Dynamic Time Warping and k^* -Nearest Neighbors

Various methods to predict stock prices have been studied. A typical method is based on time-series analysis; other methods are based on machine-learning techniques using cross-sectional data as feature values. In the field of empirical finance, feature values for prediction include “momentum”. The momentum strategy is simply based on past prices. Following the nearest trend, we buy current performers. From the different viewpoint from momentum, We’d like to challenge EMH. Our proposed method is following the similar trend. In other word, we look for past pattern similar to the current and predict from that. When predicting stock prices, investors sometimes refer to past markets that are similar to the current market. In this research, we propose a method to predict future stock prices with the past fluctuations similar to the current. As the levels of stock prices differ depending on the measured period, we develop a scaling method to compensate for the difference of price levels and the proposed new method; specifically, we propose indexing dynamic time warping (IDTW) to evaluate the similarities between time-series data. We apply the \(k^*\)-nearest neighbor algorithm with IDTW to predict stock prices for major stock indices and to assist users in making informed investment decisions. To demonstrate the advantages of the proposed method, we analyze its performance using major world indices. Experimental results show that the proposed method is more effective for predicting monthly stock price changes than other methods proposed by previous studies (Based on the comments received in Ai-Biz 2017, we clarified the differences from previous studies. And we added economic discussions about our proposed method such as differences from “momentum”, a challenge to Efficient Market Hypothesis and meanings as investment behavior).

[1]  E. Fama,et al.  The Cross‐Section of Expected Stock Returns , 1992 .

[2]  Clifford S. Asness,et al.  Value and Momentum Everywhere: Value and Momentum Everywhere , 2013 .

[3]  F. Itakura,et al.  Minimum prediction residual principle applied to speech recognition , 1975 .

[4]  M. Stone Cross‐Validatory Choice and Assessment of Statistical Predictions , 1976 .

[5]  Gwilym M. Jenkins,et al.  Time series analysis, forecasting and control , 1972 .

[6]  Ben Jacobsen,et al.  The Halloween Indicator, 'Sell in May and Go Away': Another Puzzle , 2001 .

[7]  E. Fama,et al.  Common risk factors in the returns on stocks and bonds , 1993 .

[8]  Vidhi Chhaochharia,et al.  “Sell in May and Go Away” Just Won’t Go Away , 2012 .

[9]  Kfir Y. Levy,et al.  k*-Nearest Neighbors: From Global to Local , 2017, NIPS.

[10]  Vidhi Chhaochharia,et al.  “Sell in May and Go Away” Just Won’t Go Away , 2013 .

[11]  Adriano Lorena Inácio de Oliveira,et al.  Expert Systems With Applications , 2022 .

[12]  Narasimhan Jegadeesh,et al.  Returns to Buying Winners and Selling Losers: Implications for Stock Market Efficiency , 1993 .

[13]  T. Bollerslev,et al.  Generalized autoregressive conditional heteroskedasticity , 1986 .

[14]  Hiroshi Nakagawa,et al.  Analysis of Long-term Market Trend by Text-Mining of News Articles , 2013 .

[15]  Eamonn J. Keogh,et al.  Scaling up dynamic time warping for datamining applications , 2000, KDD '00.

[16]  B. Mandelbrot The Variation of Certain Speculative Prices , 1963 .

[17]  José Manuel Benítez,et al.  On the use of cross-validation for time series predictor evaluation , 2012, Inf. Sci..

[18]  James D. Hamilton Time Series Analysis , 1994 .

[19]  E. Fama EFFICIENT CAPITAL MARKETS: A REVIEW OF THEORY AND EMPIRICAL WORK* , 1970 .

[20]  Mariana Sátiro Coelho Patterns in financial markets: Dynamic time warping , 2012 .