#Lending
Lending platform engineering requires double-entry accounting, regulatory compliance, and fraud prevention. Posts cover PostgreSQL schema design for lending operations, KYC and AML integration, RBAC for financial data, and the architectural patterns specific to digital lending services.
14 posts tagged with lending. ← All posts
Why a scorecard trained only on funded loans quietly overstates its own accuracy, and the inference techniques that pull the declined population back into view.
Why credit models trained only on approved-and-funded loans are biased, and the reject-inference techniques (reclassification, parceling, augmentation) that correct for the applicants you never observed.
How lenders turn application and bureau data into a single, defensible number — and why the interpretable scorecard still wins in regulated lending.
The end-to-end credit-scoring pipeline: target definition (bad = 90+ dpd), feature engineering, WOE transformation, a logistic-regression scorecard, points scaling (PDO), and validation (KS, Gini, AUC).
Modeling borrower hardship as an explicit state machine, so relief, delinquency, and accounting never disagree.
Modeling hardship: payment holidays, term extensions, re-aging, and how restructuring interacts with delinquency and accounting.
How a single loan payment is split across fees, interest, and principal — and why the engine that does it has to be deterministic, auditable, and safe to run twice.
How a loan payment is split across fees, penalties, accrued interest, and principal, with configurable waterfalls and partial-payment rules.
Modeling post-delinquency treatment paths — reminders, restructuring, settlement offers, and the charge-off handoff — as a state machine you can reason about.
Model post-delinquency treatment paths: reminders, restructuring, settlement offers, and charge-off/agency handoff.
Checkout-time soft credit checks, upfront merchant settlement, and the installment collection loop that carries the real risk.
Engineer a 4-installment BNPL flow: checkout-time soft credit check, upfront merchant settlement, and installment collection.
Design a loan origination pipeline from application through underwriting, offer, and disbursal.
Design a loan origination pipeline from application through underwriting, offer, and disbursal.
Track collateral valuation, loan-to-value, margin calls, and liquidation triggers as one auditable state machine.
Track collateral valuation, loan-to-value, margin calls, and liquidation triggers.
Model days-past-due transitions, SMA/NPA classification, provisioning triggers, and cure logic as one deterministic engine driven by time and repayment events.
Teaches how to model delinquency as a state machine: days-past-due bucket transitions, SMA/NPA classification rules, provisioning triggers, and cure/roll-forward/roll-back logic driven by repayment events.
How to assemble features from bureau, bank, and alt data, serve a scorecard or model, apply policy cutoffs, and emit adverse-action reason codes with a full audit trail.
Teaches how to build a decisioning engine: feature assembly from bureau/bank/alt data, scorecard vs ML model serving, policy rules and cutoffs, and adverse-action reason-code generation with an audit trail.
Computing loan amortization you can reproduce to the cent — annuity math, day-count conventions, the per-installment principal/interest split, and prepayment recomputation.
Teaches how to compute loan amortization deterministically: EMI/annuity vs reducing-balance formulas, day-count conventions, principal/interest split per installment, and prepayment/rescheduling recalculation.
How to compute interest that earns every day, tracks the accrued-but-unbilled balance, survives mid-period rate changes, and posts to the ledger with idempotent replay-safe jobs.
Teaches how to build a daily interest accrual engine: accrual basis and compounding, accrued-but-unbilled tracking, rate changes mid-period, and idempotent daily accrual jobs that post to the ledger.
5K+ loans per month. Three credit bureaus. Multiple payment gateways. The thing that has to be right is the ledger. Notes on what invariants the database enforces vs what the application enforces.
Borrower onboarding is the most fraud-prone moment in a P2P platform. The shape that worked: deterministic KYC, parallel bureau pulls with fallback, real-time fraud signals, and a maker-checker approval for every disbursement.
All posts on this site are written by Pratik Dhanave, an Agentic AI Architect with 7+ years building production distributed systems, multi-agent AI platforms, and cloud-native infrastructure. About the author → Each article includes working code, architecture diagrams, and references to the specific frameworks and standards discussed. Browse all posts or explore related topics using the tag cloud above.