Graph Theory in Action: Forming an Investment Portfolio (A Case Study: Selected Companies of Tehran Stock Exchange)

Document Type : Research Paper

Authors

1 Assistant Professor Department of finance and accounting, Humanities Faculty,meybod University

2 Assistant Professor of Financial engineering, Hazrat-e Masoumeh University Tehran, Qom, Iran

10.22059/ijms.2025.362745.676068

Abstract

The research aims to integrate portfolio theory and graph theory to explore the relationship between specific network properties and the diversification problem in forming stock portfolios. The stock portfolio formation process is described using graph theory. The study utilizes stock-adjusted final price data from 138 companies listed on the Tehran Stock Exchange between 2019-01-01 and 2021-07-06, spanning 918 trading days. The data is partitioned with 80% as in-sample and 20% as out-of-sample data. A proximity matrix is employed to analyze stock relationships, leading to the construction of diversified and non-diversified portfolios using an optimal threshold. Machine learning techniques and hierarchical risk parity are used to select stocks for the portfolio. The performance is compared with the minimum variance approach and the total index benchmark for both in-sample and out-of-sample periods. Sharpe's ratio evaluates the performance of both diversified and non-diversified portfolios. The findings suggest that the non-diversified approach outperforms during market crashes, while diversified portfolios perform better during other periods. Hence, diversifying the stock portfolio is unsuitable during market crashes due to strong direct correlations among stocks, causing simultaneous declines. Alternative strategies should be considered following market crashes.

Keywords

Main Subjects