When there are several transactions made for the same stock, StocksCafe uses Weighted Average for computation (read about the different methods here).
StocksCafe chose Weighted Average for a few reasons:
- You can then average up or average down.
- Averaging is the simplest to understand in all scenarios.
- It is what most, if not all, brokerages use.
If you ever wondered why the calculations for average price appears different from what you expected, the following example might help you better understand how Weighted Average works.
|Action||Quantity||Transacted Price||Total Cost||Total Shares||Average Price|
|Buy||1,000||20.54||(43,840 + 1000*20.54) = 64,380||3,000||21.46|
|Sell||1,000||17.92||(82,690 – 1000*20.6725) = 62,017.5||3,000||20.6725|
To put it simply, when a Buy transaction occurs, the average price is recalculated.
When a Sell transaction occurs, it is the latest average price used in calculations, not the transacted price. The transacted price is irrelevant in calculating average price of shares.
We hope this helps you better understand how StocksCafe calculates average price. Feel free to comment below if you have any further questions.