Cost-Basis Lot Accounting

Lot creation on buys, deterministic lot selection on sells, realized gain, and wash-sale adjustment

Cost-Basis Lot Accounting Lot creation on buys, deterministic lot selection on sells, realized gain, and wash-sale adjustment 01 / Trade Events 02 / Lot Ledger 03 / Tax Engine EX / Wash-Sale Adj. Acquire Dispose + match Realize + report Immutable lot store If loss + repurchase Buy Trade · qty + price + fees · Trade Events › Acquire Buy Trade qty + price + fees Open Lot · basis + acq date · Lot Ledger › Immutable lot store › Acquire · immutable Open Lot basis + acq date immutable Sell Trade · qty to close · Trade Events › Dispose + match Sell Trade qty to close Select Lots · FIFO / LIFO / HIFO · Lot Ledger › Immutable lot store › Dispose + match · deterministic Select Lots FIFO / LIFO / HIFO deterministic Realized G/L · proceeds - basis · Tax Engine › Realize + report Realized G/L proceeds - basis Tax Report · Form 8949 lines · Tax Engine › Realize + report Tax Report Form 8949 lines Wash-Sale · disallow loss · Wash-Sale Adj. › If loss + repurchase › Realize + report · 30-day Wash-Sale disallow loss 30-day loss + rebuy deferred loss Legend User UI Agent logic Policy Tool action Context / trace

One Lot Ledger

  • • Each buy opens an immutable lot with its own basis and acquisition date
  • • Corporate actions restate basis and quantity, never delete history
  • • Unrealized gain is a read over open lots at the current mark

Deterministic Disposal

  • • The disposal method fixes which lots a sell consumes
  • • FIFO, LIFO, HIFO, and specific-ID must be replayable to the same result
  • • Realized gain is proceeds minus matched basis, per lot

Wash-Sale Contract

  • • A loss with a repurchase inside the 30-day window is disallowed
  • • The disallowed loss is deferred into replacement-lot basis
  • • The report shows adjusted gains, not the raw arithmetic