A dynamic trading rule based on filtered flag pattern recognition for stock market price forecasting

We propose an automatic and dynamic trading rule based on flag pattern recognition.The strategy does not depend on the ability of the trader to guess the best configuration of the trading rule.We include several filters for the trades, one of them considering the EMA indicator in short and medium timeframes.The trading rule is applied on a large intraday database for the DJIA index.We can conclude that our proposal is far superior to the previous flag pattern strategies as regards both profitability and risk. In this paper we propose and validate a trading rule based on flag pattern recognition, incorporating important innovations with respect to the previous research. Firstly, we propose a dynamic window scheme that allows the stop loss and take profit to be updated on a quarterly basis. In addition, since the flag pattern is a trend-following pattern, we have added the EMA indicator to filter trades. This technical analysis indicator is calculated both for 15-min and 1-day timeframes, which enables short and medium terms to be considered simultaneously. We also filter the flags according to the price range on which they are developed and have limited the maximum loss of each trade to 100 points. The proposed methodology was applied to 91,309 intraday observations of the DJIA index, considerably improving the results obtained in the previous proposals and those obtained by the buy & hold strategy, both for profitability and risk, and also after taking into account the transaction costs. These results seem to challenge market efficiency in line with other similar studies, in the specific analysis carried out on the DJIA index and is also limited to the setup considered.

[1]  Ben Jacobsen,et al.  Predictability of the Simple Technical Trading Rules: An Out-of-Sample Test , 2012 .

[2]  P. Hansen A Test for Superior Predictive Ability , 2005 .

[3]  Jalil Heidary Dahooie,et al.  Wrapper ANFIS-ICA method to do stock market timing and feature selection on the basis of Japanese Candlestick , 2015, Expert Syst. Appl..

[4]  Russell L. Purvis,et al.  Stock market trading rule discovery using technical charting heuristics , 2002, Expert Syst. Appl..

[5]  Dimitrios D. Thomakos,et al.  An Improved Moving Average Technical Trading Rule∗ , 2011 .

[6]  Nuno Horta,et al.  Combining rules between PIPs and SAX to identify patterns in financial markets , 2016, Expert Syst. Appl..

[7]  Jar-Long Wang,et al.  Trading rule discovery in the US stock market: An empirical study , 2009, Expert Syst. Appl..

[8]  William Leigh,et al.  A computational implementation of stock charting: abrupt volume increase as signal for movement in New York Stock Exchange Composite Index , 2004, Decis. Support Syst..

[9]  Wen-Chyuan Chiang,et al.  An adaptive stock index trading decision support system , 2016, Expert Syst. Appl..

[10]  J. Goodman,et al.  Dictionary of Finance and Investment Terms , 1985 .

[11]  Achilleas Zapranis,et al.  A novel, rule-based technical pattern identification mechanism: Identifying and evaluating saucers and resistant levels in the US stock market , 2012, Expert Syst. Appl..

[12]  Pei-Chann Chang,et al.  A dynamic threshold decision system for stock trading signal detection , 2011, Appl. Soft Comput..

[13]  Ismail Hakki Toroslu,et al.  Heuristic based trading system on Forex data using technical indicator rules , 2016, Appl. Soft Comput..

[14]  Russell L. Purvis,et al.  Market timing: a test of a charting heuristic , 2002 .

[15]  Francisco Guijarro,et al.  Stock market trading rule based on pattern recognition and technical analysis: Forecasting the DJIA index with intraday data , 2015, Expert Syst. Appl..

[16]  Youngmin Kim,et al.  Developing a rule change trading system for the futures market using rough set analysis , 2016, Expert Syst. Appl..

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

[18]  Jar-Long Wang,et al.  Stock market trading rule discovery using pattern recognition and technical analysis , 2007, Expert Syst. Appl..

[19]  B. LeBaron,et al.  Simple Technical Trading Rules and the Stochastic Properties of Stock Returns , 1992 .

[20]  Joseph P. Romano,et al.  The stationary bootstrap , 1994 .

[21]  H. White,et al.  Data‐Snooping, Technical Trading Rule Performance, and the Bootstrap , 1999 .

[22]  Adriano Lorena Inácio de Oliveira,et al.  A method for automatic stock trading combining technical analysis and nearest neighbor classification , 2010, Expert Syst. Appl..

[23]  Stephan Schulmeister,et al.  The Profitability of Technical Stock Trading has Moved from Daily to Intraday Data , 2007 .

[24]  B. Malkiel The Efficient Market Hypothesis and Its Critics , 2003 .

[25]  Yong Hu,et al.  Stock trading rule discovery with an evolutionary trend following model , 2015, Expert Syst. Appl..

[26]  Russell L. Purvis,et al.  Forecasting the NYSE composite index with technical analysis, pattern recognizer, neural network, and genetic algorithm: a case study in romantic decision support , 2002, Decis. Support Syst..

[27]  Wei-Ho Chung,et al.  Using trading mechanisms to investigate large futures data and their implications to market trends , 2017, Soft Comput..

[28]  Pavel V. Sevastjanov,et al.  A Forex trading expert system based on a new approach to the rule-base evidential reasoning , 2016, Expert Syst. Appl..

[29]  Fei Wang,et al.  Combining technical trading rules using particle swarm optimization , 2014, Expert Syst. Appl..

[30]  Tai-liang Chen,et al.  An intelligent pattern recognition model for supporting investment decisions in stock market , 2016, Inf. Sci..

[31]  Simon Fong,et al.  Financial time series pattern matching with extended UCR Suite and Support Vector Machine , 2016, Expert Syst. Appl..

[32]  Cheolbeom Park,et al.  What Do We Know About the Profitability of Technical Analysis? , 2007 .

[33]  Yong Hu,et al.  Application of evolutionary computation for rule discovery in stock algorithmic trading: A literature review , 2015, Appl. Soft Comput..

[34]  H. White,et al.  A Reality Check for Data Snooping , 2000 .

[35]  Pavel V. Sevastjanov,et al.  A new approach to the rule-base evidential reasoning: Stock trading expert system application , 2010, Expert Syst. Appl..

[36]  Xi Chen,et al.  Integrating piecewise linear representation and weighted support vector machine for stock trading signal prediction , 2013, Appl. Soft Comput..

[37]  Shangkun Deng,et al.  Integrated Model of Multiple Kernel Learning and Differential Evolution for EUR/USD Trading , 2014, TheScientificWorldJournal.