Hi,
I will be grateful if anyone can help me with this.
I have daily stock transaction (buy and sell) data for several investors. I need to calculate loss/gain of each sale for each investor. I have attched the worksheet has been attached which contains data for two investors.
That is, i need to calculate (profit/ loss = Sale value - Cost of Sale)
Investor is identified by the ACC column. Cost of sale is calculated on a LIFO basis. (Last in First Out method), which means the ones that bought last will be first sold.
I will provide a simple demonstration of what i need (this is for one investor).
Date--------------buy price-------buy volume------sell price------sell volume----profit
01/01/10----------10.00--------------10
02/01/10----------15.00--------------20-------------------17.00-------------15----------(17-15)*15
03/01/10-------------------------------------------------------18.00-------------10------(18-15)*5+(18-15)*5
If i explain this, by 02/01/10 the total stock investor has is, ($10*10) and ($15*20). when 15stocks are sold on that day, out of the total stock, we take 15 stocks at the base price of $15, as it is the latest price. 5 stocks left in that stock (bought at $15) after the sale and on 03/01/10sale transaction, it will be gone first and then we consider the older stocks (which is at $10).
Pls pls help me
Thank You so much
Bookmarks