The Quiet Loop
Worked problem · accounting data05 of 09

The statement set that looks complete and is missing a month

A statement set held the expected number of files and was still missing a month: one was misnamed by a year, another duplicated a period already present.

Counting the files in a statement folder answers a question nobody asked. The question is whether the periods they contain run end to end without a gap.

The situation

A year of statements, gathered from a mix of downloads and forwarded attachments, arriving as one folder of consistently named files. The count was right. The names ran across the year in order. Reconciliation against the ledger nonetheless failed, and the difference matched no transaction.

The pattern

Two independent naming faults had cancelled each other out in the count.

One file was named for the wrong year. The month was correct, the year was not — the sort of error that happens once and is invisible afterwards, because the name is plausible and nothing re-reads it.

Another file was a second copy of a period already present, saved under the name of the month that was actually absent. Downloaded twice, renamed once, and from then on the folder contained two copies of one month and no copy of another while showing the expected number of files.

The common thread is that a file name is a claim made by whoever saved it, not a property of the document. Every statement prints its own period on its face. Reading that, rather than the name, turns the question from “do we have twelve files” into “do the periods these documents cover run continuously”, which is the thing that actually matters.

Two checks settle it, and they are worth doing separately because they fail differently.

Dates must join up. Each period should begin where the previous one ended. A subtlety here defeats a naive rule: for some account types the next period opens on the same day the last one closed, and for others it opens on the following day. Demanding exact equality flags every document in the set and buries the one real break in noise.

Balances must join up too. Each statement’s closing figure should carry forward to the next one’s opening figure. This is the stronger check, because it is arithmetic rather than metadata. Where dates alone leave room to argue that a file was merely misnamed, a break in the balance chain proves that a period of activity is genuinely unaccounted for.

One further trap: a set can be complete and still not cover the year. Where statement periods run to a fixed day of the month rather than to month end, a full set of them will begin after the year opened and finish before it closed. The correct output is not “complete” but “continuous, and covering these dates” — with the uncovered days stated.

Engineering takeaway — Read the period printed inside each document, and prove continuity in money as well as in dates. A file name is a claim, not evidence, and a set that is complete by count can still have a hole in it.

More on bank statement data extraction

Send us the problem

Send us the problemThe files, or a sample. We reply in writing within one working day.