Designing a Stock Recommender System Using the Collaborative Filtering Algorithm for the Tehran Stock Exchange

Document Type : Research Paper

Authors

1 Ph.D., Department of Financial Engineering, Faculty of Economic, Management and Accounting, Yazd University, Yazd, Iran.

2 MSc., Department of Electrical Engineering, Faculty of Electrical Engineering, Amir Kabir University of Technology (Tehran Polytechnic), Tehran, Iran.

3 Associate Prof, Department of Finance Management, Yazd University, Yazd, Iran.

Abstract

Objective
With the increasing volume of information and the complexity of financial markets, investors are increasingly seeking innovative financial tools to make more informed decisions. These tools should help investors choose the right stocks and achieve better returns. In this regard, stock recommendation systems are becoming increasingly important. Stock recommendation systems can assist investors in achieving superior returns by selecting the right stocks. However, traditional stock recommendation systems often lack the necessary accuracy and efficiency. This research aims to develop a novel approach called Stock-based Collaborative Filtering to design a stock recommendation system for the Tehran Stock Exchange. This method is founded on two key assumptions: first, market inefficiency, meaning the stock market does not completely and accurately reflect all available information; and second, the presence of hidden information in stock movements, indicating that these movements contain valuable insights that can influence the prices of other stocks in the market. In this research, assuming the existence of the transmission effect on the Tehran Stock Exchange, we used the collaborative filtering technique, a common algorithm in recommender systems, to design a stock recommender system. The purpose is to help investors select the best-performing stocks to outperform the market.
 
 
Methods
This study uses historical stock price data of 145 firms listed on the Tehran Stock Exchange from 2012 to 2021. The collaborative filtering algorithm was implemented in two stages: training and testing. In the training stage, the algorithm was trained using data from 2012 to 2016, and in the testing stage, its performance was evaluated on data from 2016 to 2021. Following, buy and sell signals were generated using the stock-based collaborative filtering algorithm during the same period. Finally, the strategy was evaluated.
 
Results
The algorithm was tested as an investment strategy in both in-sample and out-of-sample periods. The results obtained from the algorithm for the out-of-sample periods show that this strategy can achieve a 25-fold return. The overall index returned 16 times during this period, indicating the excellent performance of the strategy over time. Additionally, the value at risk (VaR) for the selected method during the study period stood at -12.8%, indicating the lower risk of this method.
 
Conclusion
Stock-based collaborative filtering is an active investment strategy. This intelligent algorithm aims to identify undervalued stocks and achieve higher returns than the market. This algorithm can serve as a valuable tool for active investors seeking to identify valuable stocks and achieve higher returns than the market. Therefore, further research is necessary to examine the performance of this algorithm in different markets and diverse economic conditions. Also, it is recommended to implement risk control strategies and optimize the system's efficacy further.

Keywords

Main Subjects


 
Adomavicius, G. & Tuzhilin, A. (2005). Toward the next generation of recommender systems: A survey of the state-of-the-art and possible extensions. IEEE Transactions on Knowledge and Data Engineering, 17(6), 734–749.
Avramov, D., Kaplanski, G. & Levy, H. (2018). Talking Numbers: Technical versus fundamental investment recommendations. Journal of Banking & Finance, 92, 100–114.
Bag, V. & Kulkarni, U. V. (2017). Stock Price Trend Prediction and Recommendation using Cognitive Process. International Journal of Rough Sets and Data Analysis (IJRSDA), 4(2), 36–48.
Baldauf, B. & Santoni, G. J. (1991). Stock price volatility: some evidence from an ARCH model. The Journal of Futures Markets (1986-1998), 11(2), 191.
Barber, B. M. & Odean, T. (2013). The behavior of individual investors. In Handbook of the Economics of Finance (Vol. 2, pp. 1533–1570). Elsevier.
Breese, J. S., Heckerman, D. & Kadie, C. (2013). Empirical analysis of predictive algorithms for collaborative filtering. ArXiv Preprint ArXiv:1301.7363.
Chavarnakul, T. & Enke, D. (2008). Intelligent technical analysis based equivoque charting for stock trading using neural networks. Expert Systems with Applications, 34(2), 1004–1017.
Chong, T. T.L. & Ng, W.K. (2008). Technical analysis and the London stock exchange: testing the MACD and RSI rules using the FT30. Applied Economics Letters, 15(14), 1111–1114.
Davallou, M. & Tabarsa, B. (2020). The Style Momentum and Its Origin. Financial Research Journal, 22(3), 320–342. https://doi.org/10.22059/frj.2020.288887.1006924. (in Persian)
De Campos, L. M., Fernández-Luna, J. M., Huete, J. F., & Rueda-Morales, M. A. (2010). Combining content-based and collaborative recommendations: A hybrid approach based on Bayesian networks. International journal of approximate reasoning, 51(7), 785-799.
de Oliveira, F. A., Nobre, C. N. & Zarate, L. E. (2013). Applying Artificial Neural Networks to prediction of stock price and improvement of the directional prediction index–Case study of PETR4, Petrobras, Brazil. Expert Systems with Applications, 40(18), 7596–7606.
De Rossi, G., Kolodziej, J., & Brar, G. (2020). A recommender system for active stock selection. Computational Management Science, 17(4), 517-547.
Dickson, G. K. (2015). Assessing the Performance of Active and Passive Trading On the Ghana Stock Exchange. University of Ghana.
Dowd, K. (2007). Measuring market risk. John Wiley & Sons.
Du, Y. & Li, S. (2004). Industrial value chain: the innovative format of value strategy [J]. Studies in Science of Science, 5.
Ewing, B. T. (2002). The transmission of shocks among S&P indexes. Applied Financial Economics, 12(4), 285–290.
Fama, E. F. (1995). Random walks in stock market prices. Financial Analysts Journal, 51(1), 75–80.
Fernandez Rodriguez, F., Sosvilla-Rivero, S. & Andrada Félix, J. (1999). Technical analysis in the Madrid stock exchange.
Guo, H. & Savickas, R. (2006). Idiosyncratic volatility, stock market volatility, and expected stock returns. Journal of Business & Economic Statistics, 24(1), 43–56.
Hsu, Y.T., Liu, M.C., Yeh, J. & Hung, H.-F. (2009). Forecasting the turning time of stock market based on Markov–Fourier grey model. Expert Systems with Applications, 36(4), 8597–8603.
Jondeau, E. & Rockinger, M. (2006). The copula-garch model of conditional dependencies: An international stock market application. Journal of International Money and Finance, 25(5), 827–853.
Karolyi, G. A. (1995). A multivariate GARCH model of international transmissions of stock returns and volatility: The case of the United States and Canada. Journal of Business & Economic Statistics, 13(1), 11–25.
Kimoto, T., Asakawa, K., Yoda, M. & Takeoka, M. (1990). Stock market prediction system with modular neural networks. 1990 IJCNN International Joint Conference on Neural Networks, 1–6.
Koutmos, G. & Booth, G. G. (1995). Asymmetric volatility transmission in international stock markets. Journal of International Money and Finance, 14(6), 747–762.
Li, G.-D., Yamaguchi, D. & Nagai, M. (2008). The development of stock exchange simulation prediction modeling by a hybrid grey dynamic model. The International Journal of Advanced Manufacturing Technology, 36(1–2), 195–204.
Musto, C., Semeraro, G., Lops, P., De Gemmis, M. & Lekkas, G. (2015). Personalized finance advisory through case-based recommender systems and diversification strategies. Decision Support Systems, 77, 100–111.
Nti, I. K., Adekoya, A. F., Weyori, B. A., Ballings, M., Van den Poel, D., Hespeels, N. & Gryp, R. (2015). A systematic review of fundamental and technical analysis of stock market predictions. Artificial Intelligence Review, 42(20), 1–51.
Nourahmadi, M. & Sadeqi, H. (2022). Typology of personalization in recommender systems. Innovation Management and Operational Strategies, 3(1), 12–31. https://doi.org/10.22105/imos.2021.290478.1117. (in Persian)
Nourahmadi, M. & Sadeqi, H. (2022). A Machine Learning-Based Hierarchical Risk Parity Approach: A Case Study of Portfolio Consisting of Stocks of the Top 30 Companies on the Tehran Stock Exchange Financial Research Journal, 25(2), 236-256. (in Persian)
Papagelis, M., Plexousakis, D. & Kutsuras, T. (2005). Alleviating the sparsity problem of collaborative filtering using trust inferences. International Conference on Trust Management, 224–239.
Paranjape-Voditel, P. & Deshpande, U. (2013). A stock market portfolio recommender system based on association rule mining. Applied Soft Computing, 13(2), 1055–1063.
Patel, B., Desai, P. & Panchal, U. (2017). Methods of recommender system: a review. 2017 International Conference on Innovations in Information, Embedded and Communication Systems (ICIIECS), 1–4.
Patel, H. R. (2019). Analytical Study for Hybrid Method based Stock Recommendation. Journal of the Gujarat Research Society, 21(6), 227–234.
Ricci, F., Rokach, L. & Shapira, B. (2011). Introduction to recommender systems handbook. In Recommender systems handbook (pp. 1–35). Springer.
Saranj, A. & Nourahmadii, M. (2016). Estimating of value at risk and expected shortfall by using conditional extreme value approach in Tehran Securities Exchange. Financial Research Journal, 18(3), 437–460. https://doi.org/10.22059/jfr.2016.62450. (in Persian)
Schmitz, H. & Humphrey, J. (2000). Governance and Upgrading: Linking Industrial Cluster and Global Value Chain Research. (Vol. 120, pp. 139-170). Brighton: Institute of Development Studies.
Shiller, R. (1989). Market Volatility MIT Press. Cambridge Mass.
Song, F. M. (1994). A two-factor ARCH model for deposit-institution stock returns. Journal of Money, Credit and Banking, 26(2), 323–340.
Su, C.-H. & Cheng, C.-H. (2016). A hybrid fuzzy time series model based on ANFIS and integrated nonlinear feature selection method for forecasting stock. Neurocomputing, 205, 264–273.
Sureshkumar, K. K. & Elango, N. M. (2011). An efficient approach to forecast Indian stock market price and their performance analysis. International Journal of Computer Applications, 34(5), 44–49.
Van Horne, J. C. & Parker, G. G. C. (1967). The random-walk theory: an empirical test. Financial Analysts Journal, 23(6), 87–92.
Validi, J., Najafi, A. A. & Validi, A. (2020). Online Portfolio Selection Based on Follow-the-Loser Algorithms. Financial Research Journal, 22(3), 320–342. https://doi.org/10.22059/frj.2020.288887.1006924. (in Persian)
Vismayaa, V., Pooja, K. R., Alekhya, A., Malavika, C. N., Nair, B. B. & Kumar, P. N. (2019). Classifier Based Stock Trading Recommender Systems for Indian stocks: An Empirical Evaluation. Computational Economics, 1–23.
Wei, L.Y., Chen, T.L. & Ho, T.H. (2011). A hybrid model based on adaptive-network-based fuzzy inference system to forecast Taiwan stock market. Expert Systems with Applications, 38(11), 13625–13631.
White, H. (1988). Economic prediction using neural networks: The case of IBM daily stock returns. ICNN, 2, 451–458.
Xue, J., Zhu, E., Liu, Q. & Yin, J. (2018). Group recommendation based on financial social network for robo-advisor. IEEE Access, 6, 54527–54535.
Yin, L. & Deng, Y. (2018). Measuring transferring similarity via local information. Physica A: Statistical Mechanics and Its Applications, 498, 102–115.
Yin, L., Zheng, H., Bian, T. & Deng, Y. (2017). An evidential link prediction method and link predictability based on Shannon entropy. Physica A: Statistical Mechanics and Its Applications, 482, 699–712.
Zheng, Z., Gao, Y., Yin, L. & Rabarison, M. K. (2019). Modeling and analysis of a stock-based collaborative filtering algorithm for the Chinese stock market. Expert Systems with Applications, 113006.
Zibriczky12, D. (2016). Recommender systems meet finance: a literature review. In Proc. 2nd Int. Workshop Personalization Recommender Syst (pp. 1-10).