# The optimization problem of the equal risk contribution portfolio

I try to understand the equal risk contribution (ERC) portfolio as described in On the Properties of Equally-Weighted Risk Contributions Portfolios by Teiletche and Roncalli. For a given covariance matrix of $$n$$ assets $$\Sigma$$ they define the following optimization problem (the $$y$$-problem): $$y^* = \text{arg min} \{ \sqrt{ y^T \Sigma y}\}$$ with the constraints $$y \ge 0 \text{ and } \sum_{i=1}^n \ln y_i \ge c.$$ Where in the above $$c$$ is an arbitrary constant.

What I assume:

• $$c$$ of course needs to be greater than $$- \infty$$, otherwise we would have the minimum volatlity portfolio.
• For $$c = -n \ln n$$ we arrive at the equal weighted portfolio (all weights equal to $$1/n$$).

Is the following understanding correct?

• If I first pick some $$c \in (-\infty, -n \ln n)$$, then I can solve the above problem whith the solution $$y^*(c)$$.
• Then I can rescale the solution: $$x_i^* = \frac{y^*_i(c)}{\sum_{i=1}^n y^*_i(c)}$$ to get $$x^* = (x^*_i)_{i=1}^n$$ which are the weights of the ERC.

Thus, if they speak of an arbitrary $$c$$, they mean that this $$c$$ needs to be chosen from a certain interval. Then I get a solution for $$y^*$$ and after rescaling the particular choice of $$c$$ vanishes. Is this correct?

In the article above they also write that the solution can be derived directly by setting $$c^* = c - n \ln \{\sum_{i=1}^n y^*_i(c)\}$$, where $$c$$ was used to find $$y*(c)$$ and then solving (the $$x$$-problem) $$x^* = \text{arg min} \{ \sqrt{ x^T \Sigma x}\}$$ with the constraints $$x \ge 0 \text{ and } \sum_{i=1}^n \ln x_i \ge c^* \text{ and } \sum_{i=1}^n x_i = 1.$$

I tried to wrap my head around this for a while. In my view the choice of $$c$$ is not that arbitrary. If somebody has thought about this optimization problem, then I would be happy to hear your comments. Thank you!

EDIT: I have programmed the above in R. You can find the code and an explanatory html file on github or the html file directly. My interpretation seems to be right. Just choose $$c$$ and then rescale to have the sum of weights equal to one. I would like to understand this deeper. Thus please join the discussion if you like.

EDIT2: I started to understand the inequality constraint better. I assume that for the same reason as for the $$y$$-problem we get that the logarithmic constraint of the $$x$$-problem is actually reached: $$\sum_{i=1}^n \ln x_i = c^*.$$ Then we can insert $$c^{\ast} = c - n \ln( \sum_{i=1}^n y_i^{\ast})$$ and thus $$\sum_{i=1}^n \ln x_i = c - n \ln( \sum_{i=1}^n y_i^{\ast}).$$ $$y^{\ast}$$ is the optimal solution of the $$y$$-problem with the logarithmic constraint using $$c$$. Thus it must hold that $$\sum_{i=1}^n \ln y_i^{\ast} = c$$, and we get

$$\sum_{i=1}^n \ln x_i = \sum_{i=1}^n \ln y_i^{\ast} - n \ln( \sum_{i=1}^n y_i^{\ast}),$$ which can be re-written to $$\sum_{i=1}^n \ln x_i = \sum_{i=1}^n \ln \left(\frac{y_i^{\ast}}{\sum_{i=1}^n y_i^{\ast}} \right).$$ But this does not imply that $$x_i = \frac{y_i^{\ast}}{\sum_{i=1}^n y_i^{\ast}}$$ which would mean that $$x$$ is the re-scaled optimum of the $$y$$-problem. Furthermore, in my reasoning, the objective functon pretty much loses its meaning.

Finally, I am stuck. Do you have any idea why the special choice of the constraint immediately gives the ERC?

• Nice question, +1. They explain the reasoning in the appendix A2 of the paper (p. 21). If I understand correctly, the FOC of this problem, evaluated at the optimal point, yields that the contribution of each risk equals some $\lambda_c$. HTH Commented Jun 7, 2022 at 7:32
• @Kermittfrog thank you for your comment. I agree that considering the Lagrangian, the constraint with $c$ leads to the equation where each risk contributions equals the Langrange multiplier $\lambda_c$. I am not good at ootimization theory, but if we could add the constraint $\sum y_i = 1$, then we would get the ERC portfolio directly. Why do we leave this constraint out? Commented Jun 8, 2022 at 6:39
• @Kermittfrog I started a bounty ... I added some more context. Maybe you want to discuss more :) Commented Jul 13, 2022 at 9:04
• Are we sure that $c$ must be chosen $< -n \ln(n)$ in the y-problem? What is the reason? When I try with an arbitrary $c=1$ it seems to work in all the cases I tried. (Cases do not prove anything, I know). Commented Jul 20, 2022 at 6:39
• @nbbo2 That is correct, the boundary only holds for the $x$-problem with the sum constraint. Commented Jul 20, 2022 at 7:13

The reason is the following: The optimization problem with the equality constraint \begin{aligned} x^*(c) &= \text{argmin} \sqrt{x^T\Sigma x} \\ \textrm{s.t.} & \sum_{i=1}^n \ln x_i \geq c \\ & 1^Tx =1 \\ & x \geq0 \end{aligned} has the following Lagrange function: $$f(x;\lambda_0,\lambda,\lambda_c)=\sqrt{x^T\Sigma x} - \lambda_0(1^Tx-1)-\lambda^Tx-\lambda_c\left(\sum_{i=1}^n\ln x_i-c\right).$$ At the optimum $$x_i\frac{\partial\sigma(x)}{\partial x_i}=\lambda_0x_i+\lambda_c$$ holds. But since $$\lambda_0=0$$ does not have to hold, the resulting portfolio at the optimum would not be an ERC portfolio, which is what you empirically observed in the R notebook. The only value at which $$\lambda_0=0$$ holds is at $$c=c^*$$ as the equality constraint is then already fulfilled by virtue of the way in which $$c$$ is set and the corresponding Lagrange multiplier is thus 0.