top of page

Understanding Shapley Values for Investment Analysis



As an investor, you're always looking for tools and techniques that can provide greater insight into the drivers of risk and return for your portfolio. One powerful approach that has gained traction is the use of Shapley values, a concept originating from cooperative game theory. Shapley values offer a principled way to attribute changes in a portfolio's performance to the various securities or factors that comprise it.



What are Shapley Values?


Shapley values provide a way to fairly distribute a total surplus (or cost) generated by a coalition of players based on their marginal contributions. In portfolio analysis, the "players" are the individual securities or factors, and the "surplus" is the overall portfolio return in excess of a benchmark. The key idea behind Shapley values is that a player's payout should be the average of their marginal contributions in all possible ways the coalition could have been formed. This satisfies some desirable properties like efficiency (the total surplus is fully distributed), symmetry (players with identical contributions get equal payouts), and additivity across games.


Calculating Shapley Values


While the conceptual idea is straightforward, calculating exact Shapley values can quickly become computationally expensive, especially for large portfolios. There are n! possible ways to form a coalition of n players/securities. However, there are algorithmic approximations that can estimate Shapley values accurately and efficiently through Monte Carlo sampling of the possible coalition orderings.


Interpreting Shapley Values


Shapley values decompose your portfolio return in a way that captures complex interactions between securities that simple methods like risk factor exposures cannot. Some key applications include:


  • Performance Attribution: See which securities are the largest positive or negative contributors to returns. This can validate investment theses or highlight potential rebalancing needs.

  • Risk Analysis: Beyond just looking at volatilities, assess which securities contribute most to portfolio-level risk measures like Value-at-Risk.

  • Strategic Allocation: When adding a new security, its Shapley value estimates its marginal contribution to the existing portfolio.

  • Manager Evaluation: Separate skill from exposure by comparing a manager's actual returns to the predicted Shapley values from their factor model exposures.


While insightful, Shapley values should be combined with other analysis rather than used in isolation. Their key benefit is a unified way to attribute contributions across large multi-factor, multi-asset portfolios.


Extensions and Challenges


While Shapley values provide a theoretically coherent way to attribute contributions, there are some nuances and extensions to be aware of:


  • Time-Varying Portfolios: The examples above assumed a static portfolio over the period analyzed. For portfolios that change weights over time, you need to calculate Shapley values at each rebalancing period and aggregate them properly. This added complexity is manageable with software built for investment use cases.

  • Hierarchical Shapley Values: Basic Shapley value calculations treat all securities as separate "players." However, you may want to first decompose returns into systematic factor exposures versus security-specific returns. Hierarchical or multi-level Shapley values allow this type of nested decomposition.

  • Lack of Uniqueness: There can be multiple sets of Shapley values that all satisfy the fairness properties. The canonical Shapley value calculation yields one of these, but alternatives like the Aumann-Shapley value have also been proposed.

  • Factor Perspective: From a factor investing perspective, you may want to attribute returns based on currency, sector, or risk factor exposures instead of individual security contributions. Shapley values can be calculated from these factor returns as the "players" in the game.

  • Communicating Insights: Shapley value numbers can be difficult to interpret for non-technical investors. Visualizations that highlight the biggest contributors and report values relative to a benchmark can help communicate insights clearly.


Case Studies


To illustrate the power of Shapley values, let's walk through a case study of analyzing a multi-asset portfolio over a turbulent year: The portfolio consisted of stocks, bonds, real estate, commodities, and a market-neutral hedge fund strategy. Despite major drawdowns in most asset classes, the overall portfolio was down only 5% in a year when global stocks fell 20%. Using Shapley values, we can decompose this overall return into the contribution from each asset group and risk premia source:


  • Stocks: -12%

  • Bonds: +3%

  • Real Estate: -2%

  • Commodities: +4%

  • Hedge Fund Alpha: +2%


A few key insights emerge:


  • The diversifying assets like bonds, commodities, and hedge funds were critical positive contributors that offset the large stock drawdown.

  • Real estate acted similarly to stocks and did not provide diversification when needed.

  • The hedge fund's 2% contribution appears modest but was a significant source of alpha compared to its risk allocation.


This granular attribution allows analyzing what worked, what did not, and whether the portfolio positioning was robust to different macroeconomic regimes. For multi-asset investors, Shapley values provide a powerful lens beyond simple asset class returns.


Shapley values provide a powerful lens for multi-asset portfolio attribution and decision analysis. While mathematical, the core concept aligns well with the intuitive way investors reason about marginal contributions. As computational power grows and more flexible portfolio construction techniques emerge, Shapley values are likely to become an increasingly valuable tool for enhancing investment insights.

17 views0 comments

Comments


bottom of page