I have 2 assets, asset A and asset B. These assets have a vector of returns, 30 observations each. I calculate the estimated return as mean of the asset vector A and for B as a mean of asset vector B. Now I have rA
and rB
which I will call now vector $r$ . I build the covariance matrix as
var A B COV A B
COV A B var A B
I also have a risk free asset called Rf
with $0.5$ return (for example) and I calculate for both (obtaining vector Rf
):
rA - Rf
rB - Rf
Now I calculate the weights as a multiplication between covariance matrix and vector Rf
and obtain 2 numbers which standardized, the sum is equal to 1 . Let's say $w_1=1.20$ and $w_2=-0.20$ (in financial terms I buy $120\%$ of asset A and shortsell $20\%$ of asset B) then you multiply this weights obtained by the vector of returns $r$ obtaining $1\times 1$ number which gives the return of the portfolio, same, you multiply the weights with variance covariance matrix and you get the variance of the portfolio.
Now the goal is to minimize the variance covariance matrix in order to have the optimal weights which minimize the risk.
Researchers write this problem as $$w^*=\arg\min (w'\Sigma w)$$ given that $\sum w_i=1$ where $w^*$ is the optimal weights vector and $\Sigma$ the var cov matrix.
Now seen this in a regression framework, it is possible to optimize this formulation adding a penalty function $R_o$ (whose intensity is controlled by $\lambda$) such as: $$w^*=\arg\min ((w'\Sigma w) +\lambda\Sigma R_o(w_i))$$
How can I see the covariance matrix as a regression? Which one is the explanatory variable, which is the dependent variable?