# Tag Info

## Hot answers tagged covariance-matrix

15

it doesn't require normality. What it requires is that the investor's decisions are determined by mean and variance. A normal distribution is determined by mean and variance, so if you assume joint normality then there is no point in the investor being interested in anything else. (we try to discuss assumptions thoroughly in our book, Introduction to ...

11

This is indeed an interesting question. According to this website, a paper by Goldman Sachs [Tierens and Anadu (2004)] proposes three alternative methods for estimating average stock correlations: Calculate a full correlation matrix, weighting its elements in line with the weight of the corresponding stocks in the portfolio/index, and excluding ...

8

I just want to add to vonjd's answer some info on the comparison of the 3 methods. This is too big for a comment so I'm posting as a separate answer but please upvote his answer, not mine. Do the differences in methodologies matter in practice? To gauge the practical importance of the biases in methods 2 and 3, we calculate the weighted stock correlation ...

7

To supplement the other answer, yes there are optimization reasons for the covariance matrix being symmetric positive definite (SPD). All positive definite matrices are invertible and its inverse is also positive definite. This guarantees a unique global minimum in a quadratic optimization problem (MVO). Lots of material available on the topic: https://www....

6

What you basically do here is a Principal Component Analysis (PCA). A good starting point in the financial sphere is Managing Diversification by Attilio Meucci (2010) Page 3: "The most natural choice of uncorrelated risk sources is provided by the principal component decomposition of the returns covariance [...] The eigenvectors define a set of N ...

6

Let $s$ be a $N\times1$ vector of standard deviations and $C$ be an $N\times N$ correlation matrix. The covariance matrix is equal to $$\Sigma=\text{diag}(s) \ C \ \text{diag}(s)$$ where $\text{diag}(x)$ is a function that takes an $N\times1$ vector and puts it on the diagonal of a $N\times N$ matrix. If you get some better standard deviation estimates, ...

6

Suppose the covariance matrix is $V$ (which is n by n) and the weights are $w$ (of length n). Then the Portfolio Variance is $V_p = w^T V w$ and the Risk Contribution (in terms of variance) of asset $k$ is $RC_k=w_k \sum_j V[k,j]w_j$ in words this is "the weight of asset k times the inner product of the k-th row of $V$ and the weight vector". (Sometimes ...

6

What does 'simulate a covariance matrix' mean? If the question means, generate an arbitrary correlation matrix for 1000 stocks, then we can choose any symmetric matrix with all 1s down the diagonal, so long as every element is between -1 and 1 and the matrix is positive semi-definite. The large size of the matrix means that putting random values in every ...

6

Positive definite matrix $A$ is defined as $x^TAx > 0$ for all vectors $x$. Since a term $w^T\Sigma w$ in Markowitz (and other models as well) expresses variance in returns, it is a measure of dispersion. Any measure of dispersion has to be positive (or maybe zero but it is a case where there is no uncertainty and hence no risk). Negative dispersion is ...

5

The given matrix can not represent a covariance matrix since it would imply that asset 1 is negatively correlated to asset 2 and asset 3. But asset 2 is negatively correlated to asset 3 which contradicts the first statement. In general a covariance matrix has to be positive semi-definite and symmetric, and conversely every positive semi-definite symmetric ...

5

We have weights $w_A$, $w_B$ and $w_C = 1 - w_A - w_B$ that sum to $1$. With de-meaned returns $r_A$, $r_B$, and $r_C$, the portfolio variance is $$E\{[w_A r_A + w_B r_B + (1 - w_A - w_B)r_C]^2 \} = w_A^2\sigma_A^2 + w_B^2\sigma_B^2 + 2 w_A w_B\rho_{AB}\sigma_A \sigma_B,$$ assuming the cash volatility $\sigma_C$ is zero.

5

here is how to get covariance matrix from correlations:

5

If you assume that a financial asset price has a change that is a wiener process then you can view the future value of that asset as the initial value plus the sum of the independent daily changes (for equity or returns based then you would need log version of this): $$S_t = S_0 + \sum \Delta S_i$$ where $\Delta S_i = S_i - S_{i-1}$ is a wiener process. ...

5

This is the result of the Sherman-Morrison inversion for the sum of an invertible matrix and an outer product. You will find this (and many other helpful methods) in the Matrix Cookbook. Specifically, this is equation 160 on p 18: $$\left(\boldsymbol{A}+\boldsymbol{bc}^T\right)^{-1}=\boldsymbol{A}^{-1}-\frac{\boldsymbol{A}^{-1}\boldsymbol{bc}^T\boldsymbol{A}... 5 I'm not a Python programmer, however, reading the reference manual of np.var, you're using the "biased" version of the variance estimator. Instead use the unbiased variance estimator: import numpy as np from numpy.random import randn X = randn(1000,3) Sigma = np.cov(X.T) w = np.array([0.2,0.3,0.5]) print(np.var(X@w, ddof=1)) ... 4 For a swap, we have a sequence of re-setting and payment dates. The # of forward rates corresponding to the # of payment dates. For example, let us assume that we have n payment dates t_1, \ldots, t_n, where 0< t_1 < \cdots < t_n. Then there are n forward rates. During the simulation, for time steps prior to t_1, there exist n "... 4 It depends on your investment process: more specifically, on how you generate views. Here are three practical cases which lead to different choices for \Omega: Let's assume you are an investor who acts on (more or less) arbitrary bits of opinion: e.g. you like Italian equities because you like Italy, and German equities because you find Angela Merkel's ... 4 One way to this is the following (you can code all these constraints if you use the right software, I am doing such things using mathematica) You define w_{i,j} which is the weight of asset j in subportfolio i, furthermore you define w =(w_j)_{j=1}^{\text{no of assets}} the total weight of the portfolio in asset j. the objects for the optimization ... 4 He is forced to use some tricks because Excel can only take average of a rectangular area, but he wants the avg of upper non-diagonal elements of the matrix only. So he subtracts \frac{1}{n} (the average of the 1's on the diagonal), then scales the result by \frac{n^2}{n(n+1)/2} which is the number of total elements divided by on-or-below-diagonal ... 4 This is a common problem in covariance matrix estimation, with several possible solutions. One of the simplest involves two steps: (1) You compute each element of the covariance matrix on a 'best efforts' basis, meaning you take the covariance of the two time series involved after REMOVING any data pairs having a N/A value. (Note that this means each ... 4 EDITED You are right. We have to look town to the "leaves" in each iteration. I would do it the following way: If L_i^{(j)} is the set of indices in the j branch (j \in \{1,2\}), then we define s_i^{(j)}=\sum_{n \in L_i^{(j)}w_n}, the weight of the branch before scaling and n_i^{(j)}=\left|L_i^{(j)}\right| the number of leaves in the branch. ... 4 Multivariate volatility models for replacing the sample covariance matrix with in the mean-variance portfolio selection model: RiskMetrics 1996 EWMA (Exponentially weighted moving average) covariance matrix RiskMetrics 2006 EWMA covariance matrix Multivariate DCC-GARCH covariance matrix Jon Danielsson "Financial risk forecasting" has EWMA and GARCH for R ... 4 Just to expand on Alex answer. Empirically it is simply not true. Focusing on the diagonal of the variance-covariance matrix, we know that there is a large variance risk premium. Take a look at table 3 from Carr and Wu (2009). Regarding covariances we do not have much evidence, because there are no options on every single pair of stocks. However, we do know ... 3 There are 2 issues that come to mind What is the correct definition of semi-covariance$$ \frac{1}{n}\sum\limits_{i = 1}^n {\sum\limits_{j = 1}^n {\min \left( {{r_i},0} \right)} } \min \left( {{r_j},0} \right)  \frac{1}{n}\sum\limits_{i = 1}^n {\sum\limits_{j = 1}^n {\min \left( {{r_i}{r_j},0} \right)} } $$2. Can you get a positive semi-definite ... 3 one solution that works is set up the usual correlation matrix and pre- and post multiply by a diagonal matrix with semi standard deviations down the diagonal taking care that they are not zero 3 In The Black-Litterman Model In Detail Jay Walters says the following on p. 13 (top paragraph): First, by construction we will require each view to be unique and uncorrelated with the other views. This will give the conditional distribution the property that the covariance matrix will be diagonal, with all offdiagonal entries equal to 0. We constrain the ... 3 You have to find the market portfolio, which is the portfolio with maximum Sharpe Ratio:$$S^*(w)=\frac{R_p(w)-R_f}{\sigma_p(w)} So calculate this ratio and maximize it (I think there is also an exact analytic expression for the market portofolio weights). Then investors will mix this optimal "best" Market portfolio with the riskfree asset based on ...

3

I think Cholesky on correlation matrix is better because it makes code apply more generally in case we don't have full rank. For example, suppose we want to simulate three correlated normals with covariance matrix [[a^2,0,0], [0,b^2,0], [0,0,c^2]] i.e. variables are uncorrelated and have vols a, b, and c. Because this is positive definite, we can do ...

3

You can use the either, as both necessarily are symmetric positive definite; covariance is a personal preference. It's really just a matter of scaling, as $\mathcal{N}(0,\Sigma)$ is distributionally $\sqrt{\Sigma} \mathcal{N}(0,1)$. Correlation would require additional scaling (i.e. multiplication of every $\mathcal{N}(0,\rho)$ element by its respective ...

Only top voted, non community-wiki answers of a minimum length are eligible