Portfolio optimization based on self-organizing maps clustering and genetics algorithm

(1) Fajri Farid Mail (Universitas Gadjah Mada, Indonesia)
(2) * Dedi Rosadi Mail (Universitas Gadjah Mada, Indonesia)
*corresponding author


In this modern era, gaining additional income is necessary to fulfill daily needs since inflation is unavoidable. Investing in stocks can give passive income to help people deal with the increasing prices of necessities. However, selecting stocks and constructing a portfolio is the major problem in investing. This research will illustrate the stock selection method and the optimization method for optimizing the portfolio. Stock selection is carried out by clustering using Self-organizing Maps (SOM). Clustering will show the best stocks formed for a portfolio to be optimized. The best stocks that have the best performance are selected from each cluster for the portfolio. The best performance of the stock can be determined using the Sharpe Ratio. Optimization will be carried out using a Genetic Algorithm. The optimization is carried out using software R i386 3.6.1. The optimization results are then compared to the Markowitz Theory to show which method is better. The expected return on the portfolio generated using Genetic Algorithm and Markowitz Theory are 3.348458 and 3.347559975, respectively. While, the value of the Sharpe Ratio is 0.1393076 and 0.13929785, respectively. Based on the results, the best performance of the portfolio is the portfolio produced using Genetic Algorithm with the greater value of the Sharpe Ratio. Furthermore, the Genetics Algorithm optimization is more optimal than the Markowitz Theory.


Portfolio; Optimization; Clustering; Genetic Algorithm; Self-organizing Maps




Article metrics

Abstract views : 188 | PDF views : 44




Full Text



[1] W. Zhou, W. Zhu, Y. Chen, and J. Chen, “Dynamic changes and multi-dimensional evolution of portfolio optimization,” Econ. Res. Istraz. , vol. 0, no. 0, pp. 1–26, 2021, doi: 10.1080/1331677X.2021.1968308.

[2] A. U. Khan, B. Gour, and K. K. Dwivedi, “Self Organizing Map Neural Network and Fuzzy based Method to Identify Profit Making Stocks in Stock Market,” Adv. Comput. Sci. Technol., vol. 10, no. 5, pp. 863–873, 2017. Available at: Google Scholar.

[3] S. Goudarzi, M. J. Jafari, and A. Afsar, “A Hybrid Model for Portfolio Optimization Based on Stock Clustering and Different Investment Strategies,” vol. 7, no. 3, pp. 602–608, 2017. Available at: Google Scholar.

[4] H. M. Markowitz, “Portfolio selection,” J. Finance, vol. 7, no. 60, 1952. doi: 10.2307/2975974

[5] H. M. Markowitz, Portfolio Selection: Efficient Diversification of Investments. New York: John Wiley & Sons.Inc, 1959. Available at: Google Scholar.

[6] M. Kritzman and D. Turkington, “History, Shocks, and Drifts: A New Approach to Portfolio Formation,” J. Portf. Manag., vol. 49, no. 1, 2022, doi: 10.3905/jpm.2021.1.321.

[7] W. Bakry, A. Rashid, S. Al-Mohamad, and N. El-Kanj, “Bitcoin and Portfolio Diversification: A Portfolio Optimization Approach,” J. Risk Financ. Manag., vol. 14, no. 7, p. 282, 2021, doi: 10.3390/jrfm14070282.

[8] D. Cheong, Y. M. Kim, H. W. Byun, K. J. Oh, and T. Y. Kim, Using genetic algorithm to support clustering-based portfolio optimization by investor information, vol. 61. Elsevier B.V., 2017. doi: 10.1016/j.asoc.2017.08.042

[9] D. Allen, C. Lizieri, and S. Satchell, “In Defense of Portfolio Optimization: What If We Can Forecast?,” Financ. Anal. J., vol. 75, no. 3, pp. 20–38, 2019, doi: 10.1080/0015198X.2019.1600958.

[10] O. Ledoit and M. Wolf, “Nonlinear Shrinkage of the Covariance Matrix for Portfolio Selection: Markowitz Meets Goldilocks,” Rev. Financ. Stud., vol. 30, no. 12, pp. 4349–4388, 2017, doi: 10.1093/rfs/hhy016.

[11] S. O. Adebiyi, O. O. Ogunbiyi, and B. B. Amole, “Artificial intelligence model for building investment portfolio optimization mix using historical stock prices data,” Rajagiri Manag. J., vol. ahead-of-p, no. ahead-of-print, 2021, doi: 10.1108/ramj-07-2020-0036.

[12] V. Brătian, “Portfolio Optimization. Application of the Markowitz Model Using Lagrange and Profitability Forecast,” Expert J. Econ., vol. 6, no. 1, pp. 26–34, 2018. Available at: Google Scholar

[13] B. B. Nair, P. K. S. Kumar, N. R. Sakthivel, and U. Vipin, “Clustering stock price time series data to generate stock trading recommendations: An empirical study,” Expert Syst. Appl., vol. 70, pp. 20–36, 2017, doi: 10.1016/j.eswa.2016.11.002.

[14] L. Chin, E. Chendra, and A. Sukmana, “Analysis of portfolio optimization with lot of stocks amount constraint: Case study index LQ45,” IOP Conf. Ser. Mater. Sci. Eng., vol. 300, no. 1, 2018, doi: 10.1088/1757-899X/300/1/012004.

[15] I. . Krislianto, “Analisis dan penilaian kinerja portofolio optimal saham lq 45 pernyataan mengenai tesis dan sumber informasi serta pelimpahan hak cipta,” Bogor Agricultural University, 2015. Available at: Google Scholar

[16] D. A. Milhomem and M. J. P. Dantas, “Analysis of New Approaches Used in Portfolio Optimization: a Systematic Literature Review,” Production, vol. 30, no. 1, pp. 1–16, 2020, doi: 10.1590/0103-6513.20190144.

[17] M. Ozyesil, “Markowitz Portfolio Optimization Model: An Application On Listed Firm On Borsa Istanbul-30 National Stock Index (Bist-30),” no. February, 2021. Available at: Google Scholar

[18] M. S. Paolella, “The univariate collapsing method for portfolio optimization,” Econometrics, vol. 5, no. 2, pp. 1–33, 2017, doi: 10.3390/econometrics5020018.

[19] L. H. Pedersen, A. Babu, and A. Levine, “Enhanced Portfolio Optimization,” Financ. Anal. J., vol. 77, no. 2, pp. 124–151, 2021, doi: 10.1080/0015198X.2020.1854543.

[20] P. Xidonas, R. Steuer, and C. Hassapis, “Robust portfolio optimization: a categorized bibliographic review,” Ann. Oper. Res., vol. 292, no. 1, pp. 533–552, 2020, doi: 10.1007/s10479-020-03630-8.

[21] K. Dowd, Measuring Market Risk. England: John Wiley & Sons Ltd, 2002. Available at: Google Books

[22] M. Gen and R. Cheng, Genetics Algorithms and Engineering Optimization. New York: John Wiley & Sons.Inc, 2000. Available at: Google Scholar

[23] T. Alam, S. Qamar, A. Dixit, and M. Benaida, “Genetic algorithm: Reviews, implementations and applications,” International Journal of Engineering Pedagogy, vol. 10, no. 6. 2021, doi: 10.3991/IJEP.V10I6.14567.

[24] S. Katoch, S. S. Chauhan, and V. Kumar, “A review on genetic algorithm: past, present, and future,” Multimed. Tools Appl., vol. 80, no. 5, 2021, doi: 10.1007/s11042-020-10139-6.

[25] M. Kordos, J. Boryczko, M. Blachnik, and S. Golak, “Optimization of warehouse operations with genetic algorithms,” Appl. Sci., vol. 10, no. 14, 2020, doi: 10.3390/app10144817.

[26] D. . Goldberg, Genetic Algorithms in Search, Optimization, and Machine Learning. Addison-Wesley, 1989. Available at: Google Scholar

[27] M. Zanjirdar, “Overview of Portfolio Optimization Models,” Adv. Math. Financ. Appl., vol. 5, no. 4, pp. 419–435, 2020. Available at: Google Scholar

[28] W. . Sharpe, “Mutual Fund Performance,” J. Bus., vol. 39, no. 1, pp. 119–138, 1966, doi: 10.1086/294846.

[29] S. K. Kumari, P. Kumar, J. Priya, S. Surya, and A. K. Bhurjee, “Mean-value at risk portfolio selection problem using clustering technique: A case study,” in AIP Conference Proceedings, 2019, vol. 2112, doi: 10.1063/1.5112363.

[30] M. A. Jishan, K. R. Mahmud, A. K. Al Azad, M. S. Alam, and A. M. Khan, “Hybrid deep neural network for bangla automated image descriptor,” Int. J. Adv. Intell. Informatics, vol. 6, no. 2, 2020, doi: 10.26555/ijain.v6i2.499.

[31] N. Bnouachir and A. Mkhadri, “Efficient cluster-based portfolio optimization,” Commun. Stat. Simul. Comput., vol. 50, no. 11, 2021, doi: 10.1080/03610918.2019.1621341.

[32] Y. E. Putra, D. Saepudin, and A. Aditsania, “Portfolio Selection of KOMPAS-100 Stocks Index Using B-Spline Based Clustering,” Procedia Comput. Sci., vol. 179, no. 2020, pp. 375–382, 2021, doi: 10.1016/j.procs.2021.01.019.

[33] A. Pickens and S. Sengupta, “Benchmarking Studies Aimed at Clustering and Classification Tasks Using K-Means, Fuzzy C-Means and Evolutionary Neural Networks,” Mach. Learn. Knowl. Extr., vol. 3, no. 3, pp. 695–719, 2021, doi: 10.3390/make3030035.

[34] L. Gubu, D. Rosadi, and Abdurakhman, “Classical portfolio selection with cluster analysis: Comparison between hierarchical complete linkage and Ward algorithm,” in AIP Conference Proceedings, 2019, vol. 2192, doi: 10.1063/1.5139174.

[35] Sukono, S. Supian, H. Napitupulu, Y. Hidayat, and A. S. Putra, “The application of genetic algorithm optimization on quadratic investment portfolio without a risk-free asset under Value-at-Risk,” in Journal of Physics: Conference Series, 2018, vol. 1090, no. 1, doi: 10.1088/1742-6596/1090/1/012026.

[36] B. Y. Qu, Q. Zhou, J. M. Xiao, J. J. Liang, and P. N. Suganthan, “Large-Scale Portfolio Optimization Using Multiobjective Evolutionary Algorithms and Preselection Methods,” Math. Probl. Eng., vol. 2017, 2017, doi: 10.1155/2017/4197914.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.

International Journal of Advances in Intelligent Informatics
ISSN 2442-6571  (print) | 2548-3161 (online)
Organized by Informatics Department - Universitas Ahmad Dahlan, and ASCEE Computer Society
Published by Universitas Ahmad Dahlan
W: http://ijain.org
E: ijain@uad.ac.id (paper handling issues)
    info@ijain.org, andri.pranolo.id@ieee.org (publication issues)

View IJAIN Stats

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0