I have a set of $N$ data series, which I put together to form a single series using a weights vector $x$. The covariance matrix is known ($\Sigma$).
We know that the volatility of the weighted series is:
$\sigma(x)=\sqrt{x^T ~ \Sigma ~ x}$
where $\sigma \in R^N$ and $\Sigma \in R^{\{N \times N\}}$.
I use Euler decomposition to do the following:
$\sigma(x) = \sum_{i=1}^N x_i \frac{\partial \sigma}{\partial x_i}$
So far, I'm happy with this.
What I want to do is to use an algorithm so that it finds me the vector $x$ such that all the series have the same contribution $x_i \partial_i \sigma(x)$ to the "global" volatility.
The optimization would be done using the following idea:
$x^* = \arg \min_x \sum_{i=1}^n \left[\frac{\sigma(x)}{n} - x_i \partial_i \sigma(x) \right]^2$
But I am struggling to compute the value of $\frac{\partial \sigma}{\partial x_i}$ to be able to run the algorithm.
I'd start by the classic step (1) :
$\frac{\partial \sigma}{\partial x_i} = \frac{\partial (\sqrt{x^T ~ \Sigma ~ x})}{\partial x_i}=-\frac{1}{2} \sigma(x)^{-\frac{3}{2}} \cdot \frac{\partial (x^T ~ \Sigma ~ x)}{\partial x_i}$
But I am not even sure this step is right, and I don't know how to carry on.
Could tell me if my initial step (1) is right, and how to proceed to get the value of $\partial_i \sigma(x)$?