key: cord-0047865-l03lt5kv authors: Shalit, Haim title: The Shapley value of regression portfolios date: 2020-07-20 journal: J Asset Manag DOI: 10.1057/s41260-020-00175-0 sha: be37a976dc6d82bd8b29f265b496060ce2e4879e doc_id: 47865 cord_uid: l03lt5kv By viewing portfolio optimization as a cooperative game played by the assets minimizing risk for a given return, investors can compute the exact value each security adds to the common payoff of the game. This is known the Shapley value that imputes the contribution of each asset, by looking at all the possible portfolios in which securities might participate. In this paper I use the Shapley value to decompose the risk and return of optimal portfolios that result from minimizing ordinary least squares. These regression portfolios are identical to tangency portfolios obtained by maximizing the Sharpe ratio of holdings on the mean-variance efficient frontiers. The Shapley value of individual assets is computed using the statistics resulting from the regressions. The value imputation prices assets by their comprehensive contribution to portfolio risk and return. This procedure allows investors to make unbiased decisions when analyzing the inherent risk of their holdings. By running OLS regressions, the Shapley value is calculated for asset allocation using Ibbotson’s aggregate financial data for the years 1926–2019. The purpose of this paper is to apply Shapley value imputation (Shapley 1953) to optimal portfolios being generated by ordinary least-squared (OLS) regressions on financial assets. Recently, Shalit (2017) used the Shapley value to decompose the risk of optimal mean-variance (MV) and mean-Gini (MG) portfolios. The Shapley value originated from cooperative game theory where it was derived for the purpose of measuring the exact contribution of players in a game. Since then, it has become a standard measure in economics, political science, sports, and income inequality. As evidenced by the recent handbook edited by Algaba et al. (2019) , Shapley value has become the norm by which complex allocation problems are solved and priced. In finance, it has been shown to be most adequate in distributing costs of insurance companies, valuing corporate voting rights and attributing risk in the banking system. In investments and portfolio theory the use has been slower. Indeed, only recently have Ortmann (2016) and Colini-Baleschi et al. (2018) implemented the Shapley value for portfolio analysis and for pricing the market risk of individual assets. The main idea behind the Shapley value is to look at all the feasible coalitions of participants in a cooperative game and calculate the benefits each player contributes to the common goal. As each contribution depends upon the order in which players join the coalition, the Shapley value is calculated by averaging the marginal contributions from the arrival of the various players to the specific coalitions. Since portfolio optimization (minimizing risk for a given return) can be conceptualized as a cooperative game played by risky assets, the Shapley value is the natural tool for decomposing portfolio risk into its components. The contribution of assets to the total investment is obtained by tabulating all possible optimal portfolios constructed using all the combinations of available securities. In the present paper, the Shapley value is applied to optimal portfolios obtained by running OLS regressions of stocks returns on a riskless asset. The main advantage of regression portfolios is that raw returns are used to compute optimal portfolio weights without the need to estimate the variance-covariance matrix and the vector of expected returns as in standard MV optimization, thus preventing any sampling error in the efficient frontier. Regression portfolios were developed by Korkie (1982, 1983) in order to use available econometric packages for optimizing MV portfolios. These authors applied the method to test for portfolio efficiency. In a sense, MV portfolio optimization and OLS regression minimization can be viewed as Siamese twins in that they use the same analytical tools from linear algebra to solve the problems. The paper is laid out as follows: First, I introduce Shapley value theory and explain how it can be used to decompose an attribute such as income by it sources as formulated by Shorrocks (2013) for inequality measures. Applying the decomposition theory to financial risk and portfolios follows naturally because inequality and risk measures are closely related. Then, I present Jobson and Korkie (1983) derivation of regression portfolios and establish the optimal weights of a tangency portfolio that maximizes the Sharpe ratio on the efficient frontier. This is the groundwork for demonstrating how optimal MV portfolios are obtained by running regressions. Finally, I follow Conklin (2001, 2010) methodology to calculate the Shapley value of securities using Shapley value regression. The reason for this approach in portfolio analysis is that Shapley values enhance the contribution of predictors in OLS regressions. I use two approaches in this model: The first maximizes the coefficient of multiple determination R 2 . The second approach minimizes the optimal portfolio estimated variance. Combining Shapley value theory and regression portfolios theory for optimal portfolio analysis sheds the light on the true contribution of risky assets in financial investments. The analytical results are exemplified using Ibbotson's (2018) aggregate data on Stocks, Bonds, and Bills from 1926 to 2019. In the following, I explain the concept of Shapley value decomposition for use in regression portfolios. The exposition draws considerably from Shorrocks (2013) who applied the Shapley value to decompose inequality measures by income factors. The investment model used in the present paper is a portfolio of stocks viewed as a cooperative game played by its assets to minimize risk for a specific mean return. The aim of the Shapley value is to measure the exact contribution of each player to the general outcome of the cooperative game. In a portfolio of securities, the optimization outcome derives from the risk inherent in the portfolio. Hence, the Shapley value extracts the true and exact contribution of each asset to the portfolio's total risk. It is important to understand that Shapley value theory ensures that the risk attributed to the various players in the portfolio is anonymous, so that the marginal contributions are independent of the order in which assets are added to or removed from the portfolio, and exact in the sense that all bear the entire risk. Consider a stock market cooperative game whose purpose is to minimize portfolio risk such as the variance. For a set N of n securities, the Shapley value calculates the contribution of each and every security in the portfolio. To capture the symmetric and exact way each security contributes to the complete portfolio, we compute the risk v for each and every subset of stocks S ⊂ N . In total, we have 2 n subsets or coalitions including the empty set. We proceed by computing the marginal contribution of each security to the risk of the subset portfolio it is a member of. For a given coalition, a security k in S contributes marginally to the subset portfolio by where v(S) is the risk of portfolio S, and v(S⧵{k}) is the risk of the portfolio composed of S minus the security k. Portfolios are arranged in some given order, all of which are equally probable. Hence, S⧵{k} is the portfolio that precedes k, and its contribution to coalition S is computed when all the orderings of S are accounted for. Given all the equally probable orderings, one calculates their expected marginal contribution. Thus, it is necessary that the probability that, for a given ordering, the subset portfolio S ⊂ N , k ∈ S is union of security k and the securities that precede it. Two probabilities are used here: First, the probability that k is in s (s being the number of stocks in S) which is equal to 1/n, and second, that S⧵{k} arises when s − 1 securities are randomly chosen from N⧵{k} , that is The Shapley value for security k is obtained by averaging the marginal contributions to the risk of all portfolios for a set of N securities and the risk function v, which is formulated as: or alternatively Naturally, adding the sum of all the Shapley values of all the assets in the portfolio equals its total risk as follows: These equations are the basic formulas needed to calculate the Shapley values. On that basis, in the "Shapley value imputation of regression portfolios" section, I will define a cooperative game set in portfolio optimization and show how to set up its common payoff whenever it is played in a mean-variance framework. (1) In the following section, I present my regression portfolio approach to MV investment analysis. The exposition draws on the works by Jobson and Korkie (1983) and Britten-Jones (1999) who developed the regression portfolio model in order to test for MV efficiency. The approach has been the subject of a dissertation by Brides (2009) and a presentation by Sefton (2007) . In the present paper I use the OLS regression model to compute the Shapley values of assets forming optimal portfolios. I start by constructing MV efficient portfolios. To do so, consider N risky linearly independent assets with excess returns X being returns minus the riskless rate. This choice of assets guarantees that the variance-covariance matrix of asset returns is non-singular. The N-vector denotes the assets' expected excess returns, and w is the N-vector of portfolio weights, such that ∑ N i=1 w i = 1 . Short sales are allowed. The efficient portfolios are obtained by minimizing the portfolio variance 1 2 2 p = 1 2 w � w subject to a required mean return p = w � and the portfolio constraint 1 = w � l , where l is an N-vector of ones. The standard optimization procedure consists of minimizing the Lagrangian with two constraints and deriving the first-order conditions (FOC); the second-order conditions are satisfied by the non-singularity of . For the sake of exposition, we define the following quadratic forms: A = l � −1 , B = � −1 , C = l � −1 l , and D = BC − A 2 . These scalars are positive since the matrix is positive-definite. Using the FOC the optimal portfolio weights are obtained for a given mean return p as: These optimal weights allow us to delineate the efficiency frontier formulated in the standard deviation-mean space by the following hyperbola: Among all the efficient portfolios available on the frontier, the one to be considered for the regression portfolio is the tangency portfolio that maximizes the Sharpe ratio p ∕ p . It is obtained by equating the Sharpe ratio to the slope of the efficient frontier given by Eq. (5). The mean return and variance of the resulting tangency portfolio are shown to be p = B∕A and 2 p = B∕A 2 . Applying these results into Eq. (4) we derive the optimal tangency portfolio weights as: The regression approach to portfolio analysis is an alternative to the method that uses the statistics parameters ( , ) as needed in Eq. (6). Indeed, the idea is to use the T observations of excess returns of the N risky assets, where raw returns are subtracted by the riskless rate. I perform this approach to portfolio selection by minimizing the squared deviations of the excess returns on the constructed portfolio and the excess returns on a perfect riskless position. In line with the familiar OLS regression discourse, I change the notation as follows: Denote by X the T × N matrix of observations returns x t , by the N-vector of portfolio weights w . For every t from 1 to T, I create a portfolio whose returns are x ′ t for a given set of weights . Hence, for the entire sample T, portfolio returns are given by X . Now, I express for each period t a perfect and desirable riskless portfolio with the high return of 1. For the entire sample, this perfect portfolio amounts to a T-vector of ones, labeled as . The investor goal is to attain this perfect portfolio by choosing the weights that minimize the distance between X and . Basically, this results in an artificial OLS regression whose metric minimizes the squared deviations between the computed portfolio and the perfect one. By following Jobson and Korkie (1983) exposition, we express the multiple regression model of the riskless vector over the excess returns X as follows: where is the vector of error terms. The least-squares estimator of portfolio weights ̂ is: As the estimator for the mean vector is = X ′ ∕T , and the estimator for the variance-covariance matrix is = (X − � ) � (X − � )∕T we express the cross-product inverse (X ′ X) −1 as: Therefore, by inserting this result into Eq. (8) we obtain the regression portfolio weights: As we calibrate these weights so they add to 1, we are able to obtain the tangency portfolio weights shown in Eq. (6) as: Although the regression approach to portfolio optimization can easily be used with any econometric package, some caveats are to be enumerated. First, we use as explanatory variables the excess returns and not the returns of uncorrelated risky assets. Second, the dependent variable is a nonstochastic T-vector of ones. Third, there is no intercept; thus, some standard statistics cannot be used. Finally, once the regression is estimated, the estimates have to be scaled to obtain the optimal tangency portfolio weights. Furthermore, we can use the regression approach to delineate the efficiency frontier by parameterizing the riskless perfect portfolio and moving it along the expected value vertical axis as done by Brides (2009) as follows: Let be a scalar parameterizing the riskless vector . Then, the new regression model = X + , subject to the portfolio constraint 1 = � l yields the solution: The efficient frontier is depicted in Fig. 1 for the stock market data modeled in "The Shapley value for asset allocation" section. (12)( ) = (X ′ X) −1 X � . To calculate the Shapley value of the explanatory variables in a regression game, we need to specify the attributes to be decomposed. For any OLS analysis, they would be those attributes that characterize regression efficiency, such as the sum of squared residuals (SSR), which is to be minimized, or the coefficient of multiple determination R 2 , which is to be maximized. To solve the question of general multicollinearity in OLS, Lipovetsky and Conklin (2001) were the first researchers to use the Shapley value to enhance the contribution of predictors in the regression. Since Shapley value analysis is traditionally intended to maximize the gains in a game played by the regressors Lipovetsky and Conklin (2001) suggested to use R 2 as the attribute to be considered. Alternatively to the gains of a game, negative attributes such as inequality and risk measures can be decomposed into their factors as determined by Shorrocks (2013) and Shalit (2017) and Shapley values can be computed accordingly. Therefore, I present the Shapley value imputation for regression portfolios using the two attributes SSR and R 2 that, as specified earlier, are not truly valid econometric statistics. From OLS regression Eq. (7) the sum of squared residuals is established as: Hence, the coefficient of multiple determination R 2 becomes Having defined the two attributes of the regression portfolio, we can now impute the Shapley values for the individual assets. The first attribute of the portfolio game to be maximized is the R 2 in Eq. (14). The second attribute to be minimized is the variance of the tangency portfolio whose weights are given in Eq. (11). In the following I present the recipe to impute the Shapley value for each attribute. When the goal of the game is to maximize R 2 we implement the following procedure: When we minimize the risk of the portfolio the procedure is as follows: 1. Establish all 2 N subsets of assets in set N. 2. Calculate the excess returns X by subtracting the riskless rate. 3. Run OLS regressions for all the subsets S ⊆ N when the dependent variable is the T-vector of ones . 4. Get the regression portfolio coefficients ̂ = (X ′ X) −1 X � and calibrate the weights to 1, w =̂ ∕l �̂ 5. Calculate the variance of the tangency portfolios for all subsets S ⊆ N as 2 = w � w 6. The Shapley value for each stock i is obtained as 7. The sum of Shapley values adds to the variance of the tangency portfolio for N securities: Once we have established the Shapley values of a portfolio they are used to estimate the weighted risk of the assets as well as to price them. This basically replaces the role of the common beta or systematic risk. This approach differs in that beta uses the entire financial market to price the risk of a diversified security. The Shapley value, in contrast, compares the risk to the portfolio the specific asset belongs to. Hence, Shapley values are dependent upon the portfolio at hand and can be regarded as the reservation price of risky securities. Consequently, as shown by Ortmann (2016) Table 1 , together with two normality tests, the standard Jarque-Bera statistic and the Kolmogorov-Smirnov statistic for the OLS test by Shalit (2012) . The two tests reject normality, implying that a mean-variance portfolio may not be the most appropriate investment model. As supported by Yitzhaki (1982) and Shalit and Yitzhaki (1984) in this instance, it is my opinion the mean-Gini (MG) portfolio model is more suitable. However, the MG regression portfolio model has not as yet fully developed for implementation. Thus, it is my aim to apply the Shapley value imputation to regression portfolios and to provide a better estimation to the MV model and the risk factors attributed to the individual assets. I proceed to do this now. The first step is to calculate the weights of the assets forming the optimal portfolio with respect to the various approaches elaborated in "Regression portfolios" section. The results following Eq. (6) are reported in Table 2 . As can be seen, the tangency portfolio, the T-bills, and T-bonds have the largest shares, with 97% for the T-bills and a 1.156% short position for the T-bonds. The flight to the safer and most liquid asset reflects the affinity of the MV tangency optimal portfolio to avoid riskier positions when using 93 years of monthly data. Undoubtedly, if data from the recent turbulence in the stock market owing to the Covid-19 virus crisis were included in the sample, this feature would be even more pronounced. The results for the regression portfolio are exhibited in the second row with the scaled results shown on row 3. As expected, they yield the same values, which supports the ease of using OLS as an optimization tool and how it provides the analyst with accurate results. Now, let us use the Shapley value to analyze the risk factors of efficient portfolio holdings . As we are concerned with optimal portfolios on the frontier and, in particular, with the tangency portfolio, our purpose is to ascertain that the greater the risk an asset exhibits the greater is its mean return. The Shapley values results are shown in Table 3 . Following Eq. (15) the Shapley values obtained by using R 2 demonstrate the decomposition of the regression goodness of fit among the portfolio assets. The Shapley value contributions are not only related to risk factors, but also reflect the relative importance of assets in building a perfect riskless portfolio using the regression model. The Shapley values obtained in Table 3 add up to R 2 = 0.555, with the large-company stocks (LCS) and small-company stocks (SCS) contributing only 0.018 and bonds and bills supporting most of the regression. T-bills have a Shapley value of 0.466 meaning they contribute 84% of the least-squares explanation. This emphasizes the importance of T-bills in producing a perfectly riskless portfolio with the highest mean return available. Alternatively for the regression optimal portfolio, following Eq. (17), we calculate the Shapley values by decomposing the unexplained standard deviation from the regression by its risk factors. Here, we observe negative Shapley values for some assets meaning that investing in those decreases risk while increasing portfolio mean return. For example, T-bills having a Shapley value of -1.447 % imply that the portfolio standard deviation decreases by that amount as mean return increases. Comparing T-bills with the small company, shows that the former reduces risk, whereas the latter increases risk in the same proportion. This implies that investors who shorted T-bills and invested the proceeds into small company stocks benefited more than by investing in blue chips and corporate bonds. The regression approach to optimize mean-variance portfolios enables the analyst to obtain an efficient frontier that is not subject to sampling errors. Combining that approach with Shapley value theory makes it possible to extract alternative systematic risks that are sensitive to the given portfolios. Hence, we can determine the price of including an asset in a MV portfolio based on its true contribution to risk and return. This methodology is not to be confused with the Shapley value regression developed by Conklin (2001, 2010) where the purpose of the model is to remedy multicollinearity. Handbook of the Shapley Value Examining Portfolio Optimisation as a Regression Problem The sampling error in estimates of meanvariance efficient portfolio weights Variance allocation and Shapley value Potential performance and tests of portfolio efficiency Statistical inference in two-parameter portfolio theory with multiple regression software Analysis of regression in game theory approach Meaningful regression analysis in adjusted coefficients Shapley value model The link between the Shapley value and the beta factor Portfolio Construction in a Regression Framework Using OLS to test for normality The Shapley Value Decomposition of Optimal Portfolios. Working Paper 1701 Mean-Gini, portfolio theory, and the pricing of risk assets A value for n-person games Decomposition procedures for distributional analysis: A unified framework based on the Shapley value Stochastic dominance, mean variance, and Gini's mean difference