MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn moreOpportunities for recent engineering grads.

Apply Today
Asked by Fabrizio Marinelli on 30 Jan 2013

Hello,

In an Excel workbook I reported 10 time series of 10 titles that should cover the past 15 years. After i calculated the returns and the statistics (mean, std. dev, var, etc.) I'd like to calculate the medium correlation coefficient of the portfolio. I don't mean the correlation matrix, but a single number for the entire portfolio.

Is that possible?

Thanks.

*No products are associated with this question.*

## 8 Comments

Direct link to this comment:http://www.mathworks.com/matlabcentral/answers/60364#comment_126020

Yes, it is. Are you referring to http://www.jstor.org/stable/2328653?

Direct link to this comment:http://www.mathworks.com/matlabcentral/answers/60364#comment_126042

Yes, exactly! Matlab has any function that allows the calculation of that coefficient?

Direct link to this comment:http://www.mathworks.com/matlabcentral/answers/60364#comment_126062

Well, but it's just the average of the lower diagonal correlation coefficient matrix.

With 10 time series, there is not much computational effort spent on calculating the correlation coefficient matrix first.

Direct link to this comment:http://www.mathworks.com/matlabcentral/answers/60364#comment_126075

So, let's say that the time series is about 5 titles; correlation coefficient matrix is, for example:

The average correlation coefficient is just [(0.7 + 0.1 + 0.3 + 0.0 + 0.0 + 0.6 + 0.1 + 0.3 + 0.6 + 0.5)/10]?

Direct link to this comment:http://www.mathworks.com/matlabcentral/answers/60364#comment_126093

Do you have the formula for the medium correlation coefficient? I can't find anything online.

Direct link to this comment:http://www.mathworks.com/matlabcentral/answers/60364#comment_126097

Sorry, not the lower diagonal but the average of all off-diagonal elements. Thus you need to multiple your calculation by 2 since the matrix is symmetric:

@Benji: I posted a link in first comment.

Direct link to this comment:http://www.mathworks.com/matlabcentral/answers/60364#comment_126103

Ok ok i understand, thank you!

Direct link to this comment:http://www.mathworks.com/matlabcentral/answers/60364#comment_126114

Thank Oleg, I thought it was for purchase only, appears there is free online view.