# non-pairwise correlation statistic

This topic is 3364 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

I'm familiar with standard pairwise correlation statistics such as Pearson and Spearman correlation coefficients, but does there exist a method to compare more than 2 columns of data in this same fashion? For example, if I have two columns of data and I want to evaluate their correlation or relatedness, either of the two I mentioned above would be fine, but if I had 3, 4, or 5 columns of data and wanted a single number to evaluate their relatedness, what would I use? I could go with an average correlation, but that seems to be a trivial answer. Any thoughts? -Kirk

##### Share on other sites
I can think of several options, but I don't know what properties you would like this measure to have. For instance, you can take out the mean of each column, normalize it (divide each element by the "length" of the column, sqrt(x12+x22+...+xn2)) add them up and measure the length of the resulting vector. If all the columns point in the same direction, this length will be the number of columns k. If they are unrelated, you expect the length to be sqrt(k). And if they are perfectly balanced, offsetting each other, it will be 0.

##### Share on other sites
You'd better explain what your "columns" of data are and why averaging pairwise correlations is inadequate.

##### Share on other sites
Well, it isn't very games related, but...

I've been reading that an optimal financial portfolio will have funds that are minimally correlated with each other. Even my financial adviser suggests this, but she can't seem to go into the analysis and just presents the dogma. So, I've collected a set of historical prices for all the funds that I have available to me and I wanted to plot out the correlation between daily change in funds vs. the performance of the portfolio. This is easy for portfolios with only two funds, but when I move to 3 and higher, I end up without a good option. Averaging the pairwise correlations is a bit unsatisfying due to the leverage that a single pair of highly correlated funds will have. In essence, I want a non-pairwise diversity metric (or measure) for 3 or more funds.

-Kirk

##### Share on other sites
Read the Wikipedia page on modern portfolio theory. The section labeled "Mathematically" has the formula you seek.

##### Share on other sites
alvaro

Thank you! I don't know why I never stumbled upon that particular page. It looks like portfolio variance is what I'm looking for.

As an extension of this, I want to go beyond the simple correlation between investments. To illustrate my idea, consider two funds, A and B. I want to find the correlation between them only for those days that A had a positive change. Independently, I want the same for only those days that A had a negative change. Likewise for B. In this case we end up with 4 values for the comparison between A and B.

My thought is that if two investments are more correlated on their mutually positive days and less correlated on their mutually negative days, you may end up with a better return. Any thoughts?

Of course, "historical performance is not an indication of future performance" etc. etc. etc.

##### Share on other sites
Quote:
 Original post by kirkdMy thought is that if two investments are more correlated on their mutually positive days and less correlated on their mutually negative days, you may end up with a better return. Any thoughts?

Consider two daily fund prices A and B. If we replace B by B* = min (A,B) on days when A and B are both increasing, the given metric "improves" (more correlation on the good days, the same on bad and uncertain days) but a portfolio with funds A and B* is obviously strictly worse than one with A and B.

• ### What is your GameDev Story?

In 2019 we are celebrating 20 years of GameDev.net! Share your GameDev Story with us.

• 17
• 14
• 10
• 9
• 11
• ### Forum Statistics

• Total Topics
634094
• Total Posts
3015498
×