Module assertions

Module assertions 

Source
Expand description

Custom assertion macros for testing accounting invariants.

Functions§

calculate_imbalance
Calculate the imbalance of a journal entry.
check_accounting_equation
Check that the accounting equation holds: Assets = Liabilities + Equity
check_benford_distribution
Check if amounts follow Benford’s Law distribution. Returns the chi-squared statistic and whether it passes the test at p < 0.05.
check_trial_balance
Verify trial balance is balanced (total debits = total credits).
is_balanced
Check if a journal entry is balanced.