# How to derive portfolio weights from risk budget

Goal: I'm trying to frame target volatility investments given some view on what asset to overweight. For example, starting with a risk-parity allocation, tweak the marginal risk contribution of each asset (all equals in risk-parity) and derive the corresponding target weights of the portfolio.

Example: you want to invest in 3 assets. You are given the risk budget for each stock [0.5, 0.3, 0.2]. The goal is to derive the portfolio weights such that the marginal contribution of each asset to the variance of the portfolio is explained by respectively 50%, 30% and 20% for each asset. The goal is to find the portfolio weights $$\mathbf{w} \in \mathbb{R}^3$$ such that the target vol of the portfolio is $$v \in \mathbb{R}^+$$.

Question: what the relevant literature on portfolio construction from risk budgeting? A necessary condition for the answer is to provide references. Some python code which solves the example above for a given correlation matrix would be appreciated.

• See the paper by Roncalli Managing Risk Exposures using the Risk Budgeting Approach. With only 3 stocks you don't even need Python, you can do it in Excel in 15 minutes from start to finish. – Alex C Jul 2 '19 at 15:05
• See also thie answers to this quant.stackexchange.com/questions/3114/… – Alex C Jul 2 '19 at 15:34

What you want is to design a risk budgeting portfolio. If your constraints are only $$\mathbf{1}^T\mathbf{w}=1$$ and $$\mathbf{w} \geq \mathbf{0}$$, then the correct way to do it is to use the formulation proposed by Spinu [1]: $$\begin{array}{ll} \underset{\mathbf{w}}{\textsf{minimize}} & \frac{1}{2}\mathbf{w}^{T}\Sigma\mathbf{w} - \sum_{i=1}^{N}b_i\log(w_i)\\ \textsf{subject to} & \mathbf{1}^T\mathbf{w}=1. \end{array}$$ where $$\mathbf{w}$$ is the vector of portfolio weights, $$\Sigma$$ is the covariance matrix, and $$b_i, i = 1, 2, ..., N,$$ are the risk budgets.