Saubhagya Pandey

← Door B · Markets & Risk

FIG. B.1 · Self project · credit-risk stack

Lending Lifecycle Platform

A credit decision has three audiences: the borrower, who deserves a reason; the portfolio, which absorbs the consequence; and the auditor, who arrives later. This platform is built for all three — a scorecard whose points are a lookup table you can read, a policy engine written in YAML you can diff, and a decision API whose every verdict is reproducible. The lab below underwrites a live application against the repository’s actual committed configuration.

UNDERWRITING DESK — LIVE SCORECARD + POLICYruns the repo's committed tables verbatim

points by feature — live lookup

ext_sources_mean(0.48587201519800205, 0.5008823820303746]+97
dti_ratio(0.1915125301215517, 0.23357137108167164]+91
credit_to_income(-inf, 1.4836966528292912]+98
age_years(32.80219028062971, 36.01095140314853]+103
amt_income_total(-inf, 64400.0]+110
def_30_cnt_social_circle> -inf+98
name_education_typeHigher education+82
name_income_typeWorking+98
score = Σ bin pointsbase 600 baked into binsΣ

underwriting decision

777

scorecard points

APPROVE

Tier 1 · Super Prime

max exposure$50,000policy cap$50,000income multiplier5.0×base APR7.99%

Runs the repository’s committed scorecard lookup table (81 bins — the 600 base points are distributed into each bin by the repo’s own builder) and policy_rules.yaml verbatim — tiers, knockout thresholds, and adverse-action codes are the shipped configuration, not a reproduction. Exposure = min(policy cap, income × multiplier cap).

FROM RAW APPLICATIONS TO POINTS

300k-plus Home Credit applications were cleaned and explored with SQL and pandas EDA, then engineered into monotonic Weight-of-Evidence features — monotonicity matters because a borrower should never lose points by getting less risky. The logistic-regression scorecard reaches KS 0.40 and Gini 0.52, and was benchmarked against gradient boosting and XGBoost on decile lift, where the scorecard’s interpretability earns its keep.

POLICY AS CODE, DECISIONS AS RECORDS

Score cutoffs, exposure caps, risk-based pricing and approve/refer/decline logic live in a YAML policy engine, with cutoffs validated on out-of-sample A/B-style holdouts. The FastAPI/Postgres decision service keeps an audit trail — every decision replayable — and a PSI job flags population drift before the model goes stale. Declines come with adverse-action codes, because a refusal without a reason is not a decision.

THEN STRESS THE WHOLE BOOK

A simulated 500k-loan book runs in DuckDB and dbt: vintages, roll rates, and PAR30/90 MIS packs, with PSI drift alerts surfaced in Power BI and Excel. The point is to see the scorecard’s choices compound over a portfolio, not just score well on a test split.

Next: FIG. B.2 · Market-Data Ops & Portfolio Analytics