Hi,
I have a series of transactions and need to calculate the average cost which includes both buys and sells.
E.g.
Purchase 100 shares @£1/share
Purchase 50 shares @£1.50/share
Sell 25 shares @£2/share
Purchase 30 shares @£1.60/share
Weighted total cost after each transaction
£100 (100 *...