# How to calculate beta against a multi-asset benchmark

Lets say that I have a benchmark, $BM$ that consists of 3 assets- 30% asset $A$, 30% asset $B$ and 40% asset $C$. Now, lets further assume I am trying to construct a portfolio that uses $BM$ as its benchmark. In order to calculate my residual risk, active risk, etc, I need to calculate $\beta_n$ for each holding $n$ in the portfolio. I am wondering what the most consistent way to do this is.

One thought is to create a return stream for $BM$ and use it to calculate $\beta_n$ for each holding as I would for a single index benchmark. But questions arise as to the weighting I should use- do I assume the benchmark is continuously rebalanced (i.e.- scale each daily return of $A$, $B$, and $C$ by 0.3, 0.3, and 0.4 respectively? Or do I solve for the original weights I would have had at some time in the past to get to my 30/30/40 today? Or something else entirely?

Another thought, is to use the covariance matrix, and some "tricky" weighting. e.g.:

We know that the variance of a portfolio $P$ can be calculated from its covariance matrix ($V$) and weight row vector ($x$) like:

$\sigma^2_{P} = x V x^T$

We also know that given 2 portfolios ($P_x$ and $P_y$) with the same holdings but different weight vectors ($x$ and $y$), we can calculate the covariance between them as:

$cov(P_x,P_y) = x V y^T$

So, could I solve for the covariance matrix for holdings $A$, $B$, $C$, and $n$, ($V^*$) and create two weight vectors:

$x = [0.3, 0.3, 0.4, 0.0]$ and $y = [0.0, 0.0, 0.0, 1.0]$ and solve:

$\beta_n = \frac{xV^*y^T}{xV*x^T}$

I believe this may be the same as the "continuously re-balanced benchmark" above, but could be a bit more straight forward programming-wise. Thoughts? Am I just making this more complicated than it needs to be?