Optimizing the stock portfolio using the technical mean-variance method and random forest
Subject Areas :
1
,
Saied Aghasi
2
,
Sayyed Mohammad Reza Davoodi
3
1 - 1PhD student, Department of Management, Dehaghan Branch, Islamic Azad University, Dehaghan, Iran.
2 - Assistant Professor, Faculty of Management, Islamic Azad University, Dehaghan Branch
3 - Associate Professor, Department of Management, Dehaghan Branch, Islamic Azad University , Dehaghan, Iran
Keywords: Stock exchange, Random forest, Stock portfolio, Technical mean-variance,
Abstract :
The purpose of this research is to optimize the stock portfolio using the technical mean-variance method and random forest (RF). The statistical population of this research includes all companies active in the Tehran Stock Exchange during the years2011 to 2023. In this research, 40 active stocks in the stock market that had continuous and complete data were selected. In order to check the optimization of the stock portfolio, the stock price information of 5 companies admitted to the stock exchange was used. In order to optimize the mean-variance of the stock portfolio based on the analysis of technical signals, the relative strength index (RSI) of the leading indicators was used and for modeling two methods of mean-variance technical Markowitz analysis and algorithm Random forest is used. To evaluate the performance of the proposed model, mean absolute error (MAE), mean absolute percentage error (MAPE) and root mean square error (RMSE) have been used. The obtained results show that the values of the proposed indices for the technical mean-variance model network have lower values compared to the RF algorithm. And this issue shows the higher accuracy of this recurrent neural network than the random forest algorithm in modeling and predicting the optimization values of the stock portfolio.
Adinevand,Dariush,Razini,EbrahimAli,Khodam,Mahmoud,Ohadi,Fereydoun,Hashemizadeh,Elham Elsadat. (2023) .Examining the Efficiency Models, Genetic Algorithm under MSV Risk and Particle Swarm Optimization Algorithm under CVAR Risk Criterion in Selection Optimal Portfolio Shares Listed Firms on Stock Exchange.Financial Economics ,65(4),307-322.( Persian)
Anuno, F.; Madaleno, M.; Vieira, E. Testing of Portfolio Optimization by Timor-Leste Portfolio Investment Strategy on the Stock Market. J. Risk Financial Manag. 2024, 17, 78.
Arashi, M.; Mahdi, M. Analysis of market efficiency and fractal feature of NASDAQ stock exchange: Time series modelling and forecasting of stock index using ARMA-GARCH model. Future Bus. J. 2022, 8, 14.
Beljan, K.; Brener, M.; Dolinar, D. The Long-Term Capital-Market Performance of the Forestry Sector: An Investors’ Perspective. Forests 2022, 13, 1329. https://doi.org/10.3390/f13081329
Berouaga, Y.; El Msiyah, C.; Madkour, J. Portfolio Optimization Using Minimum Spanning Tree Model in the Moroccan Stock Exchange Market. Int. J. Financial Stud. 2023, 11, 53. https://doi.org/10.3390/ijfs11020053
Čeh, M.; Kilibarda, M.; Lisec, A.; Bajat, B. Estimating the Performance of Random Forest versus Multiple Regression for Predicting Prices of the Apartments. ISPRS Int. J. Geo-Inf. 2018, 7, 168.
Chavalle, L.; Chavez-Bedoya, L. The Impact of Transaction Costs in Portfolio Optimization. J. Econ. Financ. Adm. Sci. 2019, 24, 288–311.
Chaweewanchon, A.; Chaysiri, R. Markowitz Mean-Variance Portfolio Optimization with Predictive Stock Selection Using Machine Learning. Int. J. Financial Stud. 2022, 10, 64. https://doi.org/10.3390/ijfs10030064
Dai, Z.; Kang, J. Some New Efficient Mean–Variance Portfolio Selection Models. Int. J. Financ. Econ. 2022, 27, 4784–4796.
de Melo, M.K.; Nogueira Cardoso, R.T.; Argolo Jesus, T.; Vianna Raffo, G. Investment Portfolio Tracking Using Model Predictive Control. Optim. Control Appl. Methods 2023, 44, 259–274.
Díaz, R.; Solares, E.; de-León-Gómez, V.; Salas, F.G. Stock Portfolio Management in the Presence of Downtrends Using Computational Intelligence. Appl. Sci. 2022, 12, 4067. https://doi.org/10.3390/app12084067
Dirman, A. Financial distress: The impacts of profitability, liquidity, leverage, firm size, and free cash flow. Int. J. Bus. Econ. Law 2020, 22, 17–25.
Febrianti, W.; Sidarto, K.A.; Sumarti, N. Solving Constrained Mean-Variance Portfolio Optimization Problems Using Spiral Optimization Algorithm. Int. J. Financial Stud. 2023, 11, 1. https://doi.org/10.3390/ijfs11010001
Fernandez, E.; Navarro, J.; Solares, E.; Coello, C.C. A novel approach to select the best portfolio considering the preferences of the decision maker. Swarm Evol. Comput. 2019, 46, 140–153.
Idrees, S.M.; Alam, M.A.; Agarwal, P. A Prediction Approach for Stock Market Volatility Based on Time Series Data. IEEE Accesss 2019, 7, 17287–17298.
Islam, K.I.; Elias, E.; Carroll, K.C.; Brown, C. Exploring Random Forest Machine Learning and Remote Sensing Data for Streamflow Prediction: An Alternative Approach to a Process-Based Hydrologic Modeling in a Snowmelt-Driven Watershed. Remote Sens. 2023, 15, 3999. https://doi.org/10.3390/rs15163999
Jafari, Fatemeh, Ali Beigi Bani, Nazanin, Karimkhani, Mehdi, Izdiyar, Amin. (2023). Optimizing the stock portfolio using the conditional value-at-risk model with a simulation approach, 8th National Conference on Management and Economics Studies in Human Sciences, Tehran. ( Persian)
Jing, D.; Imeni, M.; Edalatpanah, S.A.; Alburaikan, A.; Khalifa, H.A.E.-W. Optimal Selection of Stock Portfolios Using Multi-Criteria Decision-Making Methods. Mathematics 2023, 11, 415. https://doi.org/10.3390/math11020415
Mourtas, S.D.; Kasimis, C. Exploiting Mean-Variance Portfolio Optimization Problems through Zeroing Neural Networks. Mathematics 2022, 10, 3079. https://doi.org/10.3390/math10173079
Nor, S.M.; Zawawi, N.H.M.; Wickremasinghe, G.; Halim, Z.A. Is Technical Analysis Profitable on Renewable Energy Stocks? Evidence from Trend-Reinforcing, Mean-Reverting and Hybrid Fractal Trading Systems. Axioms 2023, 12, 127. https://doi.org/10.3390/axioms12020127
Park, H. Modified Mean-Variance Risk Measures for Long-Term Portfolios. Mathematics 2021, 9, 111. https://doi.org/10.3390/math9020111
Purwandari, T.; Riaman; Hidayat, Y.; Sukono; Ibrahim, R.A.; Hidayana, R.A. Selecting and Weighting Mechanisms in Stock Portfolio Design Based on Clustering Algorithm and Price Movement Analysis. Mathematics 2023, 11, 4151. https://doi.org/10.3390/math11194151
Sekulić, A.; Kilibarda, M.; Heuvelink, G.B.M.; Nikolić, M.; Bajat, B. Random Forest Spatial Interpolation. Remote Sens. 2020, 12, 1687. https://doi.org/10.3390/rs12101687
Shah, D.; Isah, H.; Zulkernine, F. Stock Market Analysis: A Review and Taxonomy of Prediction Techniques. Int. J. Financ. Stud. 2019, 7, 26.
Sukono; Lesmana, E.; Napitupulu, H.; Hidayat, Y.; Saputra, J.; Ghazali, P.L.B. Mean-VaR Portfolio Optimisations: An Application of Multiple Index Models with Non-Constant Volatility and Long Memory Effects. Int. J. Innov. Creat. Chang. 2019, 9, 364–381.
Xu, S.; Shen, J.; Hua, H.; Li, F.; Yu, K.; Li, Z.; Gao, X.; Dong, X. Trading Portfolio Strategy Optimization via Mean-Variance Model Considering Multiple Energy Derivatives. Processes 2023, 11, 532. https://doi.org/10.3390/pr11020532
Yadav, A.; Chakraborty, A. Investor Sentiment and Stock Market Returns Evidence from the Indian Market. Purushartha-J. Manag. Ethics Spiritual. 2022, 15, 79–93.