FIFO on Stock Capital Gains/Losses

Tequilashot

New Member
Joined
Aug 17, 2015
Messages
33
I'm looking at calculating the capital gains or losses on a stock portfolio using the first in first out system and also taking into account fees and fx rates for the given dates.

I've tried playing around with a few SUMIFS functions but its just not clicking with me today. So far I've only gotten as far as managing an account balance (quantity of shares held) on each line depending on the actions and company, but after this I'm kind of stuck on how to compile a function that determines the profit or loss from a FIFO perspective.

Below is a sample table of what I am working with.

ABCDEFGH
DateActionCompanyQuantityPriceFeesAmountFX Rate £/$
106/01/2015BuyPAC100025.008.9525,000.001.52
208/02/2015BuyPAC100030.008.9530,000.001.49
310/03/2015BuyGAF800120.001.4396,000.001.53
412/04/2015SellPAC70032.001.2522,400.001.51
514/05/2015SellGAF800110.001.2688,000.001.50
616/06/2015BuyBLU60014.001.278,400.001.52
718/07/2015BuyBLU60012.001.287,200.001.52
820/08/2015SellBLU60016.001.299,600.001.49
922/09/2015SellPAC70030.001.3021,000.001.45
1024/10/2015SellBLU60010.001.316,000.001.42

<tbody>
</tbody>
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".

Forum statistics

Threads
1,214,535
Messages
6,120,090
Members
448,944
Latest member
sharmarick

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top