9 Risk budgeting¶
Traditional MVO only considers the risk of the portfolio and ignores how the risk is distributed among individual securities. This might result in risk being concentrated into only a few securities, when these gain too much weight in the portfolio.
Risk budgeting techniques were developed to give portfolio managers more control over the amount of risk each security contributes to the total portfolio risk. They allocate the risk instead of the capital, thus diversify risk more directly. Risk budgeting also makes the resulting portfolio less sensitive to estimation errors, because it excludes the use of expected return estimates [CK20, Pal20].
9.1 Risk contribution¶
If the risk measure is a homogeneous function of degree one, then we can use Euler decomposition write the total portfolio risk
where
9.2 Risk budgeting portfolio¶
With the above definitions, the risk budgeting portfolio aims to allocate the risk contributions according to a predetermined risk profile
where
Using that
Working with this form is typically easier. After solving these equations, we can recover the portfolio
9.3 Risk budgeting with variance¶
If we use portfolio variance as risk measure, i. e., set
and (9.3) will become
Solving this system is inherently a non-convex problem because it has quadratic equality constraints. However, we can still formulate convex optimization problems to find the solution.
In general, however, we have to be aware that the conditions defining the risk budgeting portfolio are very restrictive. Therefore we have very limited possibility to further constrain a risk budgeting problem, without making the risk budgeting portfolio infeasible.
9.3.1 Convex formulation using quadratic cone¶
Suppose we allocate the risk budget
Let us now focus on group
and model it using the quadratic cone.
Next, we bound the risk contributions from below as
Assuming
Finally, minimizing the difference between the upper and lower bounds, we get the risk budgeting portfolio as the optimal solution. The full optimization problem will look like
where
Note that we have to be careful adding further constraints to problem (9.6), because these might make the risk budgeting portfolio infeasible.
9.3.2 Convex formulation using exponential cone¶
There also exists a different convex formulation of the risk budgeting problem, that works not only in the positive orthant, but in any (prespecified) orthant of the portfolio space. This allows us to work with long-short portfolios as well.
Observe that the risk budgeting equations (9.4) are the first-order optimality conditions of the optimization problem
We can use the parameter
Problem (9.7) can be modeled using the exponential cone in the following way:
where
While this convex approach works with any sign configuration
Also note that in this formulation we cannot add further constraints, because these could alter the optimality conditions (9.4), making the solution invalid as a risk budgeting portfolio.
9.3.3 Mixed integer formulation¶
In each orthant, the solution to (9.7) can have a different total risk. Therefore we can try to find a risk budgeting portfolio that has low total risk. In order to do this, we can extend problem (9.7) to be mixed integer. This will allow us to optimize over the full space, including all long-short portfolios, without needing to prespecify the signs. After defining separate variables based on Sec. 13.2.1.4 (Positive and negative part) for the long and the short part of the portfolio, we get:
What makes sure that problem (9.9) will find a low risk solution? The first term of the objective function is the sum of risk budgets, thus in any optimal solution, we must have
A further tradeoff with the mixed integer approach is that we have no performance guarantee, finding the optimal solution can take a lot of time. Most likely we will have to settle with suboptimal portfolios in terms of risk.
9.4 Example¶
In this example we show how can we find a risk parity portfolio by solving a convex optimization problem in MOSEK Fusion.
The input data is again obtained the same way as detailed in Sec. 3.4.2 (Data collection). Here we assume that the covariance matrix estimate
The optimization problem we solve here is (9.8), which we repeat here:
We search for a solution in the positive orthant, so we set
The Fusion model of (9.10):
def RiskBudgeting(N, G, b, z, a):
with Model("RiskBudgeting") as M:
# Portfolio weights
x = M.variable("x", N, Domain.unbounded())
# Auxiliary variables
t = M.variable("t", N, Domain.unbounded())
s = M.variable("s", 1, Domain.unbounded())
# Objective: 1/2 * x'Sx - a * b' @ log(z*x) becomes s - a * t' @ b
M.objective(ObjectiveSense.Minimize, s - a * (t.T @ b))
# Bound on risk term
M.constraint(Expr.vstack(s, 1, G.T @ x), Domain.inRotatedQCone())
# Bound on log term t <= log(z*x) becomes (z*x, 1, t) in K_exp
M.constraint(Expr.hstack(Expr.mulElm(z, x),
Expr.constTerm(N, 1.0), t),
Domain.inPExpCone())
# Create DataFrame to store the results.
columns = ["obj", "risk", "xsum", "bsum"] + \
df_prices.columns.tolist()
df_result = pd.DataFrame(columns=columns)
# Solve optimization
M.solve()
# Save results
xv = x.level()
# Check solution quality
risk_budgets = xv * np.dot(G @ G.T, xv)
# Renormalize to gross exposure = 1
xv = xv / np.abs(xv).sum()
# Compute portfolio metrics
Gx = np.dot(G.T, xv)
portfolio_risk = np.sqrt(np.dot(Gx, Gx))
row = pd.Series([M.primalObjValue(), portfolio_risk,
np.sum(z * xv), np.sum(risk_budgets)] + \
list(xv), index=columns)
df_result = df_result.append(row, ignore_index=True)
row = pd.Series([None] * 4 + list(risk_budgets), index=columns)
df_result = df_result.append(row, ignore_index=True)
return df_result
The following code defines the parameters, including the matrix
# Number of securities
N = 8
# Risk budget
b = np.ones(N) / N
# Orthant selector
z = np.ones(N)
# Global setting for sum of b
c = 1
# Cholesky factor of the covariance matrix S
G = np.linalg.cholesky(S)
Finally, we produce the optimization results:
df_result = RiskBudgeting(N, G, b, z, c)
On Fig. 9.1 we can see the portfolio composition, and on Fig. 9.2 the risk contributions of each security.

Fig. 9.1 The risk budgeting portfolio.¶

Fig. 9.2 The risk contributions of each security.¶
Footnotes