# "fix" a sample covariance matrix which is not positive semidefinite by using daily returns instead of monthly

In the portfolio optimization problem at hand, one of the constraints is that the tracking error should not be greater than $$\gamma$$.

The constraint is therefore:

$$(\textbf{x}-\textbf{w})^\mathrm{T}\Sigma(\textbf{x}-\textbf{w})\leq\gamma^2$$

where $$\Sigma$$ is the (sample) covariance matrix, $$\textbf{x}=(x_1,\dots, x_n)^\mathrm{T}$$ is the vector of decision variables, and $$\textbf{w}=(w_1,\dots, w_n)^\mathrm{T}$$ are the weights of the benchmark portfolio.

Since in the problem at hand $$n=1,000$$ and $$\Sigma$$ was solely calculated on the basis of $$T=60$$ monthly return observations, the (sample) covariance matrix is unfortunately not positive semi-definite. This is certainly because of $$n>T$$. During my research I came across this thread. However, finding the nearest positive semi-definite matrix unfortunately did not work in my case. The result is still not positive semi-definite.

Now the question is whether it is advisable and reasonable to consider daily returns instead of monthly returns in order to (possibly) generate positive semi-definiteness as this would result in $$T>n$$.

• What if you replaced every eigenvalue $<\epsilon=n\%$ of the largest eigenvalue by this $\epsilon$ - surely you'd get a positive definite matrix. Commented Jun 15, 2023 at 21:29
• You can use Ledoit-Wolf shrinkage which guarantees positive definiteness or fit the empirical dist of eigenvalues to a Marcenko-Pastur distribution to filter out negative/very small eigenvalues (see NCO). This is similar to what Dimitri suggested. Commented Jun 16, 2023 at 12:39