Developing a High-Frequency Trading system with Dynamic Portfolio Management using Reinforcement Learning in Iran Stock Market

Document Type : Research Paper

Authors

1 Assistant Prof., Faculty of Industrial Engineering, Tarbiat Modares University, Tehran, Iran

2 M.Sc. in Financial Engineering, Faculty of Financial Science, Kharazmi University, Tehran, Iran

Abstract

Objective: Presence of the considerable gap between the time of receiving the buy/sell signals and the beginning of the price change trend provides an appropriate situation for implementation of algorithmic trading systems. Tehran stock exchange is one of these markets. A high-frequency trading system has some advantages (exploiting intraday stock market volatility) and disadvantages (high amounts of transaction cost due to the high transaction volume), thus we can augment the advantages and control the disadvantages by designing the system elaborately and modifying the trading regulations.
Methods: In this research, the “Local Traders” approach has been utilized to predict the future trend of stock and Reinforcement Learning has been used for dynamic portfolio management. According to the “Local Traders” approach, there is a local trader (an agent) for each stock that is expert at it. It predicts the future trend of its own stock based on stock’s intraday data and their technical indicators by determining how beneficial it is to buy, sell or hold. In this research, 2 models will be proposed based on Local Traders. Based on the first one, trades with fixed lot size were sought by exploiting the local traders’ recommendations. In the second model which is an extension of first model, one can dynamically manages the portfolio using reinforcement learning and local traders’ recommendations.
Results:Results showed that, the proposed models outperformed the Buy and Hold strategy in Normal and Descending markets. Furthermore, in all kinds of markets, the second model outperformed the first one.
Conclusion: Generally, the Buy and Hold strategy works the best in an Ascending market, hence the proposed algorithms are not expected to outperform this strategy. However, the performance of the proposed approach along with Neural Network method to anticipate the future trend of stocks was considerable in Normal and Descending markets. In addition, the implementation of Reinforcement Learning model to dynamically manage the portfolio has improved the results.

Keywords

Main Subjects


References
Bohluli Khodadadi, M. (2010). Dynamic portfolio management using reinforcement learning. Master's Thesis.University of Economic Sciences, Tehran. (in Persian)
De la Fuente, D., Garrido, A., Laviada, J., & Gómez, A. (2006). Genetic algorithms to optimise the time to make stock market investment. InProceedings of the 8th annual conference on Genetic and evolutionary computation, 1857-1858. ACM.
Dempster M.A.H. & Romahi Y. (2002). Intraday FX Trading: An Evolutionary Reinforcement Learning Approach. In: Yin H., Allinson N., Freeman R., Keane J., Hubbard S. (eds) Intelligent Data Engineering and Automated Learning — IDEAL 2002. IDEAL 2002. Lecture Notes in Computer Science, vol 2412. Springer, Berlin, Heidelberg
Dempster, M. A. H. & Jones, C. M. (2002). Can channel pattern trading be successfully automated? The European Journal of Finance, 8 (3), 275-301.
Dempster, M. A. H., & Jones, C. M. (2000). The profitability of intra-day FX trading using technical indicators. Judge Institute of Management, University of Cambridge.
Dempster, M. A. H., Payne, T. W., Romahi, Y., & Thompson, G. W. P. (2001). Computational learning techniques for intraday FX trading using popular technical indicators. IEEE Transactions on Neural Networks, 12(4), 744-754.
Duda, R. O., Hard, P. E. & Stork, D. G. (2000). Pattern Classification. New York, Wiley-Interscience.
Duvinage, M., Mazza, P., & Petitjean, M. (2013). The intra-day performance of market timing strategies and trading systems based on Japanese candlesticks. Quantitative Finance, 13(7), 1059-1070.
Fan, A. & Palaniswami, M. (2001). Stock selection using support vector machines. Proceedings of the International Joint Conference on Neural Networks, 3, 1793-1798.
Gao, X. & Chan, L. (2000). An algorithm for trading and Portfolio Optimization using Q-Learning and Sharp Ration Maximization. Proceedings of the international conference on neural information processing, 832-837.
Jangmin, O., Lee, J. W., Lee, J., & Zhang, B. T. (2004). Dynamic asset allocation exploiting predictors in reinforcement learning framework. In European Conference on Machine Learning, Springer Berlin Heidelberg, 298-309.
Jangmin, O., Lee, J., Lee, J. W. & Zhang, B. (2005). Dynamic Asset Allocation for Stock Trading Optimized by Evolutionary Computation. IEICE Transactions on Information and Systems, 88 (6), 1217-1223.
Jangmin, O., Lee, J., Lee, J. W. & Zhang, B. T. (2006). Adaptive stock trading with dynamic asset allocation using reinforcement learning. Information Sciences, 176, 2121-2147.
Jones, C. M. (1999). Automated technical foreign exchange trading with high frequency data. Doctoral dissertation, University of Cambridge.
Kendall, S. M., & Ord, K. (1997). Time Series. New York, Oxford.
Lee, J. W., & Zhang, B. T. (2002). Stock trading system using reinforcement learning with cooperative agents. In Proceedings of the Nineteenth International Conference on Machine Learning, Morgan Kaufmann Publishers Inc, 451-458.
Lee, J. W., Park, J., Jangmin, O., Lee, J., & Hong, E. (2007). A multiagent approach to Q-learning for daily stock trading. IEEE Transactions on Systems, Man, and Cybernetics-Part A: Systems and Humans, 37(6), 864-877.
Lee, J. W., Sung-Dong, K. I. M., Jongwoo, L. E. E., & Jinseok, C. H. A. E. (2003). An intelligent stock trading system based on reinforcement learning. IEICE Transactions on Information and Systems, 86(2), 296-305.
Manahov, V., Hudson, R., & Gebka, B. (2014). Does high frequency trading affect technical analysis and market efficiency? And if so, how? Journal of International Financial Markets, Institutions and Money, 28, 131-157.
Mohamadi, Sh. (2004). Technical analysis in Tehran Stock Exchange. Financial Research Journal, 6(1), 97-129. (in Persian)
Moody, J. & Saffell, M. (2001). Learning to trade via direct reinforcement. IEEE Transactions on Neural Networks, 12(4), 875, 889.
Neely, C. J., & Weller, P. A. (2003). Intraday technical trading in the foreign exchange market. Journal of International Money and Finance, 22(2), 223-237.
Neuneier, R. (1998). Enhancing Q-learning for optimal asset allocation. Advances in Neural Information Processing Systems, 10, 936-942.
Oliver Mihatsch, R. N. (2002). Risk-Sensitive Reinforcement Learning. Machine Learning, 49, 267-290.
Raei, R. & Bajelan, S. (2007). Detecting and modeling of calendar effects in Tehran Stcok Exchange. Quarterly Journal of The Economic Research, 8 (4), 21-47. (in Persian)
Razmi, J., Julay, F., & Emami, A. (2007). A Bootstrap approach for comparing the profitability of technical analysis indicators – Tehran Stock Exchange. Journal of Economic Researchs, 85, 85-110. (in Persian)
Rodríguez-González, A., García-Crespo, Á., Colomo-Palacios, R., Iglesias, F.G. and Gómez-Berbís, J.M. (2011). CAST: Using neural networks to improve trading systems based on technical analysis by means of the RSI financial indicator. Expert systems with applications, 38(9), 11489-11500.
Saad, E. W., Prokhorov, D. V. & Wunsch, D. C. (1998). Comparative study of stock trend prediction using time delay, recurrent and probabilistic neural networks. IEEE Transactions on Neural Networks, 9(6), 1456-1470.
Samadi, S., Izadinia, N., & Davarzadeh, M. (2010). The application of exploiting technical analysis in Tehran Stock Exchange (an approach to moving average). Journal of Accounting Advances, 2(1), 121-154. (in Persian)
Setayesh, M., Taghizadeh, T., Poormoosa, A., & Abuzari, A. (2008). Feasibility of exploiting technical analysis indicators in predicting the price trend of stocks in Tehran Stock Exchange. Quarterly Basirat, 7, 155-177. (in Persian)
Sutton, R. S. & Barto, A. G. (1998). Reinforcement Learning: An Introduction. Cambridge, MIT Press.
Tanaka-Yamawaki, M., & Tokuoka, S. (2007). Adaptive use of technical indicators for the prediction of intra-day stock prices. Physica A: Statistical Mechanics and its Applications, 383(1), 125-133.
Watkins, C. (1989). Learning from delayed rewards, Ph.D, Cambridge University.
Yamamoto, R. (2012). Intraday technical analysis of individual stocks on the Tokyo Stock Exchange. Journal of Banking & Finance, 36(11), 3033-3047.