Guest User

Stock Portfolio Tracker Formulas

a guest
Dec 30th, 2020
18,468
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.98 KB | None | 0 0
  1. Stock Portfolio Tracker Formulas
  2. 2020.12.30 by Michael Jay
  3.  
  4. For use with this video: https://youtu.be/GqB4Oe0SkHU
  5.  
  6. Formulas for Copy and Paste
  7.  
  8. Note: You must set up your worksheet the same as in the video for these formulas to work properly. Paste these formulas in their respective columns in row 8. The first formula shown is the more advanced one I use, but I have also provided a simpler alternative formula you can use as well.
  9.  
  10. Rank - Column B
  11. =IF(ISBLANK(C8),"", IFERROR(RANK(E8,$E$6:$E$25),""))
  12. =RANK(E8,$E$6:$E$25)
  13. **You may need to expand the $E$6:$E$25 range as you add more stocks
  14.  
  15. Allocation (%) - Column E
  16. =IFERROR(IF(OR(P8=0,ISBLANK(C8)),"",P8/SUMIFS(P:P,$C:$C,"<>")),"")
  17. =P8/SUMIFS(P:P,$C:$C,"<>")
  18.  
  19. Cost Basis (%) - Column F
  20. =IFERROR(IF(OR(R8=0,ISBLANK(C8)),"",R8/SUMIFS(R:R,$C:$C,"<>")),"")
  21. =R8/SUMIFS(R:R,$C:$C,"<>")
  22.  
  23. Size - Column J
  24. =IFERROR(VLOOKUP(K8, 'Lookup Tables'!$B$4:$C$7,2,TRUE),"")
  25. =VLOOKUP(K8, 'Lookup Tables'!$B$4:$C$7,2,TRUE)
  26. **You must create the lookup table exactly as in the video or update the table to the correct reference.
  27.  
  28. Market Cap ($B) - Column K
  29. =IFERROR(IF(G8="Stock",GOOGLEFINANCE(C8,"marketcap")/10^9,""),"")
  30. =GOOGLEFINANCE(C8,"marketcap")/10^9
  31.  
  32. Unit Basis ($) - Column N
  33. =IF(ISBLANK(C8),"",R8/M8)
  34. =R8/M8
  35. **Use as a formula if you are inputting the amount paid as your cost basis input.
  36.  
  37. Price ($) - Column O
  38. =IF(ISBLANK(C8),"",GOOGLEFINANCE(C8))
  39. =GOOGLEFINANCE(C8)
  40.  
  41. Position Value ($) - Column P
  42. =IF(ISBLANK(C8),"",M8*O8)
  43. =M8*O8
  44.  
  45. Amount Paid ($) - Column R
  46. =IF(ISBLANK(C8),"",M8*N8)
  47. =M8*N8
  48. **Use as a formula if you are inputting the unit basis as your cost basis input.
  49.  
  50. Total Return ($) - Column S
  51. =IF(ISBLANK(C8),"",P8-R8)
  52. =P8-R8
  53.  
  54. Total Return (%) - Column T
  55. =IF(ISBLANK(C8),"",S8/R8)
  56. =S8/R8
  57.  
  58. Portfolio Return (%) - Column U
  59. =IF(ISBLANK(C8),"",S8/SUMIFS(R:R,$C:$C,"<>"))
  60. =S8/SUMIFS(R:R,$C:$C,"<>")
  61.  
  62.  
  63. Custom Number Formats for Return Columns
  64.  
  65. $ Return: 0.0%;[Red](0.0%)
  66. % Return: #,##0.00_);[Red](#,##0.00)
  67.  
Advertisement
Add Comment
Please, Sign In to add comment