Correlation

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt

mr.interested
Posts: 16
Joined: Wed Jul 14, 2010 5:57 am

Correlation

Postby mr.interested » Wed Aug 25, 2010 11:48 am

Hello,

I'm trying to compute a correlation matrix for a number of series, and then take, say, 100 at least correlated series. Is there any way to achieve this? In other words, how can I take names of those 100 series which are at least correlated among the entire sample?

Best

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13600
Joined: Tue Sep 16, 2008 5:38 pm

Re: Correlation

Postby EViews Gareth » Wed Aug 25, 2010 11:50 am

what does "and then take, say, 100 at least correlated series" mean?

mr.interested
Posts: 16
Joined: Wed Jul 14, 2010 5:57 am

Re: Correlation

Postby mr.interested » Wed Aug 25, 2010 12:26 pm

what does "and then take, say, 100 at least correlated series" mean?
OK, so let's say I have 10,000 series + 1 index, and I want to create a portfolio of 100 series which have the lowest correlation with the index. As I understand, I would have to create a correlation matrix, and then take names of 100 series that have the lowest correlation with the index. How can I do that?

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13600
Joined: Tue Sep 16, 2008 5:38 pm

Re: Correlation

Postby EViews Gareth » Wed Aug 25, 2010 1:13 pm

I think I would loop through them calculating the covariance once at a time, recording the covariances in to a column of a matrix. Then you could sort the matrix and take the top (or bottom) 100.

mr.interested
Posts: 16
Joined: Wed Jul 14, 2010 5:57 am

Re: Correlation

Postby mr.interested » Thu Aug 26, 2010 5:10 am

I think I would loop through them calculating the covariance once at a time, recording the covariances in to a column of a matrix. Then you could sort the matrix and take the top (or bottom) 100.
Thank you Gareth.


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 1 guest