Forum

Notifications
Clear all

Stock Portfolio Dashboard - realized gain/loss

11 Posts
3 Users
0 Reactions
178 Views
(@sejong)
Posts: 5
Active Member
Topic starter
 

How to add realized gain/loss to the Stock Portfolio Dashboard?14

 
Posted : 23/03/2021 1:48 pm
(@mynda)
Posts: 4761
Member Admin
 

Hi Mike,

Welcome to our forum!

Unfortunately, your question is too vague. Please provide a sample Excel file that clearly illustrates the data you're working with and your desired result so we know what you mean.

Thanks,

Mynda

 
Posted : 23/03/2021 7:09 pm
(@sejong)
Posts: 5
Active Member
Topic starter
 

Hi Mynda-

A sample Excel file is attached.  You can see several examples of

Unrealised gain where the formulas follow your example

Realised gain (MCD, NVDA, TSLA, and VEEV) where I made a stab at it by an IF statement that only calculates gain/loss when SHARES > 0.  This in turn disclosed that with fractional shares, a add and subtract in the same amount (example: MCD 0.62073) shares doesn't calculate to exactly zero.  

And I could figure out a formula for a stock that has both open and closed positions (example AMZN) so I did it by a one-time formula.

-Mike

 
Posted : 25/03/2021 12:11 pm
(@mynda)
Posts: 4761
Member Admin
 

Hi Mike,

No file attached. Be sure to click the 'Start Upload' button after selecting your file and wait for the green notification under the button to tell you that your file has completed uploading.

Mynda

 
Posted : 25/03/2021 7:03 pm
(@sejong)
Posts: 5
Active Member
Topic starter
 

Second try to upload file

 
Posted : 26/03/2021 8:00 am
(@mynda)
Posts: 4761
Member Admin
 

Hi Mike,

Thanks for sharing your file. 

Not sure how the Amazon shares work. It appears you bought 28 on Feb 4, then sold 32 on March 3, which is more than you had. Then April 16 you bought 32?

Mynda

 
Posted : 27/03/2021 6:10 am
(@sejong)
Posts: 5
Active Member
Topic starter
 

Mynda-

The 32 shares (Lot #1) were bought in 2020, and sold in 2021.

The 28 shares (Lot #2) were bought in 2021

Lot #1

2020-04-16 Buy 32x AMZN

2021-03-03 Sell 32x AMZN

Lot #2

2021-02-04 Buy 28x AMZN

So Lot #1 is a closed position, and Lot #2 is an open position.

-Mike

 
Posted : 28/03/2021 11:18 am
(@mynda)
Posts: 4761
Member Admin
 

Doh, I misread the year! I shouldn't answer questions at night after a long day 🙂 

You can add a Status column to the ledger that marks shares as sold. Then you can add a criteria to your Unrealised and Realised Gain/Loss SUMIFS that only include transactions marked as open or sold respectively. If you only sell part of a holding, then you'd need to split the transaction into two rows, one for the sold shares and one for the shares you still hold.

Hope that makes sense. See example attached.

Mynda

 
Posted : 29/03/2021 1:07 am
(@arun-kainthgmail-com)
Posts: 9
Active Member
 

Hi Mike,

I noticed that your Lot #1 2020-04-16 Buy 32x AMZN  is showing as Interest in Col C ( Action)  and not Buy.

 

Arun  

 
Posted : 30/03/2021 1:31 am
(@arun-kainthgmail-com)
Posts: 9
Active Member
 

Hi Mike,

MCD resulting as 0.62073 due to Dividend transaction. 

Arun  

 
Posted : 30/03/2021 1:40 am
(@sejong)
Posts: 5
Active Member
Topic starter
 

Fixed the errors.  Thanks.

 
Posted : 30/03/2021 8:56 am
Share: