Trial balance and period close
Your task
Design the accounting subsystem that produces a daily trial balance and supports month-end close for a fintech with ~30M ledger entries/day across a configurable chart of accounts. The trial balance (sum of all debits == sum of all credits, per account) must be queryable on demand, and once a period is closed its entries must be frozen, late transactions go to the next open period. Describe the model, how you compute the trial balance efficiently, and how you enforce period-close immutability.
It covers
- Chart of accounts
- Trial balance
- Period close