# lending.affordability
Two numbers an underwriter looks at for a new loan, repaid monthly:
- **Debt-to-income (DTI)**: existing monthly debt payments plus the new
loan's repayment, as a share of monthly income, in basis points
(3138 = 31.38%).
- **Stressed DTI**: the same with the new loan's repayment recalculated at a
higher stress rate, and whether that stays within the lender's ceiling.
It returns both repayments, both ratios, `affordable` (the stressed ratio is
within `maxDebtToIncomeBasisPoints`) and `headroom`: how much monthly
repayment room is left under the ceiling after the stressed repayment, which
is negative when the loan does not fit.
## Rounding, all against the borrower
An affordability test that passes on a rounding is not a test, so:
- both repayments come from lending.loan-payment rounded `up`;
- both ratios are rounded up to the next basis point, which makes
`affordable` exactly the comparison (commitments + repayment) / income
<= ceiling, with no rounding in it;
- the allowance (income × ceiling) behind `headroom` is rounded down, with
money.apply-rate.
## The stress rate is yours
The stress rate is an argument, not a rule in code, because there is no
single published one. In the UK, MCOB 11.6.18R requires a mortgage lender to
take account of likely future interest rate rises over at least the first
five years (not where the rate is fixed for five years or more), having
regard to market expectations. The Bank of England Financial Policy
Committee's specific test (the reversion rate plus 3 percentage points) was
withdrawn with effect from 1 August 2022. Sources: FCA, "Interest rate 'stress
test' rule – application of MCOB 11.6.18R",
https://www.fca.org.uk/firms/interest-rate-stress-test-rule ; Bank of
England, "Financial Policy Committee confirms withdrawal of mortgage market
affordability test" (June 2022),
https://www.bankofengland.co.uk/news/2022/june/financial-policy-committee-confirms-withdrawal-of-mortgage-market-affordability-test .
The ceiling is the lender's policy too.
## What it does not do
- Loan-to-income (the FPC's 4.5× income flow limit is about the loan size,
not the repayment): divide the loan by annual income.
- Expenditure, household size or the income the lender is willing to count:
pass the income after whatever haircut the policy applies.
- Interest-only or part-and-part loans: the repayment is always capital and
interest.
## Before you rely on this
**Not professional advice.** This capability calculates lending figures from published rules. It is a software component for developers, not financial advice. Rules change and every rate here has an effective date. Check that the dates cover your case. Verify results against the official sources listed above, and have a consumer-credit compliance specialist review how you use it, before anyone relies on the output. Provided "as is" under its licence, without warranty.
**Unreviewed.** This capability's implementations agree in every language and pass its published test vectors, which were worked out from the official sources cited. But no qualified consumer-credit compliance specialist has yet checked those vectors, or confirmed that the capability covers the cases it claims. Treat it as a draft. Do not use it for real people, money or decisions without your own expert review. Once a qualified reviewer signs off, this notice is replaced with their name, qualification and the date. Each new version needs fresh sign-off.
1.0.1 marks it unreviewed. The code and the tests are unchanged.