Where the Nested IF Beats the Written Policy: Top-Up Auto-Sanction Rules
A housing finance company auto-sanctions top-up loans up to ₹15 lakh through a rule engine. The credit policy states four rules:
- R1 - Auto-approve if bureau score ≥ 750 and FOIR ≤ 50%.
- R2 - Reject if bureau score < 650.
- R3 - Refer to the credit committee if LTV > 80%.
- R4 - Reject if any existing loan shows arrears of more than 30 days in the last 6 months.
The policy also says: reject takes precedence over refer, and refer over approve.
Three applications are pending:
- Application 1: score 780, FOIR 44%, LTV 84%, no arrears.
- Application 2: score 790, FOIR 41%, LTV 68%, arrears 45 days on a two-wheeler loan.
- Application 3: score 640, FOIR 38%, LTV 72%, no arrears.
The IT team encoded the engine in Excel with score in column B, FOIR in C, LTV in D and arrears days in E: =IF(AND(B2>=750,C2<=0.5),"Approve",IF(B2<650,"Reject",IF(D2>0.8,"Refer","Manual Review"))).
1. Decide each of the three applications under the written policy and explain how the precedence clause changes the answer.
Read the worked answer
Application 1. R1 is satisfied (780 ≥ 750, FOIR 44% ≤ 50%) but R3 is also triggered (LTV 84% > 80%). Two rules point in opposite directions; the precedence clause resolves it - refer overrides approve. Outcome: Refer.
Application 2. R1 is satisfied (790, 41%) but R4 is triggered by the 45-day arrears. Reject overrides approve. Outcome: Reject.
Outcome 3. Score 640 < 650, so R2 fires and nothing overrides it. Outcome: Reject.
Why this is not a recall question. The written policy is a decision table with an explicit precedence order (reject → refer → approve). Application 1 is the trap: on score and FOIR alone it looks auto-approvable, but a single adverse ratio must override two favourable ones. The correct method is to test every rule independently, then apply the precedence order - never to stop at the first favourable match, which is exactly what the code does.
2. Explain why the Excel formula returns the wrong answer for Applications 1 and 2, and rewrite it so that it implements the policy.
Read the worked answer
Why it fails. A nested IF returns the first TRUE branch and stops. The approve test (R1) sits in the outermost position, so once score and FOIR pass, no later test runs: Application 1 returns Approve although LTV is 84%, and the R3 test is never reached. Separately, column E does not appear anywhere in the formula, so R4 is simply absent - Application 2 returns Approve despite 45 days of arrears.
Corrected formula, with reject tests first, then refer, then approve:
=IF(OR(B2<650,E2>30),"Reject",IF(D2>0.8,"Refer",IF(AND(B2>=750,C2<=0.5),"Approve","Manual Review")))
This returns Refer for Application 1, Reject for Application 2 and Reject for Application 3.
Control lesson. The nesting order is a credit decision, not an IT preference: credit and compliance own the decision table and sign off the order; IT only encodes it. Add a combination test covering the 16 score/FoIR/LTV/arrears permutations with expected outcomes, and rerun it at every rule change. Also handle blanks explicitly - an empty E2 evaluates as zero and silently passes the arrears test, which is how an ineligible file gets approved without anyone noticing.
3. The engine has been live for one quarter and auto-approved 1,400 top-ups. What should management do now?
Read the worked answer
Immediate containment. Switch off auto-approval for any file with LTV > 80% or arrears > 30 days, and decide the three pending applications manually under the written policy. Fix and re-test the formula before the engine is released again.
Look-back. The error has been live for a full quarter. Extract every auto-approved file since go-live, apply the corrected decision table, and list the exceptions - files the engine approved but the policy would have referred or rejected. Re-decide each pending case before disbursement; for cases already disbursed, put them on a watchlist, reassess LTV and arrears, and consider additional margin.
Escalation. Report to the audit committee and the risk committee in numbers: cases affected, exposure, whether any disbursement was made on a file that should have been rejected, and the remedial timeline. Staff accountability applies only where a person overrode a warning; the primary failure here is change control, not a credit officer's judgement.
Root cause and fix. A business rule was changed without decision-table sign-off, version control or regression testing. Remedy: joint credit–compliance–IT ownership of the rule set, dated rule versions, a formal change-approval note, and a monthly reconciliation of a sample of auto-approvals against the written policy. This is the kind of finding that regulators treat as a governance failure rather than a spreadsheet accident.