Why lots matter
If you hold one “average cost” number per security, you can report a position but you cannot answer which shares were sold, what they cost, or what the remaining shares cost. A lot is a single purchase with its own date, quantity and unit cost. With FIFO (first in, first out), a sell consumes the oldest lots first.
A worked example
Buy 100 shares at 10 in January, then 100 shares at 12 in February. Later, sell 150 shares at 15.
| Step | Detail | Amount |
|---|---|---|
| Lot 1 | 100 × 10 | 1,000 |
| Lot 2 | 100 × 12 | 1,200 |
| Sell 150 at 15 | Proceeds | 2,250 |
| Cost consumed (FIFO) | 100 from lot 1 (1,000) + 50 from lot 2 (600) | 1,600 |
| Realised profit | 2,250 − 1,600 | 650 |
| Remaining position | 50 shares from lot 2 at 12 | cost 600 |
The key point: after the sell, the remaining cost is 600, not the original 2,200. If a system keeps showing 2,200 it will overstate cost, understate unrealised profit and make every return figure that depends on it unreliable. Remaining cost must fall in proportion to the quantity sold from each lot.
Splits and dividends
- Stock split: a 2-for-1 split on the 50 remaining shares gives 100 shares. Total cost stays 600, so unit cost halves from 12 to 6. Cost does not change; quantity and unit cost do.
- Cash dividend: it is income, not a change in cost basis. It should be recorded as a transaction and included in total return.
- Back-dated trades: inserting a purchase in the past changes which lots a later sell consumes, so lots must be replayable from events rather than stored as overwritten balances.
Checks worth running
- Sum of lot quantities equals the position quantity for every security.
- Remaining cost equals the sum of remaining quantity × unit cost per lot.
- Realised profit plus remaining cost reconciles to total purchase cost.
- Cost basis is unchanged by a split.
CapLens runs checks of this kind automatically as part of its 400+ integrity checks. See governance and auditability and the portfolio and lots tour.