An optimization model for minimizing systemic risk

This paper proposes an optimal allocation model with the main aim to minimize systemic risk related to the sovereign risk of a set of countries. The reference methodological environment is that of complex networks theory. Specifically, we consider the weighted clustering coefficient as a proxy of systemic risk, while the interconnections among countries are captured by the relationships among default probabilities of the set of countries under consideration. The selected optimization criterion is based on minimization of the mean absolute deviation. We perform empirical analyses to validate the theoretical predictions, and interpret the findings in the context of the proposed model.

2008, the sovereign credit default swap (CDS) market attracted considerable attention, which peaked in flight to safety episodes in May 2010 [4]. Sovereign debt markets in several countries came under stress, and massive sell-offs in government bonds were observed. High CDS quotes during that period were interpreted as falling market liquidity and also as concerns about an increasing number of credit rating downgrades. In other words, since the sovereign Euro crisis, CDS spreads have been considered as warning signaling tools that may increase the perception of government credit riskiness and, consequently, the systemic risk.
In this context, the concept of systemic risk refers to the possibility that a collapse of one of the components of a complex system leads to the instability or breakdown of the entire system. Financial systems are often highly interconnected, and such interconnections contribute to risk spreading. The possibility of cascading failures, that is the default of one financial agent might trigger defaults of others, makes systemic risk extremely dangerous for the whole system.
Several scholars pointed attention to the connection between CDS spreads and systemic risk. For instance, Ang and Longstaff [1] studied the systemic risk component in sovereign credit spreads by comparing the CDSs issued in the USA and those issued within the Eurozone. They found that the systemic component was larger among Eurozone sovereigns and mainly determined by global financial variables. Caceres et al. [7] assessed that the relative weight of global risk aversion and of country-specific risks changes with time. The persistence of local or global factors mainly depends on the state of the economy. Augustin and Tédongap [2] confirmed the existence of time-varying risk premia in sovereign spreads as compensation for exposure to US macroeconomic risk. Capponi et al. [8] dealt with sovereign risk debt in the context of network. In particular, the authors investigated how the interbank network structure and the distribution of sovereign debt holdings jointly affect the optimal bailout policy. The authors showed that the "too interconnected to fail" problem is exacerbated by the fact that banks are exposed to their sovereign's default risk because of a large amount of domestic public debt in their portfolio and, at the same time, governments resort to public bailouts when their domestic banking sector is in trouble. In this paper we deal with an optimization problem where the decision maker aims at minimizing the systemic sovereign risk of a set of interconnected countries. To this aim, the economic agent optimally selects his country-based exposure to sovereign and systemic risks.
We define systemic risk in the context of a global network where nodes are countries and weights of edges reflect the intensity of their relations. We measure such intensities by means of CDS-implied sovereign default probabilities and assume that the systemic effect can be represented through a suitable function of these probabilities.
Since interconnections are strictly related to the network structure (see, e.g., [31,45]), we model them by using the weighted clustering coefficient [39], which represents a network indicator measuring the level of cliquishness of the neighbouring of the nodes. This network indicator has been used in the literature to identify different over time levels of systemic risk in the market (see e.g. [5,35,46]). Indeed, any non-isolated node i is connected with other nodes of the network. In turn, such nodes are connected with each other, so that there is the possibility of having one or more triangles around i. Nodes adjacent to i become more interconnected as the number of existing triangles approaches the number of the potential ones. Therefore, the clustering coefficient of the network we used here is interpreted as a proxy of the systemic risk of the network itself.
The employed optimization criterion is based on the minimization of a suitably considered risk measure, the mean absolute deviation (MAD) (see [30,49]). The MAD metric makes the problem tractable and provides interpretable insights as it can be formalized as a linear programming one. Moreover, due to its generality, it does not require any specific distributional assumption. The useful properties of MAD let such a risk measure be particularly suitable for portfolio models and their applications (see e.g. [29,48]). Since our proposal deals with clustering coefficients and systemic risk, it is structurally different from the classical financial allocation models and cannot be compared taking classical models as benchmarks (as in [3,14]).
Concerning the use of optimization techniques for systemic risk minimization, our approach is in line with the widely-cited European Central Bank (ECB) research paper by [24]. The authors propose a new measure of systemic risk in the financial system, named Composite Indicator of Systemic Stress (CISS). Such a measure is methodologically grounded on portfolio theory and it is formally given by the aggregation of five categories of stress measures related to five specific sectors as a weighted combination. Weights are portfolio quotes, and the higher their values, the more relevant is the stress of the related market segment. Weights are fixed a priori on the basis of the characteristics of stress measures and their connections, and they are periodically calibrated by ECB. Thus, CISS represents a systemic risk measure based on the preliminary statement of the relative relevance of the sectors associated with the stress measures. The popularity of CISS as a systemic risk measure has been certified by the literature which has proposed application of CISS to several contexts (see, e.g., [16,17,21,33,34]).
In our study, we detect the relevance of each country through a portfolio-type optimization procedure, so that portfolio weights are not fixed a priori but derived through an optimization model. Portfolio quotes describe the relative relevance of the countries as systemically risky agents within the overall system. In accord with CISS, the relative importance of the country as systemically risky element in the overall system grows as the portfolio weight associated with a given country increases. In particular, a high value of the weight means that the related country plays a relevant role in reducing (i.e., minimizing) systemic risk. We then contribute to the literature providing a systemic risk measure of a system of countries and identifying the systemically relevant countries among the considered ones.
An empirical analysis has been developed to validate the model. The systemic risk of a set of 13 European countries is considered on the basis of the forward-looking information implied in the sovereign CDS spreads, which are available on a daily basis. The analysis is time dependent, and a time period ranging from June 2003 to June 2017 is considered. From sovereign CDS quotes, we can derive the probability of default of each country. Two different strategies are taken into account: long-term and short-term frameworks. These two settings lead to different optimal solutions. The long-term framework provides insights into the evolution properties of such a risk, while the short-term framework is more effective in understanding the point-wise values. In general, results reflect the financial and economic reality of the European countries in times of crisis, highlighting also the disparities among members of the European Union. In particular, the obtained results show that clustering coefficients emphasize the main facts that characterize the European sovereign debt crisis and the already mentioned flight to safety episodes. The clustering coefficient can be viewed as a new indicator to assess the evolution of the sovereign systemic risk in a geographical area. Specifically, an increase of the clustering coefficient can reflect market participants' perception of high failure risk as well as their view that the probability of common failings is large. In addition, the weighted clustering coefficient reflects the various degrees of importance of different countries in contributing to the sovereign systemic risk.
The rest of the paper is organized as follows. Section 2 is devoted to formalization of the network framework we are embedded in. Section 3 contains the formal definition of the systemic risk concept in the portfolio context we are dealing with. Section 4 introduces the minimum systemic risk portfolio model, with its related considered measures. Section 5 presents and discusses the empirical experiments that validate the theoretical results. Further-more, in Sect. 5.1 we report several sensitivities over the range of credible model parameters as well as a comparison with the use of a Value at Risk (VaR) risk measure. Section 6 provides conclusions.

The network
The system is described through a network 1 where N nodes represent countries, collected in a set V = {1, . . . , N }, and each pair of nodes i and j is connected by a link (i, j). The effect of one country's influence on another is measured by suitable weights that are built-as we will see below-according to the default probabilities of the neighbourhood countries, which are inferred from sovereign CDSs, hence mirroring their respective levels of sovereign risk. In the empirical experiments, we consider a set of N = 13 European countries.
To construct the weighted adjacency matrix of the network, we move from the evidence that the sovereign risk of a country in V varies with time and it is implied in its sovereign CDS spreads. Specifically, suppose that T -joint realizations of CDS quotes are available for N countries. For t ∈ {1, . . . , T } and i ∈ V , we denote the CDS spread of country i at time t as s i (t). The implied probability of default P i (t) of country i at time t is obtained by CDS spread, s i (t), and the recovery rate in case of default, Rec, by using the following formula (see e.g. [13,15,26]): As we will see, we set Rec = 0.40 in the empirical analysis. Such a setting is consistent with a wide set of authoritative reference studies (see e.g. [15,27] and the monograph of [25]). One can reasonably argue that the network model might also be developed by using CDS spreads directly. However, there are two reasons for preferring default probabilities to credit spreads. First, the events under investigation are the possible defaults of the considered countries. In this respect, it is worth pointing out that CDS spreads allow insights to be gained on the creditworthiness of the countries in terms of their default probabilities. Thus, we have provided a more intuitive analysis of default probabilities rather than the less intuitive one of CDS spreads. Second, dealing with probabilities allow formalization of the stochastic dependence structure among the countries.
We assume that the mutual influence of the sovereign risks of countries i and j at time t is measured through the product of default probabilities of both countries, so that we define: The rationale behind (1) is that the mutual influence between couples of countries grows with their default probabilities. Taking the weights as in (1) means that the defaults of the countries are independent events. As explained below, such assumption is reasonable. A stylized fact in finance and economics is that countries and markets are more positively correlated in situations of financial distress and negative business cycles. Thus, even if we do not have a detailed idea about the correlation between possible default events, we expect a positive one. In this case, if a country is experiencing financial distress, then other countries of the system should also be involved in such a negative economic outlook. When setting independence, we remove such an amplification effect. Thus, our results tend to isolate the most relevant countries in the context of systemic risk without taking into account side effects due to positive correlations. Significantly, the independence assumption provides an underestimation of the risk. Hence, if a country is relevant for systemic risk under independence, then it would be really taken into consideration and has to be at the core of further analysis and policy implementation.
However, we have also tested the effects of the removal of the independence assumption (see Sect. 5.1.1 for details), to provide a wider view of the systemic risk problem.
By construction, the connection between the risk profiles of countries i and j at time t increases as the value of w i j (t) grows. Since w i j (t) ∈ [0, 1], the maximum level of interaction between i and j-in terms of riskiness-is achieved when P i (t) = P j (t) = 1. Moreover, a country with null default probability (then with w i j (t) = 0) does not influence and is not affected by other countries in the system. As we will see, the case of null weights does not appear in our empirical analysis, since all the considered networks are complete. The N -square symmetric matrix at time t is W(t) = [w i j (t)] i, j∈V , representing the adjacency relations of the network and the weights associated with edges at time t. As the network G is complete, all nodes have the same degree, N − 1 informative measure, capturing most of the interconnections.

Definition of systemic risk
As already mentioned in the Introduction, the portfolio-based systemic risk measure considered in this paper is conceptualized on the scientific basis of CISS (Composite Indicator of Systemic Stress), introduced by [24]. This indicator is obtained by combining different subindices corresponding to specific sectors in a "portfolio" that well capture different aspects of financial distress. Formally, the CISS at time t is computed as product between the weighted vector of subindices and the matrix of time-varying cross-correlation coefficients at time t. In [24], the portfolio shares (the subindices' weights) are not the result of an optimization procedure, but are determined "a priori", on the basis of its relative importance for real economic activity. The indicator then accounts for several factors, as financial distress is reflected on the real economy. Inspired by the idea of CISS, in our setting portfolio weights describe the relative relevance of the countries as systemically risky agents within the overall system. We refer in our approach to a single indicator-the clustering coefficient-including all countries with different weights. Unlike CISS, weights in our model are obtained by solving an optimization problem that takes into account the role of the countries to reduce the risk. In particular, portfolio quotes are dimensionless quantities and provide the scores of countries in the context of systemic risk. In this, we are in agreement with the theoretical conceptualization of CISS, where the shares of the portfolio measure countries' relevance for real economies. We can derive the relative systemic importance of a country by means of CISS, so that our approach can be efficiently compared with that in [24] (see also Sect. 5.1.4). In accord with CISS, the relative systemic importance of the country in the overall system grows as its portfolio weight increases. More specifically, a high value of the weight means that the country plays a relevant role in reducing (i.e., minimizing) systemic risk.
Despite this similarity, we depart from CISS in a relevant respect. The weights of CISS are fixed a priori on the basis of the characteristics of stress measures and their connections. Hence, CISS represents a systemic risk measure based on a preliminary statement of the relative relevance of the involved economic sectors. In our study, we detect the relevance of each country through a portfolio optimization procedure. In this respect, portfolio quotes are not fixed a priori, but they are derived through an optimization model.
A very important aspect of both CISS, and our systemic risk model, is the way in which nodes are connected. CISS includes in its formulation the correlation coefficients between couples of stress measures. As explained in Sect. 2, in our setting two different countries are strongly connected when they have, on average, a high level of default probability. Thus, as in the context of CISS, we create a network model where high connections are represented by a common behavior. According to the standard conceptualization, in our model, we view the systemic risk under two different perspectives: on the one hand, it is associated with the instability of the system in the presence of a (negative) exogenous shock; on the other hand, it is assumed to be high in the presence of highly interconnected systems. Specifically, our proposal is to measure systemic risk by using a combination of the fluctuations of the community structure of the system along with the strength of the community structure itself. Indeed, high fluctuations are associated with high instability and uncertainty, and hence with high systemic risk; moreover, a high level of community structure fosters the propagations of shocks. The idea is that the occurrence of a negative shock generates an increase in the default probability of one or more countries, which in turn provides stronger connections among some nodes. If the level of the community structure of the network tends to be stable over time, the shock is expected to be efficiently absorbed. Differently, a highly volatile community structure would lead to a strong aggregated fluctuation of the system in the presence of microscopic shocks, and thus to a high level of systemic risk. Shock spreading is, of course, also dependent from the interconnectivity of the network.
In the context of the community structure of a complex network, the clustering coefficient is acknowledged in the literature to be particularly suitable for providing a measure of the strength of the communities (see e.g. [11,41] and reference therein). It is worth stressing once again that the concept of systemic risk is related to the interconnection of the system. In turn, interconnection refers to clusters of nodes or, in other words, to communities. Therefore, we need a measure that is meaningful in expressing this specific aspect.
We define the clustering coefficient for node i at time t in a time-varying setting as follows: where t = 1, . . . , T and i ∈ V . Notice thatC i (t) has been constructed by extending to a multi-period setting the coefficient 2 proposed by [38,39]. In particular, as w i j (t) ∈ [0, 1], no further normalization is required. It is worth noting that interconnections can also be represented by cycles of length n > 3, and not by triangles. In this perspective, the literature presents some centrality measures referring to n cycles (see e.g. [19]). However, the length of the cycle affects the node itself, because the longer the cycle, the less the influence of the cycle on the node. As the network is complete, nodes are strongly interconnected and the clustering coefficient is the most informative measure, capturing most of the interconnections. 3 Under a purely financial perspective, one can argue that CDS volatility or CDS correlation can be used in our specific context to detect the patterns of the sovereign default probabilities. However, such measures present a limit. The CDS volatility does not take into account the interconnections among the countries, so that the role of their mutual influence appears to be lost. The CDS correlation provides restrictive analysis of the mutual influence between couples of countries, without taking into account their interactions with the surrounding countries and the possible presence of a noticeable community structure. The introduction of the clustering coefficient overcomes such limitations.
We denote as C i the vector of the clustering coefficientsC i 's computed over time t = 1, . . . , T , so that: At time t, we define a portfolio by As we will see in detail in the next section, x k (t) represents the relative relevance of country k as systemic risk minimizer at time t. This explains why it is taken to be non-negative and belonging to a set of normalized quantities.
Following the arguments developed above, systemic risk is associated with a given portfolio x; it is minimized under a bicriteria objective related to the average of the oscillations ofC around its mean and also the mean of the clustering coefficient. Therefore, we view C i as a statistical variable whose realizations are the clustering coefficients of node i at times t = 1, . . . , T , which are presented in formula (3) in a vectorial form in order to convey the presence of a time order in the realizations . We define the mean ofC with entries as in (4) and associated with a portfolio x-namely, E[C]-by In the same way, we define the MAD ofC associated with a portfolio x-namely, V[C]-by We are now ready to provide the definition of systemic risk of a portfolio through a preference criterion.

Definition 1 Consider two portfolios x
x B (T )), and denote the related vectors of clustering coefficients whose entries are as in (4) byC A andC B , respectively. We say that the systemic risk of x A is higher than that of x B when with at least one strict inequality.
Definition 1 provides the basis of the optimization problems, which will be developed in the next section.

Sovereign systemic risk-minimization problems
In this section we move from the arguments developed in the previous section and from Definition 1, and conceptualize the systemic risk-minimization problems.
In particular, following Definition 1, we consider an agent whose aim is to select the portfolio x for minimizing the MAD of the related clustering coefficientC under the constraint that the value E[C] in (5) is below a fixed thresholdμ. Therefore, the risk-minimization problem we deal with can be formalized through a reinterpretation of a classical portfolio model. The general form of the optimal portfolio problem can be formalized as follows: with constraints: whereμ represents the highest level of expected clustering coefficient that can be tolerated by the minimizing agent. We denote the optimal portfolio as (x (1), . . . , x (T )).
We remark here that the weights of the optimal portfolio describe the relative relevance of the considered countries as systemically risky agents within the overall system. In particular, each weight x k represents the relative importance of country k in the context of minimization of the risk of the overall system, so that the contribution of country k to the reduction of the systemic risk of the overall system grows with x k . Such an interpretation of the x values and assessment of the ones minimizing the systemic risk lead to noticeable insights for regulators, central banks and also retail investors. In particular, the identification of the most systematically relevant countries might drive regulators and central banks to implement policies targeted on the features of the economic system of specific countries, and investors to take positions in the financial markets, in the light of fostering the stability of the overall system.
Moreover, we move from Definition 1, where we have presented a portfolio-based concept of systemic risk through a bicriteria preference rule. Such an approach is totally in line with the constrained optimization problem in (8)- (9). In this respect, it is interesting to note the similarity of our framework with the classical mean-variance portfolio model. Also in our case, we have an apparent trade-off between MAD and expectation of the clustering coefficient, with the remarkable difference that both of them have to be minimized.
For a general discussion of the linearization error, we refer to [6], where authors provide an extensive and formal discussion of the error due to the linearization of a nonlinear problem. In a very general sense, the quoted paper leads to two main outcomes. On the one hand, the error is strongly dependent on the specific linearized optimization problem, and no consensus can be achieved on a purely theoretical way-i.e., without considering the characteristics of the considered problem-to describe it. Indeed, the error derives from a numerical study of the peculiar linearized nonlinear problem. On the other hand, a proper estimation of the error can be achieved only by comparing the solution of the linear optimization problem and that of the associated nonlinear one. In particular, authors test four measures for evaluating the error over a suitably built numerical experiments. Evidently, the numerical experiments provided in [6] are properly conceptualized, so that the real solution of the nonlinear problem can be easily computed.
In our case, the analysis of the error can be done only by computing the real solutions of our nonlinear MAD optimal portfolio models and comparing them with the solutions of the linear problems through some of the measures proposed by [6]. Such a computational effort is here unnecessary, since MAD is a classical device for making optimal allocation, and its linearization is a well-established technique. For the specific case of the MAD optimal portfolio problem, Konno and Yamazaki [30] and many followers have already shown that the solution of the linearized model represents a reliable approximation of its nonlinear version. In so doing, such a strand of literature points to an acceptable linearization error in the case of MAD and uses the linearized version of the MAD as an opportunity to be exploited in this types of portfolio models.
Two subproblems of the general setting (8)-(9) are considered here. The first one deals with a multi-period optimization such that portfolios are recombined on a time-period basis; the second one is the one-period case. The former setting considers an economic agent making decisions on short-term horizons, on the basis of periodic observations and updated conditions of the problem. The latter case is associated with a long-term perspective, characterized by an overall analysis of the phenomenon and a definitive decision in terms of portfolio quotes, which remain fixed for the entire time period under consideration.
Short-and long-term frameworks provide very different views on the considered systemic risk problem, and both of them have to be taken into full consideration in a unified setting to obtain a panoramic perspective of the treated theme.
In this respect, it is worth emphasizing here that the results of a risk-minimization procedure are sensitive to the considered time horizon, and one cannot guess a priori what will be the most fruitful procedure at a common future terminal date.
By definition, the short-term setting allows identification of the trajectory of the riskminimizer portfolio in stepwise form. Such an approach is associated with close control of the changing conditions of the problem; nevertheless, it might present drawbacks connected to the possibility that the optimal steps may lead to subsequent negative evolutions of risk levels.
In the context of long-term setting, changing conditions cannot be taken into account over the time period. The selection of the entire trajectory of the optimizing portfolio is performed on the basis of a forecast procedure implemented at the initial time. This is undoubtedly a limit of the long-term approach, which, however, is not affected by the drawbacks characterizing the short-term setting. In the following, we study both frameworks, compare them and draw insights from them.

Long-term time-independent setting
Here we consider x(t) = x, for each t = 1, . . . , T , so that the admissible portfolios are assumed to not vary in the period [0, T ]. The optimal portfolio problem then becomes: with constraints: The resulting optimal portfolio is x L .

Empirical analysis
In this paper, the empirical analyses are based on 5-year sovereign CDS daily quotes in basis points, denominated in US dollars and provided by the Bloomberg platform (standard ISDA 2014). The time period under investigation is 2 April 2003 to 3 July 2017, which includes the bankruptcy of Lehman Brother and the sovereign debt crisis of developed countries, which are associated with increasing levels of signed sovereign CDS contracts. A 5-year CDS was decided upon, as it is commonly considered to be the reference and most liquid one. In particular, the data set is composed of 13 European countries inside and outside the European Union and European Monetary Union. Countries are distributed in four main groups: (a) the core economies France, Germany and the United Kingdom; (b) the most worrying economies-Ireland, Italy, Portugal and Spain; (c) the Eastern economies-Croatia, Czech Republic, Poland, Romania and Turkey; and d) Greece. The first group contains countries with a credit rating of at least A, while the second group is composed of some CDS entities rated worse than A. The third considers a specific geographical area, Eastern economies and Turkey, while the fourth only Greece, which was the first European country that experienced in 2012 a partial default after the constituency of the currency union. The resulting time series considers 3514 days, which result in a total of 40,898 spread observations. 4 The sovereign CDS spreads are considered instruments implicitly reflecting the default probabilities of the considered set of countries. The evolution of the probability of default for each country over time is reported in Fig. 1, where some missing values are shown, especially for Greece (but also Ireland, United Kingdom and Czech Republic), as, mainly due to the sovereign debt crisis, the corresponding sovereign CDSs were not traded during the whole period covered by the data set. As described in Sect. 2, probabilities of default are used to build a complete weighted network for each time period and to compute local clustering coefficients via formulas (1) and (2). By looking at the clustering coefficients in Fig. 1 (right), we observe that several spikes mark some of the key developments in the European sovereign debt crisis. In particular, the period 2003-2008 is characterized by low values of coefficients, while from the beginning of 2009 coefficients rapidly increase reaching, at the end of 2011, values that are 30 times or more larger than they were before. This increase is more noticeable for some specific countries. For instance, creditor's expectations about the ability of the Greek Government to honour its contractual obligations radically changed after 2009, and, therefore, credit spreads rose steeply. This effect is strongly reflected on the local clustering coefficient of this node, which increased by about 500 times from the beginning of 2008. The dramatic rise of sovereign debt spreads for peripheral European countries (see [42]) is also captured. Marked increases (more than 100 times) of clustering coefficients are observed in decreasing order also for Ireland, Italy, Portugal, Spain and France.
This empirical evidence is shown in Fig. 1 and confirms that the clustering coefficient can be seen as a systemic risk measure, capturing the intensity of interactions among countries. Such evidence represents a supporting argument of its suitability for defining an effective systemic risk measure, as already stressed in Sect. 4.
A multi-period optimization, with recombined portfolios at each iteration, was initially applied to the networks. In particular, the problem (12-13) has been solved after applying the linearization described in Sect. 4. We initially focused on sub-periods of 30 days. In this case, the economic agent selects an optimal portfolio in each sub-period on the basis of periodic observation and updated conditions. We report in Fig. 2 the obtained optimal x * S . We observe that in periods characterized by low values of local clustering and volatility, the optimal solution is well diversified (see e.g. [2003][2004][2005][2006][2007]. In other words, several countries contribute to minimizing the systemic risk in the portfolio. However, it is worth nothing that a uniform allocation is not attained since less risky countries (i.e. those with a lower clustering coefficient) provide a higher contribution as a risk minimizer. When volatility increases, the It is noteworthy that the linearization procedure allows solution of the problem in a short time. We also re-formalized the optimization problem by applying the mean semi-absolute deviation (see [10,43]), halving the number of constraints. However, results are equivalent to those obtained by solving the problem based on the MAD metric and the improvement in terms of computational efficiency is not so significant in this context. The analysis has been further extended, expanding the length of each time window to 90 and 180 days (see Fig. 3). Moving towards more long-term analyses, we observe an even lower diversification. In particular, the quotes of the minimum systemic risk portfolios are mainly concentrated on low-risk countries (UK and DE).
As shown in Table 1, this pattern is also more evident when the long-term problem is solved. The optimal solution provides, on average, four different countries when time windows of 1-year length are considered. Finally, problem (14)(15), based on the overall analysis of the evolution of risk over the full period, leads to a full allocation in only one country (DE).
The strong presence of less risky countries in the optimal configuration is also confirmed through analysis of the number of periods where at least 30% of the total is allocated in a single country (see the last four columns of Table 1). We observe that the low level and the low volatility of the German clustering coefficient lead the agent to allocate a significant portion of the portfolio to Germany, in approximately 40% of the sub-periods. Therefore, we initially removed Germany and the United Kingdom from the network to test how they affect the optimal solution (see Fig. 4, left). Focusing only on a short-term view  Table 1 Average (over the sub-periods k) of the optimal exposures to the sovereign risk of countries i:  with 30 day sub-periods, we notice some main differences since 2009. Also in this case, we observe a lower diversification in high volatile periods, but France (FR) and Czech Republic (CZ) appear as the best players. The average weightx * i of these two countries increases to 39.4% and 32.4%, respectively. This phenomenon is even more evident when FR is removed from the network (see Fig. 4, right). In this case, the average allocation in CZ is almost 40%. The motivations for this outcome deserves investigation, but this is outside the scope of the present study. However, some suggestions can be carried out. Under this perspective, we point out that the financial crisis of 2007-2010 did not affect CZ, mainly because of its stable banking sector and the small ratio of the gross domestic product to debt, which is among the smallest in Central and Eastern Europe. Furthermore, the impact of the economic crisis may have been limited also by the existence of the national currency that temporarily weakened during the crisis and, consequently, did not harm exports.
As expected, when less risky countries are removed, a greater diversification is observed. On one hand, Portugal, Italy, Poland and Turkey are characterized by greater average weights. On the other hand, Greece, Romania and Hungary provide values ofx * i in line with those reported in Table 1.

Main sensitivities
In this section we report several sensitivities over the range of credible model parameters as well as a comparison with a portfolio VaR. The aim of the analysis is to measure the consistency of the proposed approach.

Correlation effects
We analyze here the effect of the introduction of pairwise correlation between each couple of countries on the minimum systemic risk portfolio. In particular, we define link weights as the joint default probabilities for each couple of countries. Thus, we modify formula (1) by including the effect of default correlation (as provided in [32]): where ρ i, j (t) is the default correlation between CDS spreads of country i and country j at time t.
In the numerical application, we estimate the correlation matrix by considering the same time interval considered in the optimal problem. For instance, in the case of a short-term view with 30 day sub-periods, ρ i, j (t) is computed separately in each sub-period by using 30 bivariate observations for each couple i, j.
To provide an initial comparison with the case of independence (Fig. 1), we display in Fig. 5 (left) the behavior of the clustering coefficient computed using formula (2), by considering in each time period t a network whose link weights have been obtained by (16). In this case, the correlation coefficient ρ i, j (t) has been calibrated using the whole period (i.e. ρ i, j (t) = ρ i, j ∀t). The correlation matrix is reported in Fig. 5 (right). It is noticeable that the positive correlation leads to greater clustering coefficients for all countries. In particular, this effect is considerable during the sovereign debt crisis because of a significant increase of the co-movement among spreads (i.e. a greater level of market correlation). Hence, the coefficients are affected by the higher probability of contagion during a period of turmoil.
Furthermore, it is worth pointing out the lower default probabilities between Greece and UK and Greece and Turkey (TR) when the correlation is considered. Patterns of local clustering coefficients over time (left). Coefficients have been computed using networks whose edge weights have been calibrated via formula (16).
Correlation matrix between marginal default probabilities estimated using data of the whole period (right) The problem has been solved considering joint default correlation in the clustering coefficient Given the joint default probabilities, we solved the optimal problem testing alternative time windows (as in Table 1). As reported in Table 2, results are in line with the case of independence. Focusing on sub-periods of 30 days, we observe again a well-diversified partition in quiet periods (e.g. 2003-2007) and a higher concentration in low-risk countries (UK and DE) in turbulent periods. We notice a greater average share than in the independence case for UK because of a lower correlation with more risky countries. Lower diversification is confirmed for long-term analysis. As in the independence case, only four countries contribute to minimizing risk when time windows of 1-year length are considered. However, it is worth pointing out that the role of Spain (ES) is replaced by TR when the dependency is taken into account. Indeed, we observe that the TR CDS spreads are in line with other European countries since 2011, but with a lower average correlation than other CDSs.

Effect of the maximum level of tolerable risk
We test also the effect of parameterμ on the results. While previous analyses have been developed assuming that the first constraint in (13) is always satisfied, we assume now that the economic agent selects the highest level of clustering coefficient that can be tolerated. In Fig. 6, we therefore test the effect of alternative values ofμ on the optimal exposures. For the sake of brevity, we focus only on a short-term view with sub-periods of 30 days. Furthermore, to assure a consistent comparison,μ has been set, in each time window, equal to the q-quantile of the clustering coefficient distribution. Values of q between 0.05 and 0.5 have been tested.
We notice that, when a lower average level of risk is tolerated, the procedure assures a higher convergence to less risky countries. For instance, 12 countries have a positive share whenμ is equal to the median of the clustering coefficient distribution. Forμ equal to the fifth percentile of the distribution, we find that only five countries (DE, UK, FR, ES and CZ) have a non-negligible role in minimizing risk.

Comparison with a VaR model
We test here the effect of a different risk measure in the optimal portfolio. Thus, we reformulate problem (8)-(9) by replacing the MAD measure with the classical VaR at a specific confidence level α as follows: where Q α is the α-quantile of the distribution and we define the following constraints: Coherently with the systemic risk definition, we defined the VaR approach in (17) by taking into account that the clustering coefficient is preferred to be low rather than high. Thus, VaR minimization will not deal with the left tail of the distribution, as in the classical financial models, but with the right tail. 5 .

Fig. 6
Average optimal exposurex * i for each country obtained by varying the level ofμ. We solve the optimal problem considering 30 day sub-periods and the networks with link weights given by formula (16). In each scenario, the value ofμ has been set, in each time window, equal to the q-quantile of the clustering coefficient distribution. Values of q (reported on the x-axis) vary from 0.5 to 0.05 with a step of 0.025 Problem (17)(18) has been solved on the same data set to provide a consistent comparison with the results obtained using a MAD risk measure. For the sake of brevity, we report only the results derived by considering a short-term view with sub-periods of 30 days and by computing the clustering coefficient on the networks with link weights given by formula (16) (i.e. linear correlation). Differently from the MAD portfolio, the problem cannot be formalized as a linear programming one. Hence, we experimented with very long computational times when we tried to solve this problem with an exact algorithm. To provide a feasible solution we employed the Simulated Annealing algorithm (see [9,22,28]), through an R procedure ( [40]). Obviously, it could be that the selected optimal portfolio is suboptimal. Therefore, to assure a robust result, we tested this possibility by following a Neighborhood Search procedure logic (see [36,44] for an application to portfolio optimization).
It is worth pointing out that the two problems we are comparing focus on different aspects. On the one hand, the MAD minimization is based on a disaggregation between the deviations of the clustering coefficient and its expected value. On the other hand, VaR minimization aims at reducing the right tail of the weighted clustering coefficient distribution. Additionally, the VaR model is strongly dependent on the selection of a proper confidence level. To provide a numerical comparison, we report in Fig. 7 the main results derived by assuming a confidence level of 99%. It is noteworthy how the VaR-portfolio provides a low diversification. Optimal values are concentrated in almost all periods in less risky countries. Since this measure is less sensitive to variation in the central part of the distribution, the procedure typically converges on the country with the lowest clustering coefficient in the period.

Suitability of models: comparison between MAD and VaR models
As previously described, the optimal weights of portfolio x (k) assess the relative relevance of countries as systemically risky agent within the overall system. Hence, a high value of the Indeed, although the two approaches are based on a different framework and pursue different purposes, it is interesting to assess for each window the consistency of the optimal portfolio detected by our model with the systemic risk conditions in the market, provided by CISS. With regard to CISS, we collected data, made available from the European Central Bank, of the Composite Indicator of Sovereign Stress for each country in our sample in the analyzed period. 6 To do this, we focus on 30 days sub-periods and we solve problem (12)(13) considering the clustering coefficient on the networks with link weights given by formula (16)-i.e., in presence of linear correlation. Therefore, we compute the correlation between countries' ranks based on the optimal portfolio and CISS in the same period. In particular, we consider 1-year periods and we rank countries on the basis of the average allocation given by the model in that year, so that the top country is the one with the maximum x (k) i in the considered period. Similarly, we rank countries in increasing order based on CISSi.e., the country with the smallest CISS in the period is ranked as one. Then, the correlation between ranks is computed for each period. Hence, the higher the correlation, the higher the consistency between the model and CISS in the treatment of countries systemic relevance.
The same procedure has been applied by considering a VaR risk measure. Both correlations are reported in Fig. 8. It is noteworthy that a significant positive correlation is observed, hence confirming that the model based on the MAD metric allocates a higher share of portfolio in countries with a higher relevance in minimizing systemic risk also for CISS. We also notice  (12)(13). We considered a short-term view with sub-periods of 30 days and clustering coefficients computed on the networks with link weights given by formula (16). VaR has been evaluated at a confidence level α = 0.99. For each period, light blue bars represent the average CISS that the model based on a MAD risk measure provides a higher correlation than VaR in all time periods. Finally, a good behavior is also observed during the sovereign debt crisis.
From our point of view, the clustering coefficient is a tool for measuring the state of stress of the financial system but it is not necessarily a predictor of systemic crisis-at least-when long time periods are considered. However, we test the behavior of the model in an out-ofsample perspective (see [47]) considering short-term frameworks. In this regard, we divide the whole period 2003-2017 in windows of width -for example, = 30 days. The data of the first window (i.e. from t = 1 to t = ) are used to build the network and to estimate the clustering coefficients. Clustering coefficients are then used to solve the problem (12)(13) in the out-of-sample period (i.e. using data from t = + 1 to t = 2 ). In this period, rank correlation between the optimal portfolio and CISS is then computed. In this way, the timewindow from t = 1 to t = represents a fit period used to calibrate models parameter, while the out-of-sample window from t = + 1 to t = 2 is used to validate the approach testing the consistency of the results with countries' systemic relevance provided by CISS. The process is repeated rolling the window steps forward and the optimal allocation problem is solved in the new out-of-sample window using the network built in the previous period. The same procedure has been applied using a VaR risk measure (i.e. problem (17)(18)). We display in Fig. 9 the correlation coefficients with CISS of both models, by considering also alternative window widths. It is worth pointing out that both models provide a good behavior with a preference for model based on MAD when short-periods are considered. As expected, when a larger width is considered (for instance 6 months or 1 year), models tend to be more aligned, hence providing similar patterns and slight worse results. Finally, we notice that VaR risk measure never performs better than MAD in these analyses.

Fig. 9
Rank correlation between CISS and optimal portfolios (based on MAD (red line) and VaR (black line) risk measures, respectively) computed under an out-of-sample perspective. For CISS, countries' ranks are computed in ascending order. In this case, optimal exposures are derived by solving problem (12)(13), and by using the clustering coefficients observed in the previous window and computed on the networks with link weights given by formula (16). We considered alternative lengths of sub-periods. VaR has been evaluated at a confidence level α = 0.99. For each period, lightblue bars represent the average CISS

Conclusions
This paper has dealt with themes from optimization, finance, complex systems and systemic risk management in a unified perspective. In particular, we have implemented a MAD-based portfolio model for minimizing the exposure to systemic risk, in a sovereign framework, of the network built by the considered countries. Two different portfolio strategies have been taken into account: a multi-period and a one-period portfolio setting. The considered risk measure was the MAD, which seems to be particularly suitable in our context. According to the literature on complex systems, weighted local clustering coefficients are used as proxies for synthesizing the systemic risk. Each country is connected with the others, hence generating a complete network. The network is also weighted, and edge weights are assumed to be directly related to the default probability of the connected countries, so that a high mutual influence should be intended in a negative sense.
The empirical analysis in this paper is based on 13 European countries and, default probabilities are calibrated from their CDS quotes. Marked differences characterize long-term and short-term strategies. In general, results reflect the financial and economic reality of the European countries in times of crisis, highlighting also the disparities among members of the European Union.
Interpretation of the quotes of the optimal portfolio offers an indirect explanation of the use of an undirected network. Indeed, to detect if a country acts as either a risk spreader or a risk absorber is a matter that concerns the risk-propagation process on the network, that is how an external shock is conceptualized and risk spreads in an interconnected system. Even if this is a crucial task, it is out of the scope of the present paper. We aim here to provide a way to measure the relative relevance of the countries as systemically risky agents within the overall system. According to our definition, such a procedure can rank the considered countries in terms of their role in minimizing systemic risk. The rank provides a unified view of the countries and of their interconnections, without a specific focus on shock definition and propagation patterns.
In this perspective, our interest is only on the strength of connections among the different countries, under the point of view of joint default probabilities. In so doing, we consider the mutual influence between two countries as a key ingredient of the introduced definition of systemic risk, without paying attention to the directionality, which is unnecessary in our framework.
The analysis of shock definition and propagation is of particular interest in this field, and we leave such a relevant theme for further research.