+ Reply to Thread
Results 1 to 3 of 3

Dynamic Correlation Calculation

  1. #1
    Forum Contributor
    Join Date
    02-08-2005
    MS-Off Ver
    Microsoft 365
    Posts
    810

    Dynamic Correlation Calculation

    Hi,

    I have a worksheet of data with dates in ascending order in column A, and in columns B and C there are a list of investment returns at each date for two assets:

    A B C
    Date Return for asset 1 Return for asset 2


    I would like to create a formula that will calculate the correlation (using Excel's CORREL function) of the returns of the two assets between any two dates represented in the range. I would like the formula to refer to the start and end dates in cells d1 and e1 respectively so that I can change the dates in those two cells and have the correlation formula recalculate for the new period selected.

    Can someone please help.

    Thanks!

  2. #2
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582
    What you need to do is use "Defined Names" to create dynamic ranges and then refer to these ranges in your CORREL formula.

    In my data, A2:A100 is date range, Col B is Set 1, Col C is set 2
    Initial date is in E1, Closing date is in E2

    My first defined name is "Set1"
    Please Login or Register  to view this content.
    If you are unfamiliar with the MATCH and OFFSET functions, post your questions and I'll explain.
    The second name "Set2" is much simplier.
    Please Login or Register  to view this content.
    Then the correlation formula is
    Please Login or Register  to view this content.
    Does this work for you?

    ChemistB
    Last edited by ChemistB; 08-19-2008 at 12:44 PM. Reason: Forum not allowing attachment

  3. #3
    Forum Contributor
    Join Date
    02-08-2005
    MS-Off Ver
    Microsoft 365
    Posts
    810
    It works brilliantly.

    Thank you very much!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Dynamic Normalization Chart ?
    By impala096 in forum Excel Charting & Pivots
    Replies: 4
    Last Post: 03-28-2008, 03:36 PM
  2. Auto-Sorting Dynamic Data
    By MAMC84 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-05-2008, 11:52 AM
  3. Range Calculation VBA
    By pickledmuffin in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-26-2007, 11:51 PM
  4. Manual Calculation and Data Validation
    By cuteangelika in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 01-17-2007, 08:49 PM
  5. Disable calculation on selected sheets only
    By MikeTNT in forum Excel General
    Replies: 7
    Last Post: 11-12-2006, 01:41 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1