# How would you equally distribute the risk of each stock in a portfolio?

Suppose you have in-sample (IS) and out-of-sample (OOS) daily returns of N stocks (IS and OOS dates are the same for each stock). Suppose you want to calculate return captured each day as x * ret.

How would you scale x (or put it another way, normalize return) for each stock so that each stock’s risk (or put it another way, std dev of x * ret) is more or less equal? Suppose you’re first looking at your IS results (you can use out-of sample data also but only using the past i.e. oos date < is date to prevent lookahead)

• calculating a rolling sd(ret) [realized vol] of all-sample ret and on each day scaling x by that but the problem with this method is that if somewhere in OOS there is a big move that stock will either dominate or diminish its representation in the portfolio so this doesn’t work.
• well, if you construct a portfolio of stocks, with weights $w_i$, can you calculate the volatility each individual stock contributes to the whole basket? what if you try to equalise these contributions? – will Mar 15 at 17:49
• Your problem is to some extent unavoidable (the future is never exactly like the past). You can improve the situation by having better estimates of vol: (1) Use more past data to estimate vol (2) Use a Shrinkage method so that vol estimates that are very high or very low are brought back towards the typical vol (mean or median of all stock vols) before being used for portfolio allocation. (3) Use implied vol from the option market rather than historical vol. – noob2 Mar 15 at 21:28
• Are you trying to compute the portfolio weights ? What is x ? – Malick Mar 16 at 16:37

We're going to assume that we have $$N$$ assets in our portfolio with weights $$w$$ and prices $$x$$. The variance of your portfolio is given by: $$$$V\left( w'x \right) = w' E\left((x-E(X))(x-E(x))'\right) w = \sum_{i,j=1}^N w_i w_j Cov(x_i, x_j).$$$$ So, the contribution of one asset is given by: $$$$s_i := \frac{w_i^2 V(x_i) + \sum_{j=1, j \neq i}^N w_iw_j Cov(x_i,x_j) }{\sum_{i,j=1}^N w_i w_j Cov(x_i, x_j)}.$$$$
So, your problem of equalizing the variance contribution is to find a weight vector so that all the $$(s_i)_{i=1}^N$$ are equal which implies \begin{align} &w_i^2 V(x_i) + \sum_{k=1, k \neq i}^N w_i w_k Cov(x_i,x_k) = w_j^2 V(x_j) + \sum_{k=1, k \neq j}^N w_j w_k Cov(x_j, x_k) \end{align}
Now, this is a system of nonlinear equations. To solve it, you need to choose a normalization. Say, $$w_1 = 1$$ and then you just have to remember that all other weights are expressed as $$w_i^* = w_i/w_1$$, i.e. in units of $$w_1$$. Of course, without the covariances, the solution would be simple: $$$$w_i = \sqrt{\frac{V(x_1)}{V(x_i)}} w_1$$$$ so you could use this as a starting value for a numerical solution algorithm.