Portfolio Optimization Using Minimum Spanning Tree Model in the Moroccan Stock Exchange Market

: Portfolio optimization is a pertinent topic of signiﬁcant importance in the ﬁnancial literature. During the portfolio construction, an investor confronts two important steps: portfolio selection and portfolio allocation. This article seeks to investigate portfolio optimization based on the Minimum Spanning Tree (MST) method applied on the Moroccan All Shares Index (MASI) historical stock log returns covering the period from 2 January 2013 to 27 October 2022 allowing us to build two portfolios: MST-Portfolio and MST-Portfolio 2. Portfolio selection was carried out for MST-Portfolio and MST-Portfolio 2, respectively, based on 63 stocks or using the Degree Centrality (DC) measure and portfolio allocation for both portfolios was carried through the use of the Inverse Degree Centrality Portfolio (IDCP). The obtained portfolios were compared with the Minimum Variance Portfolio (MV Portfolio) and Equal Weighting Portfolio (EW Portfolio) using centrality measures, diversiﬁcation, and backtesting. According to the used indicators analysis, MST-Portfolio and MST-Portfolio 2 are the most well-performed and robust portfolios showing a good performance during the studied period, even during the COVID-19 crisis, and ensuring a good level of diversiﬁcation. The ﬁndings demonstrate that both suggested methods can enhance portfolio performance, evidence that can help investors or active managers when optimizing their portfolios.


Introduction
Portfolio optimization is regarded as an attractive topic for most researchers. Its major highlight consists of determining the assets' optimal weight by increasing its expected returns and also by minimizing risk. The initial portfolio theory, which provides the solution to the trade-off between minimizing risk and maximizing expected returns, was given by Markowitz (1952) based on Mean Variance (MV). The MV model is generated based on a set of constrained assumptions such as the normal distribution of stock market returns, making it difficult to use this model for a practical stock market. Since Markowitz (1952) developed the Modern Portfolio Theory (MPT), the portfolio optimization literature review has made substantial progress. Several portfolio optimization methods have been used; among them, Sharpe (1963) was the first to attempt to simplify the Markowitz model by developing a particular model based on the simplification of the variance-covariance matrix in order to reduce the computational burden and proposed a diagonalization of this matrix based on the single-index model. Sharpe (1964) developed the market model by assuming a linear relationship between a stock's return and the overall market return. It is based on the assumption that investors are risk-averse and will only invest in an asset if it offers a higher expected return than a risk-free asset. Then, following his work concerning the applicability of the variance-covariance matrix, Sharpe (1971) developed a new model called the Capital Asset Pricing Model (CAPM) which consists of measuring the degree of sensitivity of the return of an asset to that of the market. Markowitz (1981) developed a multi-index model, which is a generalization of Sharp's single index model into a multi-index model offering investors the possibility of investing in an international market with several stock market indices. The Black-Litterman model developed by Black and Litterman (1990) is an extension of mean-variance optimization that allows investors to incorporate their own views about the expected returns of different assets into the portfolio optimization process. Lai (1991) proposed a multiple-objective approach, showing that the preference of the investor can be incorporated in a programming problem of polynomial purpose from which a portfolio selection with skewness is determined to improve the optimization quality. Konno and Yamazaki (1991) presented that risk function can deal with most of the difficulties associated with the traditional Markowitz's model while preserving its advantages over equilibrium models. In order to improve the Konno and Yamazaki (1991) model, Speranza (1993) proposed a linear combination between the absolute deviation below the mean and the absolute deviation above the mean as a measure of risk. When the used data represent an asymmetry of information, the variance and the absolute deviation measures are symmetrical and do not allow for the asymmetry of the data. To solve this problem, Hamza and Janssen (1995) proposed a convex combination of the two semi-variances of the portfolio return compared to its expected return as a measure of risk. Young (1998) proposed a criterion called "minimax" to measure the risk in order to optimize an equity portfolio. The portfolio is chosen that minimizes the maximum loss over all past observation periods, for a given level of return. Ryoo (2007) used the Mean Absolute Deviation (MVD) model as a replacement for the MV model, knowing that it implies absolute variance as a risk factor for calculating the large-scale optimization problems corresponding to the portfolio. An improved portfolio optimization model ensures an efficient frontier which enables investors to obtain better expected returns at the lowest level of risk (Lai et al. 2018). Moreover, a highly efficient portfolio optimization model is required to evolve in the investment management areas (Bielstein and Hanauer 2019). Antony (2020) provides a detailed overview of the intersection between behavioral finance and portfolio management. The article highlights the limitations of traditional finance theories and the emergence of behavioral finance as an alternative approach. It identifies various behavioral biases that can impact investment decision-making and discusses effective portfolio management strategies that can address these biases. The article also examines the implications of behavioral finance for institutional portfolio management and the role of policymakers in promoting effective portfolio management. Overall, the article provides important insights into the relevance of behavioral finance to portfolio management. Dospinescu and Dospinescu (2019) proposed a profitability regression model that is applicable to the financial communication of the Romanian stock exchange's companies. The authors collected and analyzed data from 56 listed companies in Romania to test the model's efficacy, and the study concluded that the model is capable of identifying the factors that influence company profitability and predicting future profitability. The authors recommend using the model to improve financial communication strategies for companies and to make informed investment decisions for investors. The article provides valuable insights into the financial communication practices of Romanian companies and offers a significant contribution to the literature on financial communication and investment analysis. Eckert and Hüsig (2021) presents a thorough analysis of innovation portfolio management with a focus on digital service innovations. The article delves into the challenges that organizations face while managing their portfolios of digital service innovations, including the difficulty of balancing short-term and long-term investments, managing diverse innovation projects, and assessing and managing risks. The authors explore several approaches to innovation portfolio management, including resource-based, market-based, and balanced approaches. They recommend future research areas such as the need for more empirical studies of innovation portfolio management practices, the development of new theoretical frameworks, and the use of new data sources and tools for informed decision-making. Overall, the article offers a comprehensive overview of the challenges and opportunities in managing portfolios of digital service innovations. In addition, Liu et al. (2022) investigates the impact of risk forecast and risk tolerance on portfolio management through a case study of the Chinese financial sector. The authors use a two-stage modeling approach that involves estimating the risk forecast with GARCH models and assessing the risk tolerance of different investors with stochastic dominance analysis. The study shows that risk forecast and risk tolerance play a crucial role in portfolio management decisions and that investors' risk tolerance can be influenced by socioeconomic and demographic factors. The authors suggest recommendations for investors and policymakers to effectively manage risk in their investment portfolios. The article contributes to the existing literature on risk management and portfolio optimization. Saleem et al. (2023) examines the performance of three different asset classes-FAANG stocks, gold, and Islamic equity-during the COVID-19 pandemic and their implications for portfolio management. The study finds that FAANG stocks, which refer to the five most prominent U.S. technology companies-Facebook, Amazon, Apple, Netflix, and Google-have significantly outperformed the other two asset classes during the pandemic. The article discusses how this may be due to the increased reliance on technology and e-commerce during the pandemic, which has benefited these companies. Overall, the article suggests that the performance of these asset classes during the pandemic has significant implications for portfolio management, and investors should consider the risks and opportunities associated with each asset class before making investment decisions.
Topological Network Structures (TNS) are one of the most used techniques to prove their performance in different domains. TNS is significant and fundamental; several researchers used this technique with broad applications in multiple domains, such as characterizing the behaviors of proteins in biological systems (Farkas et al. 2011), and the controllability of transport and engineered systems (Mangan 2003;Verma et al. 2016). Suvilehto et al. (2015) made a dynamic process description in social systems. Burt et al. (2000) used a network structure of social capital to examine arguments and evidence about the relationship between social media and social capital.
Network Theory has been applied in analyzing the stock market's topology, in particular, portfolio optimization by different methods and approaches. Li et al. (2019) used network topology for portfolio optimization, regarding the complicated financial network as a typical example to display the dependence of the network topology on its function. Clemente et al. (2021) explained the Network Structure role on financial markets for improving the portfolio selection process, then formulated and solved the asset allocation problem. Ma et al. (2021) used deep learning and machine learning based on historical data stocks of China Securities 100 index, covering the period from 2007 to 2015, for return prediction; this article provides investors with guidance on constructing a model that predicts daily trading investment returns using a multivariate forecast and a random forest approach. Yan et al. (2022) introduced the P/E Ratio Network analysis as an alternative to the MV analysis for portfolio optimization, and finds that the size of the portfolio optimized by the P/E Ratio Network has increased significantly to mitigate systemic risk, while MV portfolios were insufficiently diversified. In Network Theory, centrality measures highlight the relative importance of nodes in a network, which are the most fundamental used measures to reveal the structure of the network (Zhu et al. 2021;Hu et al. 2020). Using these measures, investment decisions are typically made by choosing central or non-central network assets. The strategy of non-central investment affirms that a portfolio comprising the peripheries of the network has a greater potential for diversification and thus is exposed to minimum risk (Peralta and Zareei 2016;Pozzi et al. 2013;Onnela et al. 2003).
According to numerous research, topological structures of networks through hierarchical clustering methods can be used to reveal the cross-correlations across different assets (Markowitz 1952;Tumminello et al. 2005). For instance, the MST has been used to investigate the correlation structure of individual stocks. Onnela et al. (2003) demonstrated that on the network's outer sheets generated by the MST method are always located the nodes of the minimum risk portfolio. In this respect, further research highlights how the affectation of the constructed portfolio's performance can be caused due to the topological positions of the stocks (Pozzi et al. 2013). Nanda and Tiwari (2010) demonstrates that the Network Topology ciphers the complex dependency structure of financial equities with an extraction of the hierarchical and grouping properties, and decreases the complexity of the data while maintaining the fundamental characteristics of the information. Most empirical studies have used the MST as the backbone for their financial networks, because the complex networks' functionality depends on their underlying structure as well as structural stability (Plerou et al. 2002).
In the field of portfolio optimization, previous studies have mainly focused on traditional methods such as Markowitz's mean-variance optimization, CAPM, and APT. However, these methods have limitations such as sensitivity to input parameters and estimation errors, and they assume normality in returns. Researchers have proposed alternative methods such as the Minimum Spanning Tree (MST) approach. The MST approach is a network-based method that uses the MST tree algorithm to identify key relationships among assets in a portfolio. This approach has been found to be effective in minimizing risk, diversifying portfolios, and reducing the number of assets. This proposal aims to fill a research gap by investigating the use of the MST method in portfolio optimization, specifically in portfolio optimization and comparison tasks. Previous studies have explored the effectiveness of the MST method in portfolio optimization, but this proposal seeks to use it for portfolio comparison with traditional methods to prove its performance and identify effective portfolio construction strategies. This research gap addresses the need for more reliable and robust portfolio optimization techniques that can adapt to changing market conditions and support informed investment decisions.
Several studies on the MST algorithm attest to it having very high average performance. To implement this method, for asset selection and capital allocation, a portfolio objective is set, derived from the return information of the listed companies belonging to the MASI index, by constructing a Network Structure using the MST method to form connections among stocks by defining a node for each selected stock in the network. One must identify potential connections in the network using the Gower distance metric as a similarity measure. From the constructed Network Structure, the DC has been used for portfolio selection and the weighted degrees are derived for the capital allocation stage using IDCP. Finally, two suggested portfolios are created: the MST-Portfolio using 63 stocks for portfolio selection and IDCP for portfolio allocation, and the MST-Portfolio 2 using 32 stocks extracted based on the DC measure for the portfolio selection stage and IDCP for portfolio allocation. These portfolios are compared with the EW Portfolio, MV Portfolio, and according to the backtesting result, to determine the well-performed and robust portfolios.
The aim of the study is to explore the efficacy of utilizing the MST method in both portfolio optimization and portfolio comparison tasks. The objective is to offer a fresh and innovative approach to assess portfolio performance and to identify the most efficient strategies for constructing portfolios. This paper investigates how effective the MST method is in portfolio optimization and portfolio comparison tasks compared to traditional methods such as MV Portfolio and EWP.
The paper is structured as follows: Section 2 presents a data description and methodology, Section 3 presents the results, the materials and methods used are discussed in Section 4, and Section 5 presents the discussions. Finally, Section 6 concludes the paper.

Data
We collected daily historical log returns based on stock price data composing the MASI index in the Moroccan Stock Exchange (MSE) market, spanning the time frame from 2 January 2013 to 27 October 2022. The used data includes 63 stocks, for which the data are available, since there were other companies that entered the Casablanca Stock Exchange (CSE) market during this period, represented by missing data, and, for this reason, they were removed.
The used data are composed of essentially close historical prices converted into daily historical log returns. Thus, every single stock from the analyzed data is represented by a daily return vector. The data set contains the stocks represented as follows: Attijariwafa Bank ( Before deep diving into analyses, it is crucial to better understand the studied market. The MSE market is recognized for its tendency towards high volatility and instability over short timeframes. In this market, prices can experience sudden and substantial fluctuations that may persist for extended periods. The MASI index serves as a clear indicator of this volatility, as it is subject to significant and rapid changes. This high level of fluctuation has had an impact on investors' decisions, making them more uncertain and concerned about the security of the financial market. The market has seen a significant change in recent years, with many institutional investors who dominate the market adopting a strategy of holding onto their shares and waiting for market conditions to improve before investing. Since the 1993 reform, different stocks have begun to grow steadily. Moreover, Morocco has inaugurated new platforms which have been acquired by the CSE to strengthen market development and restore liquidity. Indeed, stagnating investment spending and falling trade levels are the main factors behind the liquidity crunch in the Moroccan market. Recently, the structure of the stock market has been improving over time. With the market becoming more integrated with the global economy, numerous groups of analysts and sources, such as S&P and Dow Jones, have started to recognize Morocco as one of the top-performing markets. Despite the impact of various crises worldwide, the COVID-19 pandemic has affected the MSE market, leading to a significant decline in revenue for several listed companies. Despite the impact of various crises worldwide, the COVID-19 pandemic has affected the MSE market, leading to a significant decline in revenue for several listed companies. Following the emergence of early cases in the country, it is very easy to see how the overall market performance has declined since the first cases of coronavirus were reported domestically, starting 2 March 2020. The MASI index experienced a significant deterioration as a result of slower investment growth, losing about 26 per cent in April 2020 which is the lowest level in the last five years. The COVID-19 pandemic has affected companies listed on the MSE market in various ways. While some industries have shown resilience to the crisis, others have been significantly impacted. The uncertain future of the local economy and the financial situation of individuals has led to increased fear among investors, resulting in greater risks and reduced investment incentives. As a result, individuals and institutions started selling their stocks after the pandemic hit, causing a widespread decline in equity prices and value. Because of the low level of investment and the lofty level of ambiguity around the question of the crisis, the Moroccan economy has faced challenges. Consequently, the GDP indicator was significantly affected and several macroeconomic variables were influenced. However, the MASI index has started to recover from the immense impact of the crisis since October 2020. The evolution of several companies in the insurance, distribution, and real-estate sectors contributed in some manner to the progressive market recovery. Worldwide, global instability has various consequences, so investment analysts said that financial markets are heading into a major recession. Thereafter, the CSE market collapsed in 2022 after the invasion of Ukraine by Russia, causing a global stock market crash, soaring commodities, and strong demand on safe havens. The MASI widened its losses to end down 4.11 per cent, while The Moroccan Stock Index 20 (MSI20) dropped 4.54 per cent, which has created anxiety and uncertainty among investors.
The uncertainty pushes investors to develop and use efficient methods for portfolio optimization, to achieve good performance and robust portfolios. This article investigates the portfolio optimization stages: asset selection and allocation based on the MST method rather than traditional statistical methods. In this respect, the MST method was used for the stock selection and allocation based on the information extracted from historical stock returns. The choice of using this network method was based on the fact that it is one of the most used and performing models. In this paper, the stock price time series have been broken down into sub-periods based on structural change tests. In this respect, the Multiple Break Point Tests (MBPT) Bai and Perron (2003) was used to divide the MASI index time series. The results indicated that there were five structural changes in the MSE market ( Figure 1). Therefore, these results were used to divide the stock price time series into subperiods; i.e., from the five resulting breaks with their corresponding dates-1: 9 December 2016, 2: 29 June 2018, 3: 12 March 2020, 4: 17 July 2020, and 5: 17 November 2021-we obtained six sub-periods, from SP1: sub-period1 to SB6: sub-period6 ( Figure 1), noting that the third break corresponding to the COVID-19 crisis is represented by a remarkable fall.
to the progressive market recovery. Worldwide, global instability has various consequences, so investment analysts said that financial markets are heading into a major recession. Thereafter, the CSE market collapsed in 2022 after the invasion of Ukraine by Russia, causing a global stock market crash, soaring commodities, and strong demand on safe havens. The MASI widened its losses to end down 4.11 per cent, while The Moroccan Stock Index 20 (MSI20) dropped 4.54 per cent, which has created anxiety and uncertainty among investors.
The uncertainty pushes investors to develop and use efficient methods for portfolio optimization, to achieve good performance and robust portfolios. This article investigates the portfolio optimization stages: asset selection and allocation based on the MST method rather than traditional statistical methods. In this respect, the MST method was used for the stock selection and allocation based on the information extracted from historical stock returns. The choice of using this network method was based on the fact that it is one of the most used and performing models. In this paper, the stock price time series have been broken down into sub-periods based on structural change tests. In this respect, the Multiple Break Point Tests (MBPT) Bai and Perron (2003) was used to divide the MASI index time series. The results indicated that there were five structural changes in the MSE market ( Figure 1). Therefore, these results were used to divide the stock price time series into sub-periods; i.e., from the five resulting breaks with their corresponding dates-1: 9 December 2016, 2: 29 June 2018, 3: 12 March 2020, 4: 17 July 2020, and 5: 17 November 2021we obtained six sub-periods, from SP1: sub-period1 to SB6: sub-period6 (Figure 1), noting that the third break corresponding to the COVID-19 crisis is represented by a remarkable fall.

Methodology
This article aims to use the MST method and shows its relevance by applying it to the topic of portfolio optimization using MASI index. One must construct the MST structure, with the elements in the set defined according to the Gower distance metric using Prim's algorithm. In addition, once the MST graph is obtained, centrality measures are calculated for better understanding the interrelations between stocks, and then we proceed to the stock selection and allocation stages. For the stock selection, we used two methods; the first one consists of the use of 63 stocks and the second one is based on the DC measure. In addition, the allocation result is obtained using the IDCP measure by extracting the weights. For portfolio construction, one must use two suggested portfolios. Starting with the MST-Portfolio, the asset selection is based on the 63 existing stocks and the allocation

Methodology
This article aims to use the MST method and shows its relevance by applying it to the topic of portfolio optimization using MASI index. One must construct the MST structure, with the elements in the set defined according to the Gower distance metric using Prim's algorithm. In addition, once the MST graph is obtained, centrality measures are calculated for better understanding the interrelations between stocks, and then we proceed to the stock selection and allocation stages. For the stock selection, we used two methods; the first one consists of the use of 63 stocks and the second one is based on the DC measure. In addition, the allocation result is obtained using the IDCP measure by extracting the weights. For portfolio construction, one must use two suggested portfolios. Starting with the MST-Portfolio, the asset selection is based on the 63 existing stocks and the allocation stage is based on the IDCP. Moreover, the second suggested portfolio is the MST-Portfolio 2, established using the DC measure for portfolio selection given 32 stocks with lower DC values, and the asset allocation process is given by the IDCP as an allocation method based on weights inverse to asset centrality. Knowing that, this method allocates a higher weight to peripheral assets in the network and therefore tries to establish a robust diversification and aims to prevent a fast spread of financial stress over the portfolio. The node representation variations, the structure of the network, and the definition of the distance allow different measures of potential risk to be applied. Risks can be calculated using methods such as centrality, assortativity, or others.
The aim of this paper lies in the use of the MST for portfolio optimization and showing its relevance. One must proceed to the construction of portfolios, EW Portfolio, MV Portfolio, and Rebalanced Portfolio, to compare them with the proposed portfolios which are the MST-Portfolio and MST-Portfolio 2, in order to evaluate their performances. The comparison between them required the use of some measures such as the Sharpe Ratio and Maximum Drawdown. Using empirical backtesting, we showed that the proposed network-based allocation concepts can help to improve the performance, the risk-return characteristic, and the diversification of a portfolio. MST network can be useful to add complementary information to the network and improve specific measures such as skewness or tail risk. Figure 2 shows the obtained MST graph that connects all the stocks without forming any cycles, with a minimized size of the tree. Using this graph, and for a deeper understanding of the interconnections between stocks in the MSE market, centrality measures are used.

Results
stage is based on the IDCP. Moreover, the second suggested portfolio is the MST-Portfolio 2, established using the DC measure for portfolio selection given 32 stocks with lower DC values, and the asset allocation process is given by the IDCP as an allocation method based on weights inverse to asset centrality. Knowing that, this method allocates a higher weight to peripheral assets in the network and therefore tries to establish a robust diversification and aims to prevent a fast spread of financial stress over the portfolio. The node representation variations, the structure of the network, and the definition of the distance allow different measures of potential risk to be applied. Risks can be calculated using methods such as centrality, assortativity, or others.
The aim of this paper lies in the use of the MST for portfolio optimization and showing its relevance. One must proceed to the construction of portfolios, EW Portfolio, MV Portfolio, and Rebalanced Portfolio, to compare them with the proposed portfolios which are the MST-Portfolio and MST-Portfolio 2, in order to evaluate their performances. The comparison between them required the use of some measures such as the Sharpe Ratio and Maximum Drawdown. Using empirical backtesting, we showed that the proposed network-based allocation concepts can help to improve the performance, the risk-return characteristic, and the diversification of a portfolio. MST network can be useful to add complementary information to the network and improve specific measures such as skewness or tail risk. Figure 2 shows the obtained MST graph that connects all the stocks without forming any cycles, with a minimized size of the tree. Using this graph, and for a deeper understanding of the interconnections between stocks in the MSE market, centrality measures are used. Focusing on the importance of every stock in the network, Table 1 reports the rankings of stocks according to their network indicators; starting with the DC and Eigenvector Centrality (EC) of a node within a network, they take into account both the influence of the node and the importance of its neighbors in determining its overall impact. In this network, the BCP, AWB, and MIC stocks have a high degree of connectivity to numerous other stocks, making them among the most influential in the network. The Closeness Centrality (CC), AWB, CIH, and IAM stocks are the best positioned to quickly influence the entire network (Rochat 2009). In addition, Betweenness Centrality (BC) demonstrates that Focusing on the importance of every stock in the network, Table 1 reports the rankings of stocks according to their network indicators; starting with the DC and Eigenvector Centrality (EC) of a node within a network, they take into account both the influence of the node and the importance of its neighbors in determining its overall impact. In this network, the BCP, AWB, and MIC stocks have a high degree of connectivity to numerous other stocks, making them among the most influential in the network. The Closeness Centrality (CC), AWB, CIH, and IAM stocks are the best positioned to quickly influence the entire network (Rochat 2009). In addition, Betweenness Centrality (BC) demonstrates that AWB, BCP, and IAM stocks serve as a bridge between all nodes within the network. Moreover, HUBS and AUTHORITIES show that AWB, CIH, and M2M stocks acquire higher ranks, which means that the centrality value of these stocks acquire a high ability to form a relation with other stocks.

Results
In this paper, we proceeded to the construction of three portfolios which are the MV Portfolio, EW Portfolio and finally the Rebalanced portfolio to compare them with the two proposed portfolios according to the proposed approach which are the MST-Portfolio and MST-Portfolio 2. The comparison between them was done at first sight using some measures to assess their performance and robustness. According to practical considerations, the chosen portfolios for comparison are commonly used by researchers and investors, and have a significant market presence. This can make our analysis more relevant and practical for investors and other stakeholders. The reason why these three portfolios were chosen for portfolio performance comparisons are relative to some objective reasons that support our choice. These objective reasons include the relevance to our research objective to construct optimal portfolios with good performance. In terms of diversity, the chosen three portfolios are diverse in terms of their asset allocation and risk profile. This can help us to evaluate the effectiveness of the MST method in identifying the most efficient portfolios across different investment strategies. Moreover, the comparison with benchmark portfolios are commonly used as benchmarks for similar analyses, noting that EWPs can be a good benchmark for comparing the performance of other portfolios. By equally weighting all the assets in the portfolio, an EWP provides a simple and transparent approach to constructing a diversified portfolio. It also avoids the problem of overweighting a few large stocks, which can skew the portfolio's performance. DeMiguel et al. (2009) compares the performance of the 1/N portfolio, which is an EWP, with the mean-variance efficient portfolios, and finds that the 1/N portfolio is not significantly worse than the mean-variance portfolios in terms of risk and return, suggesting that EWP can be a useful benchmark for portfolio comparison. In addition, MV Portfolios are designed to minimize the portfolio's volatility or risk. This makes them a good benchmark for comparing the risk-adjusted performance of other portfolios. By constructing a portfolio that is highly diversified and has low correlations between assets, the MVP can provide a stable and predictable performance. Clarke et al. (2014) provides a comprehensive and detailed analysis of MV Portfolio strategies and examines its performance relative to traditional market capitalization-weighted portfolios, and finds that MV portfolios can provide superior risk-adjusted returns, suggesting that MV Portfolios can be a useful benchmark for portfolio comparison. Moreover, Rebalanced Portfolios can be a good benchmark for comparing the impact of different rebalancing frequencies or strategies. By adjusting the portfolio weights periodically, a rebalanced portfolio can maintain the desired asset allocation and reduce the portfolio's risk. The frequency and timing of rebalancing can have a significant impact on the portfolio's performance and risk (Dichtl et al. 2016). These studies provide evidence for the use of EWP, MV Portfolios, and Rebalanced Portfolios in portfolio performance comparison and can provide useful benchmarks for evaluating portfolio performance. Comparing the performance of the two suggested portfolios to the MV Portfolio and EWP can provide insights into the added value of the optimization approach, which provide a reference point for evaluating the performance of the two suggested portfolios MST-Portfolio and MST-Portfolio 2.
By computing the Sharpe ratio, as represented in Table 2, one may conclude that the best portfolios among the four are the suggested MST-Portfolio 2 and MST-Portfolio. Considering the CVaR of −0.0167, the MST-Portfolio 2 has the highest Sharpe ratio (0.5887) which means it is the one for which the investor will receive the highest excess return for the additional risk he or she will take, whereas the MST-Portfolio has a Sharpe ratio equivalent to 0.2828 and a CVaR of −0.0193. Consequently, for an investor indifferent about the difference in risk level, the first portfolio represents a very profitable investment option. MST-Portfolio and MST-Portfolio 2 show the best performance of the Sharpe and Sortino ratios, followed by the EW Portfolio and MV Portfolio, noting that the MV Portfolio shows the worst performance. MST-Portfolio shows the lowest Maximum Drawdown, followed by the MST-Portfolio 2. Regarding the Skewness, the choice corresponds with the investor profile; if, for example, it is a conservative investor, a positive Skewness is preferable, noting that the highest Skewness referred to the MV Portfolio, followed by the MST-Portfolio 2 and MST-Portfolio. In addition, the lowest value of Kurtosis is returned for the MST-Portfolio 2, and the highest one is returned for the MST-Portfolio. As shown before, to assess how risky the portfolio is, the CVaR was computed using a 95-per cent confidence level, showing that the quantification of the tail risk amount for both MST-Portfolio and MST-Portfolio 2 are, respectively, −0.0193 and −0.0167, as the expected loss, and they acquire the smallest values of Maximum Drawdown.
For a better understanding of the robustness of the rebalancing results, one must analyze the allocation method on an additional dataset of 10,000 scenarios generated using block bootstrapping. This helps to better assess the significance of the backtesting and to understand how much the results are driven by randomness or the choice of the asset universe. To do that, one must build blocks with a fixed length of 1 month and a random starting point in time based on the stock returns time series with a rolling window of 10 months. The scenarios are built by sampling the blocks with the replacement to rebuild a time series with the same length as the original time series. For these scenarios, we then calculated the resulting portfolio time series and the performance measures of the Rebalanced Portfolio compared to other portfolios. Figure 3 shows the rebalanced weights for asset allocation during a particular time. For the purpose of simplification, only 16 stocks are presented in the legend, where the colors represent the 63 stocks. One must notice that the portfolio is well-diversified. There are several measures aiming to quantify the degree of diversification and to prove it. The most common ones are the Diversification Ratio (DR), Diversification Delta (DD), Diversification Delta Star (DD*), and Marginal Risk Contributions (MRC). Table 3 shows that the MST-Portfolio gives good diversified risk budgets, and therefore exhibits the highest values. By construction, MST-Portfolio maximizes the diversification ratio. Regarding the other diversification metrics, one must consider that the suggested MST-Portfolio and MST-Portfolio 2 are well-diversified. Table 4 represents the stock weights making up the MST-Portfolio as well as the risk contribution of each share to the portfolio risk. Based on Figure 4, the x-axis represents the It can be pointed out that the greatest risk contribution is that of the DEH stock, followed by the BOA and AUH stocks. Otherwise, the smallest risk contribution goes to the BCP stock, followed by MIC and AWB, knowing that these stocks had a minimum weight.    It can be pointed out that the greatest risk contribution is that of the DEH stock, followed by the BOA and AUH stocks. Otherwise, the smallest risk contribution goes to the BCP stock, followed by MIC and AWB, knowing that these stocks had a minimum weight.     Table 5 shows the weights and the risk contribution of each stock constituting the MST-Portfolio 2 to the risk of the portfolio. Figure 5 gives a visualization of the weights/risk contribution which allows us to say that the largest risk contribution to the MST-Portfolio 2 volatility has been the JET stock, which contributed by 0.0648 to portfolio volatility with a corresponding weight of 0.0294, followed by the DIS and BMCI stocks. On the other hand, the smallest risk contribution corresponds to the BOA stock, followed by the MIC and DEH stocks. It looks like the BOA stock has done a good job as a volatility dampener; it has a 0.00910 allocation but weakly contributes by 0.00639 to volatility. In addition, it can be deduced that 15 stocks out of 32 had a lower risk contribution than their corresponding weights in the MST-Portfolio 2, noting that the x-axis represents the selected stocks in the MST-Portfolio 2, with the following labels:   Table 5 shows the weights and the risk contribution of each stock constituting the MST-Portfolio 2 to the risk of the portfolio. Figure 5 gives a visualization of the weights/risk contribution which allows us to say that the largest risk contribution to the MST-Portfolio 2 volatility has been the JET stock, which contributed by 0.0648 to portfolio volatility with a corresponding weight of 0.0294, followed by the DIS and BMCI stocks. On the other hand, the smallest risk contribution corresponds to the BOA stock, followed by the MIC and DEH stocks. It looks like the BOA stock has done a good job as a volatility dampener; it has a 0.00910 allocation but weakly contributes by 0.00639 to volatility. In addition, it can be deduced that 15 stocks out of 32 had a lower risk contribution than their corresponding weights in the MST-Portfolio 2, noting that the x-axis represents the selected stocks in the MST-Portfolio 2, with the following labels:  Figure 6 shows the performance and drawdowns of the MV Portfolio, EW Portfolio, Rebalanced Portfolio and the two suggested portfolios: MST-Portfolio and MST-Portfolio 2. Starting from 2017, the MST-Portfolio 2 has the highest cumulative returns, while the EW Portfolio is less volatile than the other portfolios. The MST-Portfolio seems like a balance between the MV Portfolio and MST-Portfolio 2. Furthermore, the EW Portfolio seems an interesting one here since both its return and volatility are acceptable, while it brings simplicity to the investment. The Rebalanced Portfolio shows a good trend relative to the cumulative returns until 2018; after this year, it had experienced a decline compared to the MST-Portfolio, which was able to keep an uptrend during this period. In addition, the MV Portfolio was able to absorb the fall that occurred during the COVID-19 crisis and the Rebalanced Portfolio underperforms the MST-Portfolio 2. The suggested strategy shows a remarkably good performance for the MST-Portfolio 2, but in the period prior to 2017, the suggested strategy performs rather poorly. According to Bai and Perron (2003) MBPT as shown in Figure 1, this behavior is in line with Bekaert and Harvey (2002) studying the market finance, and the Malagoli (2016) paper concerning managing risk in institutional portfolios. By analyzing the performance over time, we notice that the MST-Portfolio and MST-Portfolio 2 show a good performance post-COVID-19 crisis-insights that can help investors and active managers when optimizing their portfolios.   Figure 6 shows the performance and drawdowns of the MV Portfolio, EW Portfolio, Rebalanced Portfolio and the two suggested portfolios: MST-Portfolio and MST-Portfolio 2. Starting from 2017, the MST-Portfolio 2 has the highest cumulative returns, while the EW Portfolio is less volatile than the other portfolios. The MST-Portfolio seems like a balance between the MV Portfolio and MST-Portfolio 2. Furthermore, the EW Portfolio seems an interesting one here since both its return and volatility are acceptable, while it brings simplicity to the investment. The Rebalanced Portfolio shows a good trend relative to the cumulative returns until 2018; after this year, it had experienced a decline compared to the MST-Portfolio, which was able to keep an uptrend during this period. In addition, the MV Portfolio was able to absorb the fall that occurred during the COVID-19 crisis and the Rebalanced Portfolio underperforms the MST-Portfolio 2. The suggested strategy shows a remarkably good performance for the MST-Portfolio 2, but in the period prior to 2017, the suggested strategy performs rather poorly. According to Bai and Perron (2003) MBPT as shown in Figure 1, this behavior is in line with Bekaert and Harvey (2002) studying the market finance, and the Malagoli (2016) paper concerning managing risk in institutional portfolios. By analyzing the performance over time, we notice that the MST-Portfolio and

Network Construction
A Network Structure is assigned to a connected, undirected, and weighted graph ( , , ), where = 1 , . , corresponds to a set of stocks and every stock is represented as a node where = 1 , . , is the edge set. The , represents the edge weight between nodes and , with as the weighted adjacency matrix, and , ∈ . The

Network Construction
A Network Structure is assigned to a connected, undirected, and weighted graph G(V, E, W), where V = v 1 , ., v n corresponds to a set of stocks and every stock is represented as a node where E = e 1 , ., e n is the edge set. The w i,j represents the edge weight between nodes v i and v j , with W as the weighted adjacency matrix, and w i,j ∈ W. The calculated distance matrix using Gower distance metric has been used for the construction of timevarying networks, and for portfolio optimization. The larger/higher the distance is, the less interconnected the stocks are, based on which edges are kept. In the next subsection, we discussed the used approach for the construction of the set E MST which is the MST method.

Minimum Spanning Tree
The MST graph was created using the well-known approach described by Mantegna and Stanley (1999), by considering stocks as nodes and the edges corresponding to the distance between them extracted from the correlation coefficient matrix. First, one must calculate the daily historical log returns of stocks composing the MASI index. Second, the cross-correlation coefficient was calculated using Formula (1). In this formula, the correlation coefficient ρ t i,j represents the edge linking vertices i and j, while . is the statistical mean of r t i during this work. The correlation coefficients range from −1 to 1: Aiming to implement the MST, one must define the distance between nodes respecting some set of conditions: To build the MST network, d ij = 1 2 1 − ρ ij is used, where the correlation between the log returns of stocks i and j is represented by ρ ij , and d ij represents the weight assigned to the edge connecting the stocks i and j. The MST presented as T is generated from an N × (N − 1)/2 connections data metric to a minimized total weight of V − 1 isolated edges based on Prim's algorithm (Prim 1957).
In this paper, we used the MST as the base Network Structure based on the Gower distance metric as distance matrix. Given a connected and undirected weighted graph G(V u , E, W), the MST is a tree T(V u , E MST , W MST ) ⊆ G with minimum total edge defined by Formula (4). Where g is subgraph of G, E MST ⊆ E and W MST ⊆ W. The w MST is as follows:

Network Measures
The Network Structure provides essential information regarding each asset's relative role with respect to the full portfolio. Converting the structure into quantitative measures is an important task of Network Science. The importance of a single vertex of a social network has been widely studied, and in the literature, several measures have been introduced to associate a quantitative measure to this concept. Different measures evaluate different ways in which a vertex can be important or marginal within the network. The most used measurements for the MST graph are the DC, BC, CC, EC, HUBS, and AUTHORITIES (Bielstein and Hanauer 2019;Kleinberg 1999). For each measure, ranks have been calculated in a downward way so that central vertices have been assigned advanced rankings in contrary to the peripheral ones. Centrality and peripherality measurements are not independent and, in fact, they are all shown to be positively correlated with each other.

Network-Based Allocation Concepts
It is possible to exploit the Network Structure to improve the investment decisions. In the literature and among practitioners, it has already been used for both portfolio selection and allocation. Pozzi et al. (2013) constructed out-of-sample outperforming diversified portfolios using financial networks. They employed the MST and the PMFG to demonstrate that portfolios built with peripheral stocks outperform portfolios built with central or randomly chosen stocks. Clemente et al. (2021) transferred the optimization problem of the minimum variance portfolio to financial networks using a clustering coefficient to measure an asset level of inter-connectivity within the system. Výrost et al. (2019) used sparse graphs to build multi-asset portfolios where the allocated weights fulfil constraints derived from different centrality measures. Many allocation methods for benchmarking the network-based allocation exist; let us briefly introduce some of them.

Equal Weighting Portfolio (EW Portfolio)
An EWP gives the same importance to each asset. It is ignoring the volatility of the asset and the dependency structure of the portfolio, which means that the weights are given by w i = 1 N for each asset i. Naïve risk parity (NRP) or inverse volatility portfolio weighs the assets in inverse proportion to their volatility w i = (σ i ) −1 ∑ j (σj) −1 (Roncalli 2013). The method is often called naïve since it fully neglects the dependency structure of the portfolio and allocates the weights only with respect to each asset's historical volatility.

Minimum Variance Portfolio (MVP)
The MVP (Markowitz 1952) is aiming at minimizing the variance of the portfolio, noting that for a full investment, the absolute weights sum up to 1 together with either a long-only constraint, in the long-only portfolio, or a constraint given by the sign of a momentum indicator in a momentum strategy. The weights are determined by resolving the following quadratic optimization problem argmin w 1 2 w T Σw, respecting the given constraints where Σ denotes the covariance matrix. MVP often tends to show a high concentration in only a few low-volatility assets.

Inverse Degree Centrality Portfolio (IDCP)
For portfolio of uncorrelated assets, NRP allocates the weights such that all assets contribute the same risk to the portfolio. Similarly, we introduce the IDCP; let DC i denote the degree centrality for asset i within a predefined network. The weights for the IDCP are then defined by w IDCP i = (σ i DC i ) −1 ∑ j (σjDCj) −1 . The greater the volatility and the more central the asset, the lower its allocated weight. In this way, the strategy privileges the less connected, peripheral assets, and penalizes the assets with a high level of centrality, aiming at a well-diversified portfolio.

Diversification Measures
There are numerous measures of diversification that have been proposed in the literature, and each has its own pros and cons. This paper discusses four commonly used measures: the DR, DD, DD*, and MRC. 4.8.1. Diversification Ratio Choueifaty et al. (2013) presented the DR which can be defined as the ratio of a portfolio's weighted average of volatilities divided by its overall volatility. The DR calculates the level of diversification achieved by investing in assets that are not perfectly correlated. Another way to represent the DR is to consider a portfolio which is exposed to F independent risk factors. Moreover, the portfolio's exposure to each risk factor is inversely proportional to the factor's volatility so that the risk budget of this portfolio is equally allocated across all risk factors and the DR squared given by DR 2 = F.
Formally, given a portfolio composed of N assets (X 1 ., X N ) and weights (w 1 ., w n ), where σ i is the volatility of asset i and σ P is the portfolio volatility. According to Choueifaty et al. (2013), DR embodies the very nature of diversification: the volatility of the overall portfolio is less than or equal to the assets' volatilities' weighted sum. In order to completely understand the intuition behind this ratio, an interesting decomposition of it has been formalized in Choueifaty et al. (2013). The decomposition has the following form: DR(w) = [ρ(w)(1 − CR(w)) + CR(w)] − 1 2 , where the portfolio's asset-volatility-weighted average correlation is depicted by ρ(w) and the portfolio volatility-weighted concentration measure CR is indicated by CR(w). These two elements are defined as: These equations show that a portfolio with a high concentration in a few assets or a portfolio made up of highly correlated assets will have a low DR and be poorly diversified. In other words, the DR increases as the portfolio's weighted correlation ρ(w) or the portfolio's concentration ratio CR(w) decreases, and vice versa. The DR will be equal to 1, representing a fully concentrated, single-asset portfolio, when the correlations between assets or the CR are equal to 1.

Diversification Delta
The DD introduced by Vermorken et al. (2012) is a measure of the diversity of a portfolio. It is calculated by taking individual assets' weighted average entropy and subtracting the entropy of the entire portfolio, then dividing this result by the assets' weighted average entropy. This calculation uses exponential entropy as suggested by Campbell (1966) to avoid singularities while still accurately representing the uncertainty of the portfolio.
The DD of a portfolio that consists of N risky assets (X 1 ., X N ) with corresponding weights (w 1 ., w n ), where the sum of the weights equals 1 with ∑ n i=1 w i = 1 is formally defined as: The DD is a ratio that compares the individual weighted assets and the portfolio. This ratio aims to measure the diversification impact of a portfolio by taking into account the entropy of the assets and comparing it with the entropy of the portfolio. Thus, the greater the level of entropy, the greater the uncertainty, and vice versa. The possible values of the ratio are ranged between 0 and 1. While analyzing a portfolio using a ratio that compares the uncertainty of individual assets with the uncertainty of the portfolio as a whole can be a useful method for quantifying the impact of diversification, however, the DD has been shown to have several limitations, as demonstrated by Flores et al. (2017).

Diversification Delta Star
In order to address the DD issues, have proposed to measure the uncertainty using the exponential entropy and formulated the revised Diversification Delta: The DD* differs from the original DD proposed by Vermorken et al. (2012) in that it uses a weighted mean of the exponential entropies of individual assets, rather than exponential assets, in both the numerator and denominator.

Marginal Risk Contributions
To determine the portion of the overall portfolio risk that is caused by component i, or the risk contribution of component i, one must calculate the product of the allocation in i and its MRC, which is determined by the change in the total portfolio risk resulting from a very small increase in the holdings of component i. Therefore, a well-diversified portfolio is one in which all stocks have the same marginal contribution to the portfolio total risk. The standard deviation can be used to measure the total risk of a portfolio, which can be used to calculate each stock contribution to the overall portfolio risk. The MRC of an asset class, represented by ∂ x i σ p , can be calculated using the following expression: The risk contribution from an asset i is calculated by multiplying the allocation of the asset by its MRC. This can be expressed as: In addition, the overall portfolio risk is simply the sum of the individual risk contributions of each asset: . For the purpose of our analysis, we used the risk contribution (RC i ) as the measure.

Backtesting
Backtesting is an essential component of portfolio management and it is frequently employed to access and compare various statistical models. It is the process of evaluating the performance of a trading strategy or investment portfolio using historical data. It involves simulating the application of the strategy or portfolio over a period of time in the past and analyzing the resulting returns. It can be used to evaluate the potential profitability of a strategy or portfolio and determining the best rebalancing strategy (Buetow et al. 2002). The idea behind it is that strategies that have been successful in the past are likely to continue to be effective in the future. The results provide statistical information that can be utilized to assess the efficiency of a strategy. Nevertheless, the outcomes of this method are heavily influenced by the market movements during the tested period. It is usually a good practice to do a backtest over a long period which includes various market conditions. A portfolio backtesting is created based on the following parameters: the number of rebalance dates, first rebalance date, last rebalance date, training period, and the rolling window. This portfolio was compared with the existing portfolios to better evaluate their performance.

Discussion
The objective of this paper is to expand the current literature on portfolio optimization. The MST model provides a systematic approach to the construction of optimal portfolios, which can lead to better risk-return tradeoffs. The method has been applied to various types of portfolios, including international equity portfolios, commodity portfolios, and bond portfolios, and, in this paper, we used portfolios including stocks composing the MASI index, which enhances the Markowitz MV model by incorporating graph theory into portfolio optimization. The study yields several important findings. Firstly, the performance of various portfolio optimization methods, including MST-based portfolios, MV Portfolio, and EWP were compared. Then, the experimental results demonstrate that MST-Portfolio 2 outperforms the other models, indicating that it is a better investment choice demonstrating a higher cumulative return and experiencing the smallest maximum drawdown compared to the other portfolios utilized in this study.
This study's findings confirm the earlier work in the field and demonstrate the practical utility of the proposed method. These findings are consistent with the conclusions drawn by Pozzi et al. (2013) supporting the idea that portfolios obtained using MSTs can outperform traditional portfolios. The authors constructed MSTs for a variety of financial markets and used them to construct portfolios consisting of peripheral assets (those that are less well-connected to the rest of the market) as well as central assets (those that are highly connected). The authors found that, in general, portfolios consisting of peripheral assets tended to outperform those consisting of central assets. They also found that the performance of peripheral portfolios was less sensitive to market fluctuations and more resilient to financial crises. However, the authors caution that the outperformance of peripheral portfolios is not guaranteed and may depend on a variety of factors, including market conditions and the specific assets being considered. In addition, Danko et al. (2020) presents an alternative method for constructing a portfolio using the MST technique, which contributes to the existing knowledge by offering a new approach based on graph theory. The paper demonstrates that this method is particularly suitable for individual investors who want to create their own investment portfolios. The authors analyzed the results and found that the proposed method, on average, provides the best appreciation of the invested resources and the least amount of risk in terms of relative variability. This makes it a highly appealing option for individual investors.

Conclusions
Network Structure provides a robust and powerful tool to describe interconnections between individual stocks and illustrates how contagion effects can spread out over financial markets. Starting from the complete graph, the MST-filtered graphs can uncover and at the same time retain the most important relationships within a portfolio. This subgraph seems to provide a more stable structure than the complete graph or the full correlation matrix and, therefore, this property can be utilized to build out-of-sample well-diversified and robust portfolios. This research used the MST method based on DC and ICDP measures for portfolio optimization and tries to demonstrate that results are improved when using a Network Structure model. In other words, it compares the performance of the suggested portfolios with the MV Portfolio, EW Portfolio, and both MST-Portfolio and MST-Portfolio 2, using performance measures and backtesting. The backtesting suggested that the two proposed portfolios have the potential to outperform competing traditional portfolio techniques. They can improve diversification and provide downside protection in tail events. The suggested portfolio optimization using the MST graph can help investors and active managers to make the right decision. The proposed strategy has shown that the two portfolios, MST-Portfolio and MST-Portfolio 2, are well-performing and robust compared to the three other portfolios, which are the MV Portfolio, the Rebalanced Portfolio, and the EW Portfolio. In this article, we did not consider any fees associated with acquiring and maintaining stocks in the portfolio. During periods of extreme market returns (such as a sharp ratio climb or plunge), the use of Pearson's correlation may not be appropriate. Future research will focus on more pertinent methods that may yield more relevant results