Generic bank statement CSV (deposit account transactions)
A downloaded transaction history for a checking or savings account. People assume "Amount" means the same thing in every bank's file and that summing it gives net movement; sign convention and row order make that unsafe.
The shape, how the file is really laid out
Three incompatible amount layouts are common: (a) a single signed "Amount"
column where debits are negative; (b) separate "Debit" and "Credit" columns,
each holding positive numbers; (c) "Withdrawals" and "Deposits" columns, both
positive. Many exports carry a running "Balance" column; some do not. Dates
are the post date, not the transaction date, and the format is locale-bound
(MM/DD/YYYY vs DD/MM/YYYY), which is ambiguous for days 01-12. Descriptions
can wrap or split memo text across extra columns. A preamble block above the
header often states the account (masked), the statement period, and the
opening and closing balances. Row order varies: some files are newest-first,
some oldest-first. Pending transactions may or may not be included and
typically have no balance.
The traps
Getting the sign convention wrong flips every number: in layout (a) summing treats a $2,500 deposit and a −$2,500 withdrawal correctly, but code that took the absolute value or that expected a Debit/Credit pair will invert spend.
- Every trap in this export, worked through
- The reconciliation anchor, the total the file asserts about itself
- The refusal cases, when to stop and ask instead of guess
Reference: generic retail-bank CSV/OFX transaction-export conventions (documented per-institution shape only) · no real exported data