# Why annualizing sampled covariance matrix changes stock weight vector?

## Question

• While optimizing a portfolio using 'Global Minimum Variance' (GMV) method, I found that annualizing a sampled covariance matrix makes a difference in stock weight vector.
• Q1. Why annualizing (multiplying by 252) a covariance matrix makes a difference in weight vectors?
• Q2. Is it correct to annualize a variance and covariance by multiplying them by 252?

## Information in detail

• I check the portfolio optimization result by using the python library PyPortfolioOpt.
• In this library, the input for the math formula of optimization is a daily returns of assets.
• The library "annualize" the variance-covariance matrix by multiplying by 252. You can check the code here. The excerpt of the code is as follows :
def sample_cov(prices, frequency=252):
...
return daily_returns.cov() * frequency

• To annualize a sharpe ratio cacluated from the daily returns, we multiply them by square root of 252, which is almost equal to 15.87. But to annualize a covarinace, we multiply them just 252? It does not make sense to me.

• Furthermoe, multiplying a covariance by a constant number such as 252, does not change a rankings of covariances between variables. For example, let's suppose that we have 3 random variables A,B, and C and cov(A,B) = 0.4, cov(A,C) = -0.4, cov(B,c) = -0.7. Then if we still multiply them by 252, the relative co-movement is still the same.

• So I cannot understand why the annualizing (multiplying by 252) the variancce-covariance matrix change the portfolio optimization result.

• from my understanding, the 252 standard is coming from continuous time models with Brownian having a variance of T at time T. Concerning the sharpe ratio it makes sense as the sharpe uses the vol and not the var. The vol is evolving by the square root of time, hence when annualized *sqrt(252). My 0.02$, hope it would help – Mayeul sgc Sep 18 at 7:45 • @Mayeulsgc Thanks for your comment. But what does the 0.02$ at the end of your comment mean? – Eiffelbear Sep 18 at 7:47
• Ahaha it means "my 2 cents" english saying meaning small contribution but I am saying it anyway – Mayeul sgc Sep 18 at 7:49
• @Mayeulsgc Oh, okay. Can I ask you more about your content? I have taken no physics class so Brownian motion is something that I have no background knowledge about. As such, your explanation does not really help me much. Can you please elaborate on multiplying by 252 to annualize the variance, please? – Eiffelbear Sep 18 at 7:52
• I am not perfectly clear about it either but basically the important point is that you consider that the returns are Idependant and identically distributed. See this answer – Mayeul sgc Sep 18 at 7:57

Q1. Calculating the GMVP involves three operations:

1. Inverting the covariance matrix $$\Sigma$$

2. Multiplying the inverse by a column vector of 1's on the right: $$x=\Sigma^{-1} \mathbf{1}$$

3. Normalizing this vector so the elements sum to 1: $$w= \frac{x}{1^T x}$$

Note that the expected returns $$\mu$$ are nowhere used in this calculation.

If you multiply the covariance by 252, the inverse and x will be multiplied by $$\frac{1}{252}$$, but $$w$$ will be the same, since it is normalized.

Therefore multiplying the covariance matrix by any number whatsoever (other than 0) does not change the weights of the GMVP portfolio. So you must be doing something wrong or different from what I said above.

Q2. If you are using logarithmic returns, the return for 1 year is the sum of 252 daily returns. If the returns are independent it is true that the covariance matrix for yearly returns is 252 times the covariance matrix of daily returns. That is a property of the covariance of sums of independent variables.

For Q1, it shouldn't. You're simply multiplying the covariance matrix by a constant. However, the optimal GMV portfolio is very sensitive to inputs. The difference could simply be due to rounding (I'm assuming the differences are quite small).

Another way annualizing could change your outputs is if you're using transaction cost (of any other trade-off with risk). For example, if your objective function looks like this,

$$\max\limits_x \left\{-\lambda x'\Sigma x-\gamma\text{Transaction Cost}\right\}$$,

then annualizing effectively boosts your aversion parameter $$\lambda$$, which penalizes risk more relative to transaction cost. In this specific case, it's akin to forcing turnover (emphasize risk reduction at the expense of transaction cost).