Compare HMDA Mortgage Rates Without Letting Loan Mix Pick the Winner
A fictional two-lender example shows how loan mix reverses overall averages. Recalculate with shared weights and plan a transparent comparison.
A lender can have a lower average rate within every group you compare and still have a higher average across all its loans. The missing ingredient is the mix of loans in each average.
This guide uses invented lenders and numbers to show the arithmetic, then gives you a plan for a reproducible HMDA comparison. No real lender records were downloaded or analyzed. None of the example rates is a mortgage offer.
Start with four fictional groups of loans
L and H are abstract labels in this classroom exercise, not HMDA codes, actual products or measured risk categories. Every loan within a cell has the stated invented rate.
| Invented group | Lender A: loans | Lender A: rate | Lender B: loans | Lender B: rate |
|---|---|---|---|---|
| L | 90 | 6.0% | 10 | 5.8% |
| H | 10 | 8.0% | 90 | 7.8% |
Within L, B is 0.2 percentage point lower than A. Within H, B is also 0.2 percentage point lower. Now calculate the overall arithmetic mean, giving each loan equal weight:
- A: (90 × 6 + 10 × 8) ÷ 100 = 6.2%.
- B: (10 × 5.8 + 90 × 7.8) ÷ 100 = 7.6%.
B’s overall mean is 1.4 percentage points higher. Nothing in the arithmetic contradicts the group comparisons: 90% of A’s loans are in L, while 90% of B’s are in H. The two overall means describe different compositions.
These are loan-count-weighted arithmetic means. They are not medians, dollar-weighted means, APRs or approval rates. The example establishes no reason why real borrowers receive different rates.
Give both lenders the same hypothetical mix
Try a second question: what would each summary be if L and H each received half the weight? This changes the calculation’s target, not the loans in the first table.
- A: 0.5 × 6 + 0.5 × 8 = 7.0%.
- B: 0.5 × 5.8 + 0.5 × 7.8 = 6.8%.
| Summary | A | B | B minus A |
|---|---|---|---|
| Original mix; 100 invented loans each | 6.2% | 7.6% | +1.4 percentage points |
| Hypothetical 50% L / 50% H mix | 7.0% | 6.8% | −0.2 percentage point |
The common-weight results are hypothetical standardized summaries, not either lender’s original overall mean. In this invented example, B stays 0.2 point below A under any identical L/H weights because its difference is identical in both groups. That property does not establish a real-world lender ranking.
Missing-group test: suppose B has no observations in H. You cannot compute its 50/50 summary without supplying an unsupported H rate. Mark that target unavailable, or explicitly choose a different target using only the shared group. Do not fill an absent group with zero.
Know what the HMDA fields can tell you
HMDA, the Home Mortgage Disclosure Act, provides information reported by many financial institutions, with modifications to protect privacy. It does not represent every lender or mortgage. See the CFPB’s HMDA overview.
For 2025 reporting, action code 1 identifies an origination; code 6 identifies a purchased loan. A reported rate of 4.125 means 4.125%. A genuine zero, NA (not applicable) and Exempt (reporting exemption) have different meanings. These conventions are field-specific. Check the 2025 Filing Instructions Guide before interpreting a file.
The public HMDA field reference treats interest rate and rate spread as separate measures. Rate spread compares APR with an applicable average prime offer rate; it is not the interest rate itself. Loan term is recorded in months, and some borrower measures appear in bands rather than exact values.
Regulation C’s reporting instructions address adjustable-rate loans too. A reported interest rate should not automatically be read as a fixed rate for the entire loan.
Write the comparison plan before calculating
The following is a proposed analysis design, not an executed extraction or a regulator-endorsed method.
- Freeze the input. Record the activity year, dataset product, official URL, retrieval time, revision label, public schema, file checksum and code version. Another analyst should be able to identify the same input.
- Define the population. Choose a geography, purpose, loan type, lien position and occupancy. Set rules for construction, unit count, open-end lines, reverse mortgages, business-purpose lending and loan term. Verify those fields against the public schema for the selected year. Keep lender identifiers explicit; do not combine institutions just because their brand names look related.
- Fix the grouping and weights. Write down boundaries before looking for a preferred result. Choose one common reference distribution and explain whom it is intended to describe. Show the original composition alongside the shared-weight result.
- Publish the denominator. Show retained loan counts, group counts and rate availability for each lender. Use the same retained records in the counts and means. Prevent repeated file ingestion, but do not delete records merely because their public fields look identical.
- Test stability. Try defensible alternative groupings and report meaningful changes. Do not hide an unavailable positive-weight group or quietly substitute a different target.
Keep an exclusion log that adds up
Apply the scope tests in a fixed order: activity year; origination status; purpose; loan type; lien position; occupancy; remaining product and geography rules; rate availability; shared-group support.
For each lender and each step, record the starting count, the count removed and the count retained. Assign each removed row its first failed test so the flow reconciles. Keep overlapping quality flags separately; adding those flags together can double-count exclusions.
Record NA, Exempt, blank and unparseable rate entries separately. Do not replace them with zero. Preserve a valid numeric zero; investigate unusual values rather than silently changing them.
Keep original values and add separate eligibility and reason columns. The final retained count must equal the denominator used for that mean. This fictional exercise has no unavailable rates by construction; it supplies no real-world exclusion counts.
A common mix is still not a causal price comparison
The CFPB’s 2018 disclosure guidance excludes credit scores and application/action dates from public loan-level data and limits precision in some other fields.
Matching the fields you can observe does not make borrowers, underwriting, timing or pricing concessions identical. Neither the raw mean nor the standardized summary proves discrimination, predicts an individual approval or identifies the best lender for a particular borrower.
For an actual borrowing decision, compare your own offers and their costs using the Loan Estimate comparison worksheet. The useful research habit here is narrower: inspect group counts, distinguish original from common-weight means, and make exclusions reproducible before trusting an overall-rate headline.


