+ Reply to Thread
Results 1 to 7 of 7

Dollar Weighted Average Sumproduct Formula:

  1. #1
    Registered User
    Join Date
    04-10-2009
    Location
    New York
    MS-Off Ver
    Excel 2007
    Posts
    39

    Dollar Weighted Average Sumproduct Formula:

    Good morning!

    I've been trying to figure out a dollar weighted average formula in excel.

    See attached file...

    In sheet 1, I need to pull data from sheet 2 using a sumproduct formula to find the dollar weighted average maturity of a bond portfolio. Basically, I need to know how many days the portfolio has left to mature according to the portfolio's weighting by the amount in column H.

    If anyone can point me in the right direction, I'd be much appreciative.

    Thanks,
    Mike
    Attached Files Attached Files
    Last edited by pipsturbo; 12-07-2009 at 07:13 PM.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Dollar Weighted Average Sumproduct Formula:

    Should the formula be:

    =SUMPRODUCT(1*(Sheet2!B2:B3000=D4),1*(Sheet2!V2:V3000=B2))/COUNTIF(Sheet2!H2:H3000,">0")
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    04-10-2009
    Location
    New York
    MS-Off Ver
    Excel 2007
    Posts
    39

    Re: Dollar Weighted Average Sumproduct Formula:

    Hi NBVC,

    Thanks for the post.

    I'm using:

    =SUMPRODUCT(1*('Raw_Data t'!$B$2:$B$3000=$D4),1*('Raw_Data t'!$V$2:$V$3000=$B$2))/COUNTIF('Raw_Data t'!H2:H3000,">0")

    It still calculates as 0 still.

    What am I doing wrong?

    Thanks,
    Mike

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Dollar Weighted Average Sumproduct Formula:

    I noticed the date in B2 is not in your list in v2:V3000.... Should it be? Or are you looking for dates less than or equal to?

  5. #5
    Registered User
    Join Date
    04-10-2009
    Location
    New York
    MS-Off Ver
    Excel 2007
    Posts
    39

    Re: Dollar Weighted Average Sumproduct Formula:

    Hi,

    I updated the formula to make it more simple:

    =IF('Raw_Data t'!$B$2:$B$3000=D4,SUMPRODUCT('Raw_Data t'!$W$2:$W$3000)*('Raw_Data t'!$X$2:$X$3000),0)

    I built 2 columns for the portfolio weightings. This is basically that each position value is divided by the complete value of the portfolio.

    It still returns 0 for some reason though.


  6. #6
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Dollar Weighted Average Sumproduct Formula:

    Kind of confused without seeing what you did...

    Maybe:

    Sumproduct(--('Raw_Data t'!$B$2:$B$3000=D4),'Raw_Data t'!$W$2:$W$3000,'Raw_Data t'!$X$2:$X$3000))

  7. #7
    Registered User
    Join Date
    04-10-2009
    Location
    New York
    MS-Off Ver
    Excel 2007
    Posts
    39

    Re: Dollar Weighted Average Sumproduct Formula:

    Thanks for your help! Figured out the problem.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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