Acquisition financials archive
I turned a newly acquired property's box of PDF financials into a database I can actually ask questions.
When we acquired a property, its history arrived as due-diligence documents. Years of P&L and balance-sheet PDFs, tax-return scans, revenue spreadsheets, monthly tax returns. That is the seller's whole financial story, and it is useless as a pile of files. I wanted to query it.
How it works
I built a SQLite archive with an ingest script that rebuilds the database idempotently from clean spreadsheets plus OCR'd scans. Tables cover P&L, balance sheet, monthly and annual revenue, tax returns, and occupancy. A CLI query tool answers by year and line item. One build step emits a consolidated multi-tab workbook, another renders a self-contained Chart.js dashboard: revenue trend, net income, a cost-swing bridge, occupancy and ADR.
- Two ownership eras sit in the same files, so everything is tagged by source and disambiguated by date.
- Annual totals mixed bases year to year, so they are cross-validated. Balances actually balance, and revenue ties to the tax returns to the cent.
- Subtotals that were uncached formula cells get recomputed at ingest by resolving the formulas.
It is live and queryable, and re-ingesting new documents is safe and idempotent, so the archive grows without rework.
Due-diligence data usually dies in a folder after close. Turning it into something an agent can query keeps the acquisition's history a live input to decisions, instead of a box I have to re-open by hand. Context is the company, even the context you inherit.