Extracted main text — title through conclusion, appendix excluded. This is what our citation measures are computed over, published so the extraction can be checked by eye.
39,857 characters · 14 sections · 28 citation commands
Portfolio risk allocation through Shapley value
\titlepage
All quantitative financial risk management is scenario based. Depending on the the requirements, risk measures are calculated at various granularities: at the single instrument level, portfolio level, enterprise level, or systemic level. In the most myopic case, the risk of a single instrument, one subjects the instrument to specific scenarios in the factors affecting its value. Individual instruments and their risk metrics are aggregated into portfolios, portfolios combine into enterprises, which in turn form an interconnected global web of the financial industry. Moving up the ladder of risk aggregation introduces new categories of risk which require their own scenarios for quantification. The scenarios used for risk quantification may be microscopic (infinitesimal) or macroscopic (finite), they may be generated by a mathematical valuation model or based on historical market prices, they may be defined by the institution carrying the risk or prescribed by a regulating authority.
A typical situation arises as follows. We consider a portfolio of risky assets whose explainable risk is determined by a number of random state variables $X_1,\ldots,X_n\in\mathbb{R}$. For mathematical modeling purposes we assume that the random variables $X_i$ have finite first and second moments, $\mathsf{E}(|X_i|)<\infty$, $\mathsf{E}(X_i^2)<\infty$, for all $i$. The meaning of the state variables $X_i$ depends on the context. They can represent the variables entering the pricing model of a derivative contract. In the context of portfolio management, one can think of each of the assets in the portfolio as defining a risk factor $X_i$. More generally, we can group subsets of assets in the portfolio into subportfolios, each of which defining a risk factor (such as industry, size, etc). Finally, the value of a financial institution itself may represent a risk factor in a model of systemic risk.
Portfolio risk is measured in terms of a suitable risk metric or a number of risk metrics. One such metric is the portfolio P&L, i.e. the change in value of the portfolio under a realized or simulated change in the market conditions. One of the key functions of a portfolio manager is to explain (attribute) the daily P&L to the risk factors $X_i$ of the portfolio. Other metrics, such as value at risk (VaR), expected shortfall (ES), and stress tests are used for economic or regulatory capital calculation, margin sizing, etc. We do not require that these metrics satisfies any (possibly problematic) properties such as coherence. An important question is how to attribute, in a systematic and meaningful way, such a risk metric to each of the risk factors.
We let $\frak{m}(X)$ denote a generic risk metric, where
Risk attribution is straightforward, if the risk factors are orthogonal, i.e. the $X_i$'s are mutually independent. This may be the case if the risk factors are defined in abstract terms, such as principal components, but is typically not true for financially intuitive risk factors. of non-orthogonal, subjecting a portfolio to a particular scenario may partly account for the same risk as it is exhibited in a another, seemingly unrelated scenario. In particular, the risk of the entire portfolio is not simply the sum of its risk measured by all the scenarios.
In this paper we advocate the view that the concept of Shapley value studied in cooperative game theory MSZ13 offers a “fair allocation” design for attributing portfolio risk to each of the risk factors affecting its value. Shapley value allocates overall risk to a risk factor $X_i$ as the average marginal risk of each coalition of risk factors when $X_i$ is added to the coalition. Earlier papers in the context of portfolio management in MT08, O16, MBA21, enterprise risk management W02, BDN20, and systemic risk W02, TBT10, DT13.
The paper is organized as follows. In Section (ref) we review the definition of Shapley value and some of the methods to compute it. Explicit expressions for computing the Shapley value of the variance and volatility games are discussed in Section (ref). In Section (ref), we apply the concept of Shapley value to risk attribution of a portfolio of derivatives with correlated risk factors. Finally, in Section (ref) we show how Shapley value can help with risk attribution at the enterprise risk management level.
For parts of the discussion in this paper we will find it convenient to use the concepts and language of game theory MSZ13. A coalitional game is a pair $(\mathscr{N}, v)$ consisting of the set of players $\mathscr{N}$ and the characteristic function $v:\;2^\mathscr{N}\to\mathbb{R}$. The only requirement on $v$ is that $v(\emptyset)=0$. Any subset $S\subset\mathscr{N}$ is referred to as a coalition. In the context of finance, a risk metric $\frak{m}$ defines a coalitional game whose characteristic function is $v(S)=\frak{m}(X_S)$.
As discussed in the Introduction, a portfolio risk metric $\frak{m}$ is determined by a number of stochastic risk factors $X_j, j=1,\ldots, n$. In the following we will denote by $\mathscr{N}=\{1,\ldots,n\}$ the set of indices labeling the risk factors, and view it as the set of players in a cooperative game. We consider the set of partial risk metrics $\frak{m}(X_S)$, where $S\subset\mathscr{N}$, with the convention that $\frak{m}(X_\emptyset)=0$.
The Shapley value MSZ13 is a way of attributing the value of a coalitional game to each player based on the average marginal value that it contributes to each coalition. Namely, the Shapley value of player $i\in\mathscr{N}$ is defined by
This can also be recast into the following more symmetric form:
where $S_n$ denotes the set of all permutations of $\mathscr{N}$, and $S^i_\pi=\{j\in\mathscr{N}:\;\pi(j)<i\}$.
A key theorem, due to Lloyd Shapley, states that the Shapley value is the unique way of attributing the value of a coalitional game that satisfies a few natural “fairness” requirements MSZ13. One of these requirements is the following efficiency property:
stating the sum of individual contributions is equal to the value of the grand coalition.
We conclude this section by deriving an approximate relation between the Shapley values of a game and its square. Assume that the characteristic function $v$ is the square of a characteristic function $\sigma$, i.e. $v(S)=\sigma(S)^2$, for each $S\in 2^{\mathscr{N}}$. Then we can make the approximation
where $\lambda$ represents an average value of $\sigma(S\cup\{i\})+\sigma(S)$. Applying equation (ref) to both $\mathrm{Sh}_i(\sigma^2)$ and $\mathrm{Sh}_i(\sigma)$ yields $\lambda\approx\sigma(\mathscr{N})$, and thus
Calculating the Shapley value of a game is challenging, owing to the computational complexity of its definition. The only method that is universally applicable is Monte Carlo simulation, first considered in MS60 in the context of the voting game. Refinements have been discussed in CGT09 and, for supermodular games, in LSWW12.
For the purposes discussed in this paper, especially when the number of players is moderate, the following variation on the original algorithm MS60 performs sufficiently well. Rather than presenting a pseudocode, below is the actual Python 3 code assuming that the package numpy has been imported as np.
\newline\newline This code assumes of course that the characteristic function char_fct has been defined within the appropriate context.
The variance and volatility games CSV18 (see also W02 and OP16) are the basis for applicatiosn of Shapley value in portfolio management. In this section we review their properties and derive explicit allocation formulas.
Consider $n$ random variables $X_i, i=1,\ldots,n$ distributed so that their first and second moments exist. We consider the variance game defined by the following characteristic function. For $S\subset\mathscr{N}$, $v(S)$ is the variance of $X$ conditioned on the complement of $S$,
where
Explicitly,
Note the decomposition:
for all $S,T\subset\mathscr{N}$.
In particular, if $i\notin S$, then
Also notice that
where $\overline S^i_\pi=\{j\in\mathscr{N}:\;\pi(j)>i\}$. As a consequence, from (ref),
This leads to the following equation, established in CSV18:
We are unaware of a closed form expression for the Shapley value of the volatility game with characteristic function given by
However, approximation (ref) leads to the following intuitively appealing formula:
or
where $\rho(X_i,X)$ denotes the correlation coefficient between $X_i$ and $X$.
The attribution of risk factor $X_i$ is proportional to the volatility of that factor, with the proportionality coefficient reflecting the correlation between the factor and the overall risk. Below we verify numerically that this approximation is remarkably accurate.
In Table (ref) below we present the results of a test of these results based on simulated data. In particular, we test the accuracy of the analytic approximation (ref) for the volatility game.
The data has been prepared as follows.
We chose 500 observations, as this corresponds to the observation window of 2 years, frequently chosen in the financial industry for VaR calculation.
The meaning of the columns in Table (ref) is as follows:
for $i=1,\ldots,25$. For the Monte Carlo computations of the Shapley value (columns one and three), we used 100,000 simulations.
In this section we present the Shapley value approach to the problem of risk (and daily P&L) attribution of a portfolio of derivatives to a set of possibly non-orthogonal risk factors. The challenge here is to distribute fairly the portion of portfolio P&L that could in principle be attributed to several risk factors such as delta and vega.
In order to motivate the discussion, we first consider a concrete example, namely a single European option on an asset whose volatility follows the SABR model HKLW02. The dynamics of the SABR model is specified in terms of two state variables: forward $F_t$ and instantaneous volatility parameter $\sigma_t$, and is given by:
where $W_t$ and $Z_t$ are two Brownian motions with
The function $C(x)$ determines the backbone of the volatility smile, and is often assumed to be of the form $C(x)=x^\beta$, where $\beta\leq 1$\footnote{In order to handle negative or close to zero forward rates in interest rate markets, one chooses $C(x)=(x+\theta)^\beta$, with $\theta>0$.}.
In practice, the SABR model is used via an asymptotic approximation in combination with the standard Black-Scholes model. Namely, let $B$ denote the Black-Scholes pricing function in the normal model, i.e.
where $N(x)$ denotes the cumulative normal distribution, and where
Then the time $t$ value $V_t$ of an option struck at $K$ with expiration $T$ is given by
Here $\sigma^{\mathrm{imp}}$ is an explicit approximation to the (analytically unknown expression for the) normal volatility implied by the SABR model, see HKLW02, HKLW16 for details. For simplicity, we have disregarded discounting.
This valuation formula is the basis for calculating various sensitivity measures of the option value used to measure its exposure to the factors driving the model. Key among them are the delta
and vega
calculated as the sensitivities to the “naive” scenarios $F_t\to F_t+dF_t,\;\sigma_t\to\sigma_t$, and $F_t\to F_t,\;\sigma_t\to\sigma_t+d\sigma_t$, respectively. It was argued in B06, HL19 that these scenarios are inadequate if $\rho\neq 0$, which may lead in practice to mishedging of the portfolio.
Instead, we proceed as follows. We decompose the Brownian motion $Z_t$ into $W_t$ and a Brownian motion $W^\perp_t$, independent of $W_t$: $Z_t=\rho W_t+\sqrt{1-\rho^2}\,W^\perp_t$. Then, under the forward scenario $F_t\to F_t+dF_t$, the volatility parameter $\sigma_t$ is bound to move as follows: $\sigma_t\to\sigma_t+\rho\alpha/C(F_t)\,dF_t$. Denoting by $d\sigma^\perp_t=\alpha\sigma_t dW_t^\perp$ the component of $d\sigma_t$ uncorrelated with $dF_t$, we obtain from Ito's lemma:
where $\tau=T-t$. This leads the to the following risk decomposition for the P&L:
where
is the modified (Bartlett) delta. The other greeks are defined as follows:
is the time decay,
is the gamma,
is the vanna, and
is the volga.
Formula (ref) decomposes the option P&L in terms of independent risk factors $dF$ and $d\sigma^\perp$, time decay, and second order greeks. It was shown in B06 and HL19 that this approach to calculating delta and vega leads to more robust hedges than those obtained by means of the traditionally calculated sensitivities.
Alternatively, we can represent $W_t$ in terms of $Z_t$ and its independent complement $Z^\perp_t$ as $W_t=\rho Z_t+\sqrt{1-\rho^2}\,dZ^\perp_t$, which yields
Here,
is the modified (Bartlett) vega. Formula (ref) is a decomposition of the option's risk in terms of an alternative basis of independent risk factors, namely $dF^\perp$ and $d\sigma$. Note that theta and the second order greeks enter both decompositions in the same manner.
These two forms of risk decomposition show that part of the option's volatility sensitivity can be viewed either as a component of its delta or of its vega:
In the case of $\rho\neq 0$, there is no obvious way of attributing the P&L to the delta risk and the vega risk\footnote{A convenient but arbitrary choice is to attribute the overlapping portion of the P&L to delta.}. We propose that the “fair attribution” given by Shapley value is a natural approach.
Notice that the Shapley value of a game with two players is given by
Applying these formulas to $dM$, the martingale part of $dV$, yields
This can alternatively be expressed in the following form:
In other words, Shapley value allocates half of the common risk components to each delta and vega risks. Note that when $\rho=0$,
as expected.
We can now extend this discussion to the general case of an arbitrary number of risk factors. We consider a portfolio of derivatives whose price dynamics is captured by a multifactor diffusion process:
The state vector $X_t\in\mathbb{R}^n$ may consist of both market observable factors such as prices, yields, exchange rates, etc, as well as of unobservable factors such as parameters capturing stochastic volatility, convenience yields, etc. For convenience, we work under the measure under which the pricing process is a martingale. The portfolio value process is given by $V_t=V(t, X_t)$, where $V(x)$ is a valuation function.
Traditional way to calculate the sensitivity of the portfolio value to $X_i$ is via the infinitesimal scenario:
This leads to the usual sensitivities,
where $\nabla_i$ denotes partial derivative.
Alternatively, and more appropriately, in order to account for the correlation effects among the risk factors, we consider a scenario under which $X_i$ moves by $dX_i$:
accompanied by the induced moves of the remaining state variables:
Here, each $dW^\perp_j$ is uncorrelated with $dW_i$. Hence the correlation adjusted sensitivity (generalized Bartlett's delta) is given by
or
We can thus write
where $\dot{V}$ denotes time derivative. This equation expresses the impact of a move in the state variable $X_i$ on the value of the asset in terms of the correlation adjusted sensitivity to the variable $X_i$, and the classic sensitivities multiplying the moves of the remaining variables with the components explained by the change in $X_i$ removed.
Calculating Shapley value of the martingale part $dM$ of $dV$ is straightforward, and it yields
The variance part of $dV$ can be attributed using equation (ref). As a result we find that the P&L attribution to the $i$-th factor is given by
Notice that, strictly speaking, time decay is also part of the P&L attribution process. We have excluded it from the discussion, as it is not a risk factor and its attribution is straightforward.
In practice, the infinitesimal quantities $dX_i$ are replaced by the (daily) changes $\delta X_i$, and the equation above takes the form of the following approximation:
The difference $\mathrm{P\&L}-\sum_i \mathrm{Sh}_i(\mathrm{P\&L})$ is the unexplained P&L.
In this section we discuss how Shapley value can be used to allocate enterprise risk metrics such as VaR and ES to the risk factors of the portfolio. This can be accomplished regardless of the methodology used for VaR and ES estimation.
Value at Risk and Expected Shortfall are risk metrics typically used at the enterprise risk management level. Their primary goal is to determine the amount of cash reserves required to be held against potential portfolio losses at a given confidence level defined as $q\equiv 1-\alpha$ (say, 95%), where $\alpha$ is the significance level. Among the approaches to VaR and ES, the approach based on a parametric distribution of losses is the most straightforward, albeit not the most commonly used. Its main advantage is the conceptual simplicity and ease of estimation: only a well defined set of parameters requires estimation. On the negative side, this approach implicitly assumes stationarity of portfolio returns and often leads to unrealistic tail dependence.
A large class of examples of relevant parametric distributions is provided by the family of multifactor elliptical distributions CHS81. Recall that a random vector $X\in\mathbb{R}^n$ has an elliptical distribution with parameters $\mu\in\mathbb{R}^n$ and positive definite $\Sigma\in\mathrm{Mat}_n(\mathbb{R})$, if its density function is of the form $c_n \det(\Sigma)^{-1/2}h\big((x-\mu)^\mathtt{T} \Sigma^{-1}(x-\mu)\big)$, with a nonnegative function $h$ on $\mathbb{R}$ and a normalizing constant $c_n$. Assuming that the distribution has moments of order one and two (which we are doing), $\mathsf{E}(X)=\mu$, and $\mathsf{Cov}(X)=\kappa_n\Sigma$, where $\kappa_n$ is a constant. Important examples of an elliptical distribution are the multivariate Gaussian distribution, multivariate Student t distribution, and Laplace distribution.
Let $X$ represent the portfolio's daily P&L. Under an elliptical distribution, $\mathrm{VaR}_q$ and $\mathrm{ES}_q$ are linear in the standard deviation $\sigma(X)=\sqrt{\mathsf{Var}(X)}$,
and
Here, $A_q$ and $B_q$ are constants depending only on the distribution and confidence level, and $\mu(X)$ is linear in $X$. For example, if $X$ is distributed according to the the multinomial Gaussian distribution $N(\mu,\Sigma)$ and $\sigma(X)=\sqrt{\mathsf{Var}(X)}$, then
where $\Phi(z)$ is the cumulative standard normal distribution, and
where $\varphi(z)=(2\pi)^{-1/2})\exp(-z^2/2)$ is the density of $\Phi(z)$. Analogous explicit expressions exist for the Student t distribution, Laplace distribution, and others.
In order to find the Shapley value of (the nonlinear cooperative games defined by) $\mathrm{VaR}_\alpha$ and $\mathrm{ES}_\alpha$, we note first that the Shapley value of (the linear cooperative game defined by) $\mu$ is given by $\mathrm{Sh}_i(X)=\mu(X_i)$. Using the additive property of Shapley value, and the approximation (ref), we find that
and
Historical bootstrapping (and variations thereof) is the default methodology for VaR and ES estimation. In this approach VaR is estimated as the relevant quantile of the empirical distribution of the (daily) P&L of a portfolio, calculated over a specified lookback period of historical data. Expected shortfall is estimated as the arithmetic average of the losses exceeding the estimated VaR level. This approach has the advantage that it is blind to the stationarity and tail properties of the portfolio return distribution.
For example, in order to find the 95% VaR with a two year lookback period, we (i) calculate the P&L over the past 500 business days, (ii) rank it in the ascending order $PL_{1}\leq\ldots\leq PL_{500}$ (the largest loss first) and (iii) set $\mathrm{VaR}_{95\%}=PL_{25}$. The estimated expected shortfall is $\mathrm{ES}_{95\%}=\tfrac{1}{25}\sum_{j=1}^{25} PL_j$.
The so estimated VaR and ES can be easily attributed to the predefined risk factors using Shapley value. To this end, for each chosen risk factor $j$ we select a subset $X_j$ of the set of assets $X$ that represents this risk factor. Note that the subportfolios $X_j$ representing different risk factors are not required to be mutually disjoint. This allows us to assign a particular asset to several risk groups. For example, in case of a portfolio of equities, these subsets can represent the stock's industry, size, liquidity, etc.
Using the paradigm of historical bootstrapping, we can estimate the values $\mathrm{VaR}_q(S)$ and $\mathrm{ES}_q(S)$ of a coalition $S$ of the factors defined by the subportfolios $X_j$. To this end we define the following characteristic functions $\mathrm{VaR}^h$ and $\mathrm{ES}^h:\,2^\mathscr{N}\to\mathbb{R}$:
and
This allows us to allocate the portfolio VaR or ES (estimated via historical bootstrapping) to each of the factors: (i) through an exact calculation, if feasible, or (ii) via Monte Carlo simulations, otherwise (in case of a large number of factors).
Table (ref) a numerical test of the concepts discussed in this section. To this end, we reuse the simulated data of Section (ref). This data is meant to simulate daily P&L of a portfolio of 25 assets observed over the period of two years. Its historical VaR and ES at the 95% level of confidence are given by -302.4 and -358.3, respectively, and the corresponding values estimated from multifactor Gaussian model are -295.2 and -370.2. Not surprisingly they are close to each other as they represent finite sample estimates of the same quantities.
The meaning of the columns in Table (ref) is as follows:
for $i=1,\ldots,25$. As before, for the Monte Carlo computations of the Shapley value (columns one and three), we used used 100,000 simulations.