LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
bpeltzer
 
Posts: n/a
Default Correlation Matrix

You can use the OFFSET function to dynamically create the array references.
Something like:
=IF(B$1=$A2,"",CORREL(OFFSET(Sheet1!$A$2,0,MATCH($ A2,Sheet1!$1:$1,FALSE)-1,5,1),OFFSET(Sheet1!$A$2,0,MATCH(B$1,Sheet1!$1:$1 ,FALSE)-1,5,1)))
The first part of the IF just says not to bother correlating a security
against itself.
The MATCH functions figure out which columns of data to pull from sheet1.
The OFFSET functions use the match results to create the two arrays; the 5
in each OFFSET is to get five rows -- years -- of data.
--Bruce


"katie" wrote:

I have 30 securities with 5 years on monthly returns
Securities across row A and returns down the columns

A B C D
1 IBM TGT HD
2 1 3 2
3 -.5 2 -1
4 2 6 -3


I want to create a matrix that correlates the return of every security
against every securit

IBM TGT HD
IBM
TGT
HD

Is there a way to put a look up function into a correlation furnction when
you want it to supply you with an array?

=Correl(lookup (IBM,other work sheet row A, give array set below IBM in
other work sheet), lookup TGT, other work sheet row a, give array set below
TGT in other worksheet)

This type of formula is not working for me so any suggestions would be great.

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to identify entries in a matrix also present in another list larkindale Excel Worksheet Functions 2 September 16th 05 07:07 PM
CORRELATION / COVARIANCE MATRIX Walker Excel Worksheet Functions 1 April 30th 05 06:36 AM
In Regression Analysis, How do you get a Correlation Matrix to be. tjp32 Excel Discussion (Misc queries) 1 April 4th 05 08:59 PM
Correlation matrix Peppino Excel Worksheet Functions 1 March 10th 05 01:32 PM
Finding Values in a "Matrix" Diane Alsing Excel Discussion (Misc queries) 8 December 31st 04 08:21 PM


All times are GMT +1. The time now is 08:58 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"