Design of Stock Recommender System based on Collaborative Filtering Algorithm for Tehran Stock Exchange.

Document Type : Research Paper

Authors

1 Ph.D. in Financial engineering, Faculty of Economic ,Management and Accounting, Yazd University, Yazd, Iran

2 Electrical Engineering, Faculty of Electrical Engineering, Amirkabir University of Technology (Tehran Polytechnic), Tehran, Iran

3 Department of Accounting and Finance, Faculty of Social Sciences and Humanities, Yazd University, Iran

10.22059/frj.2023.360955.1007479

Abstract

Objective: With the progress of science and technology, the amount of information retrieved and used has increased rapidly. Data mining is the process of extracting relevant data from a large volume of data, and it is also a method of discovering and finding the appropriate pattern from a large volume of datasets. The main goal of the data mining process is to extract appropriate and relevant information from a large volume of datasets and transform it into an understandable structure. One of the subsets of data mining is the recommendation system. Recommender systems (RS) are software tools and techniques that suggest items that the user can use.

Recommender systems appeared in the mid-1990s, but since the Netflix Prize, they have gained considerable attention. They are now used in different fields such as movies (Netflix), books (Amazon), or music (Spotify).

However, stock investment recommender systems have received limited attention compared to other industries. Personalized stock recommendations can significantly impact customer engagement and satisfaction in the industry.

In this research, assuming transmission effects between the movements of stocks in the Tehran Stock Exchange, we use the Collaborative Filtering technique, which is one of the recommender system algorithms, to design a stock recommender system. Collaborative Filtering (CF) recommender systems are designed and used to predict the desirability of items for users based on items that have already been rated by other users. This strategy aims to find good stocks to earn more returns than the market.

Method: For this purpose, 145 stock companies were selected from 2012-03-23 to 2021-07-10.

To select the best length of the short period and the long period, the stock market data is divided into two parts. We use the data from 2012-03-23 to 2016-09-10 for the data in-sample (train) (145 stocks and 1023 trading days) and the data from 2016-09-11 to 2021-07-10 for the out-of-sample (test) (145 stocks and 1159 trading days).

The test range for the short period is from 5 to 45 days, and the test range for the long period is from 2 to 10 times the short period (in days). Combining a short period and a long period, which obtains the maximum net value, is considered an optimization combination. Then, using the stock-based collaborative filtering algorithm, they obtained the buy and sell signal during the period, and finally, we evaluated the strategy.

Results: We tested the algorithm as an investment strategy in two periods: in-sample and out-of-sample. The results obtained through the algorithm for the out-of-sample periods show that this strategy can have a return of 25 times, whereas the total index in this period has increased by 16 times, indicating the excellent performance of the strategy during the period. Also, the value at risk percentage in the period under review for the selected method is -12.8%, which indicates the lower risk of this method.

Conclusion: The stock-based collaborative filtering algorithm is a kind of active investment strategy. Its purpose is to find good stocks for better performance than the market and can help investors in this regard.

Keywords

Main Subjects