THE LEDGER — Cost Basis & Trading Records OS Brain
THE LEDGER — Cost Basis & Trading Records OS Brain
For the records you will need and do not have. One orchestrator plus ten specialists that compute cost basis across disposals, reconcile transactions across venues, and build the trail before a deadline rather than during one.
Most people reconstruct their trading year in the week the return is due, from exchange exports that no longer reconcile, for venues that have since closed. The basis script takes your transaction history and computes realised gains under FIFO, LIFO and weighted average, showing the difference between them — which is frequently large, and which may or may not be a choice you are allowed to make depending on where you live. Doing this in January rather than deadline week is the whole difference between a calculation and an archaeology project.
cost_basis.py
Computes realised gains under FIFO, LIFO and weighted average from a transaction ledger, shows the difference each method produces, and flags every disposal with a missing or unmatched acquisition record. Every OS Brain in this drop carries its own executable component, so the judgement calls stay with you and the arithmetic stops being a matter of opinion. Runs anywhere Python runs, and the specialists still work on their own if you never open it.
Say it in plain words — it works out the rest
Inside · orchestrator + 10 specialists
Where it refuses to skip ahead
- No calculation on an incomplete set — a basis computed from partial records is confidently wrong.
- Transfers are not disposals — mislabelling them is the most common and most expensive error in the category.
- Method is not a free choice everywhere — several jurisdictions mandate one, and picking the favourable one anyway creates a problem.
- No number filed without professional review — this prepares the working. It does not file it and it does not sign it.