audit_mortgage_statement
Forensic audit of a mortgage statement: replays the loan day by day and grid-searches the bank's interest convention (Actual/365, Actual/360 or Actual/Actual day count; monthly, semi-annual or annual capitalisation; exact or 2-decimal daily rounding), ranks candidates by RMS error against the bank's own running balance, and reports the interest overcharge implied by the best fit. Use to audit an actual mortgage statement. Require statement rows, at least one usable interest rate and balance checkpoints sufficient to fit the calculation. Reuse only extracted facts; inferred day-count and capitalization conventions are estimates, not confirmed bank terms.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rows | Yes | Parsed statement rows in chronological order. At least one row must carry ratePct. | |
| topN | No | How many ranked candidate conventions to return (default 3). | |
| rules | No | Skip the grid search and test one explicit convention. | |
| includeRowDetail | No | Include the per-row expected balance / delta / flag detail (can be large). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| series | No | ||
| rmsDelta | Yes | ||
| fitStatus | Yes | ||
| periodEnd | Yes | ||
| rowDetail | No | ||
| finalDelta | Yes | ||
| assumptions | Yes | ||
| flaggedRows | Yes | ||
| periodStart | Yes | ||
| bankInterest | Yes | ||
| bestFitLabel | Yes | ||
| bestFitRules | Yes | ||
| observations | Yes | ||
| rowsAnalyzed | Yes | ||
| netOvercharge | Yes | ||
| expectedInterest | Yes | ||
| rankedCandidates | Yes | ||
| netOverchargeRange | Yes | ||
| equivalentCandidates | Yes | ||
| expectedInterestRange | Yes | ||
| equivalentCandidateCount | Yes |