+ Reply to Thread
Results 1 to 8 of 8

calculating month end value for stock portfolio from list of transactions

Hybrid View

uptickdk calculating month end value... 09-11-2014, 05:41 PM
FDibbins Re: calculating month end... 09-11-2014, 06:07 PM
uptickdk Re: calculating month end... 09-11-2014, 09:00 PM
FDibbins Re: calculating month end... 09-11-2014, 09:39 PM
uptickdk Re: calculating month end... 09-12-2014, 10:13 AM
FDibbins Re: calculating month end... 09-12-2014, 11:12 AM
uptickdk Re: calculating month end... 09-12-2014, 01:10 PM
uptickdk Re: calculating month end... 09-13-2014, 05:37 PM
  1. #1
    Registered User
    Join Date
    04-25-2013
    Location
    Philly
    MS-Off Ver
    Excel 2010
    Posts
    26

    calculating month end value for stock portfolio from list of transactions

    I have a list of trades I have made with the buy/ sell dates and values. This portfolio holds 2 stocks and at month's end it will have 1 or 2 stocks and/ or all Cash. Cash is prices at $1 initial positions are in Cash for $10,000 each.

    I now need to calculate on a monthly basis the portfolio value as well as yearly as these trades go back to 2007. I have a vlookup to find the month end stock price*shares:
    =VLOOKUP(WORKDAY(DATE(YEAR(B18),MONTH(B18)+1,1),-1),Prices!$A$1:$S$1911,MATCH(A18,Prices!$A$1:$S$1,0),0)*D18
    where Prices is a worksheet which has all the prices for all securities in portfolio. Col A is date Col B on are stock prices and Row 1 has the stock symbol. (FYI CASH is not a stock symbol and is always $1.

    I can use sumifs to add the buy or sell values, which is incorrect but don't know how to insert the code above into the sumifs. See attached spreadsheet for formula.

    monthend calculations.xlsx

    Any help is greatly appreciated.
    Doug
    Last edited by uptickdk; 09-11-2014 at 05:45 PM.

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,044

    Re: calculating month end value for stock portfolio from list of transactions

    Not really sure what your expected answers would be, but see if this gets you any closer...
    =SUMIFS($I$18:$I$200,$B$18:$B$200,"<="&M3,$F$18:$F$200,">"&M2,$A$18:$A$200,"<>cash")
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    04-25-2013
    Location
    Philly
    MS-Off Ver
    Excel 2010
    Posts
    26

    Re: calculating month end value for stock portfolio from list of transactions

    FDibbins

    Thanks for the reply.

    What I need it so be able to substitute $I$18:$I$2000 in the sumifs formula with something that will do the following but for all securities within the range of I18:I2000 that meet the sumifs criteria.
    VLOOKUP(WORKDAY(DATE(YEAR(B18),MONTH(B18)+1,1),-1),Prices!$A$1:$S$1911,MATCH(A18,Prices!$A$1:$S$1,0),0)*D18
    (this will look up the month-end price and * the shares)

    Doug

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,044

    Re: calculating month end value for stock portfolio from list of transactions

    OK so what would your expected answer look like?

  5. #5
    Registered User
    Join Date
    04-25-2013
    Location
    Philly
    MS-Off Ver
    Excel 2010
    Posts
    26

    Re: calculating month end value for stock portfolio from list of transactions

    OUTPUT EXAMPLE:

    Jan 2007 20000
    Feb-2007 20000
    Mar 2007 20000
    Apr 2007 20416.21
    May 2007 21341.15

    Above is an example with actual numbers for each month calculated manually. The 4/30/07 prices for RSP was 50.69 and SLY was 65.19 for 5/31/007 the prices for QQQ was 47.41 and SPY was 153.32. The number of shares is calculated correctly based on the sale proceeds on the date of purchase.

  6. #6
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,044

    Re: calculating month end value for stock portfolio from list of transactions

    Is that based on the WB you uploaded? Because none of the values you quotes are in that WB

    The 4/30/07 prices for RSP was 50.69 and SLY was 65.19 for 5/31/007 the prices for QQQ was 47.41 and SPY was 153.32. The number of shares is calculated correctly based on the sale proceeds on the date of purchase.

  7. #7
    Registered User
    Join Date
    04-25-2013
    Location
    Philly
    MS-Off Ver
    Excel 2010
    Posts
    26

    Re: calculating month end value for stock portfolio from list of transactions

    Yes, the WB is too large to upload and what I uploaded is just values as w/o full WB links wouldn't work. Keep in mind there is a worksheet called Prices and all dates are in column A and row 1 has all stock symbols, i.e Prices!$A$1:$S$1911

    1. need to calculate what is in portfolio at a months end
    2. get month end prices for both investments and x (number of shares at month's end)

    Thanks

  8. #8
    Registered User
    Join Date
    04-25-2013
    Location
    Philly
    MS-Off Ver
    Excel 2010
    Posts
    26

    Re: calculating month end value for stock portfolio from list of transactions

    Anyone? Anyone? Bueller?, Bueller?
    Any help would be greatly appreciated

+ 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. Replies: 22
    Last Post: 09-20-2013, 02:00 PM
  2. Replies: 2
    Last Post: 09-17-2013, 07:12 PM
  3. Stock Portfolio Formula
    By WilsonsKM in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 01-18-2013, 12:56 PM
  4. Sort by Stock Name then list by Oppsite Transactions
    By SMJE in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 01-19-2011, 06:57 PM
  5. Stock Portfolio Analysis
    By cgurr1 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 11-27-2008, 09:06 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