<aside> 💡
Purpose: This document provides a comprehensive explanation of how CANDID calculates Annual Percentage Rate (APR) for mortgage loan scenarios displayed to consumers. It covers all inputs, assumptions, data sources, and methodologies used in the calculation engine.
⚠️ Regulatory Context: APR calculations are governed by the Truth in Lending Act (TILA), Regulation Z (12 CFR Part 1026), and the Homeowners Protection Act (HPA). All methodology described herein is designed to comply with these requirements.
</aside>
CANDID's APR calculation uses a three-layer stack:
ZMathBuffer input structure, and calls the calculation engineThe engine returns tapr2 — the exact APR per Appendix J of Regulation Z.
The Amount Financed (amount_financed2) is calculated by the ZMathEngine as:
Amount Financed = Gross Loan Amount − Total Prepaid Finance Charges
| Input Field | Source | Description |
|---|---|---|
baseAmount |
CANDIDUI | Purchase price minus down payment. Does not include financed MIP unless explicitly added |
totalCostsAddedToLoan |
CANDID | Any closing costs rolled into the loan amount. |
totalPrepaidFinanceCharges |
CANDID | Dollar amount of APR-affecting fees paid at closing |
prepaidInterestAddedToLoan |
CANDID | Currently always false |
mip |
CANDID | Upfront mortgage insurance premium dollar amount. Passed to pmi1 in the engine |
Included in Amount Financed calculation:
baseAmount + totalCostsAddedToLoan)Excluded from Amount Financed: