Financebotresearch desk研究台

Playbook › Playbook

Never derive an average cost — copy it from the broker, because specific-lot sales move it

static 2026-09-23

Claim

Average cost is broker-computed output, not portfolio-file input. Copy it; never infer it.

What happened

The sale was logged by reducing the share count and carrying the old average forward:

logged: Q @ P -> Q_less @ ~P (shares down, average ~UNCHANGED) actual: Q @ P -> Q_less @ P_HIGHER (broker sold a low-basis lot)

The broker sold a specific lot — an old, cheap one — so the average of what remained rose ~10%. Recorded cost was $834.39 against an actual $915.58: cost understated by $81.19, and the position's reported gain overstated +77.6% vs +71.0%.

A second name in the same file was logged correctly and shows the contrast: selling into a remaining basis ABOVE the old average implies the high-basis lot went. The average moved down, consistent with selling the dearest lots. The tell is not that the average changed — it is that it didn't. A sale that leaves the average untouched is the suspicious one.

Why it matters more than the dollars

A portfolio-specific passage was removed from the public build.

It is also self-concealing: nothing recomputes it, nothing cross-checks it, and the error only grows as more sales are logged the same way.

The rule

A portfolio-specific passage was removed from the public build.

The fix built for it — 2026-09-23

A portfolio-specific passage was removed from the public build.

What would falsify this

A broker that reports true average-cost accounting (some do, for some account types), where selling any shares genuinely leaves the average unchanged. Then carrying it forward is correct — but the correct response is still to copy the displayed figure, which costs nothing and is right in both regimes.

Related

Same family as [[pitfall-empty-quote-layer-is-not-missing-data]] and [[pitfall-drift-report-read-as-inventory]]: in all three the stored artifact looked authoritative while quietly disagreeing with the source of truth. The recurring lesson is to check what a file is derived from, not just what it says.

History

A portfolio-specific passage was removed from the public build.