← All work

Heavy Equipment Credit Risk & Commercial Scorecard Engine

A production-grade credit underwriting and Basel II risk scoring engine evaluating 150,000 corporate debtors with 5C financial ratio appraisal, macro commodity stress testing, and secondary asset liquidation economics.

Python & Scikit-LearnPostgreSQL / SQLBasel II Scorecard EngineIFRS 9 Expected LossReact 19 & Next.js 15TypeScript & Vitest

Problem

Commercial heavy equipment financiers face severe NPL shocks during commodity downturns due to manual credit committee bottlenecks, blind spot debt ratios on stated income, and lack of real-time asset depreciation tracking.

Data

The working records and data signals are described in the local project narrative below.

Approach

Engineered an end-to-end 5C underwriting and machine learning scorecard pipeline combining anomaly-hardened Gradient Boosting (AUC 0.8688) with Basel II point scaling, IFRS 9 Expected Loss calculation, and ESDM HBA commodity price shock sensitivity overlays.

System

CREDIT RISK ANALYST STUDIO// BASEL II 5C ENGINE
AUC: 0.8688KS: 56.13%GINI: 0.7229PDO: 20
PRESET APPLICANTS:
// APPLICATION & 5C PARAMETERS
4 Unit
20%
36 Bulan
10.75%
Character (Biro Kredit / SLIK OJK)
Tunggakan 30-59 Hari (DPD):
Condition: ESDM HBA Commodity Shock0% Drop
// UNDERWRITING SCORECARD VERDICT
BASEL II CREDIT SCORE (SCALE 300 - 850)
705
TIER: AAAPPROVE (STANDARD)

Calibrated via Logistic & HistGradientBoosting with PDO=20, Base=600 at 50:1. Stressed PD: 0.05% | LGD: 25%

CAPACITY (DSCR)PASS (>=1.15x)
1.18x
CAPITAL (DER)PASS (<=2.0x)
1.59x
COLLATERAL (DAY 0 CCR)PASS (>=120%)
125%
EXPECTED LOSS (EL)0.013% EAD
IDR 600,000
TOTAL OTR: IDR 6.00BDP: IDR 1.20B (20%)EAD: IDR 4.80B
NOTE

Executive Summary & Quantified Impact: Commercial equipment financing requires continuous balancing of cash flow adequacy, balance sheet leverage, and physical asset collateral coverage. By applying this automated 5C underwriting and Basel II risk engine to the 150,000 debtor cohort of GiveMeSomeCredit, this system delivers an AUC of 0.8688, a Kolmogorov-Smirnov separation of 56.13%, and isolates an unmonitored bureau anomaly cohort exhibiting an 8.3x default multiplier (54.65% vs 6.60%). Credit decisioning cycle time is reduced from 5 business days to under 15 minutes with full regulatory transparency.


01. Problem Architecture & Commercial Underwriting Bottlenecks

Financing high-value capital assets—such as 20-ton hydraulic excavators, off-highway dump trucks, and track-type bulldozers—presents fundamentally distinct credit risk characteristics compared to retail consumer lending. Single contract exposures routinely range between $80,000 and $500,000 USD (equivalent to IDR 1.2B to 7.5B), creating high loss concentration per default event:

CODE
19 LINES
[Contractor Application]
         │
         ▼
[Credit Bureau Ingestion] ────► [Delinquency Anomaly Guard (96/98 Isolation)]
         │
         ▼
[Financial 5C Evaluation] ────► [DSCR >= 1.15x] & [DER <= 2.00x] & [CCR >= 120%]
         │
         ▼
[Machine Learning Engine] ────► [HistGradientBoosting (AUC 0.8688) & Logistic (AUC 0.8615)]
         │
         ▼
[Basel II Scorecard Scale] ───► [Points = Offset + Factor * ln(Odds)] ──► Range [300 - 850]
         │
         ▼
[Macroeconomic Overlay]   ────► [ESDM HBA Coal Price Shock Multiplier]
         │
         ▼
[IFRS 9 Expected Loss]    ────► EL = PD * LGD * EAD ──► [Credit Committee Memo (NAK)]

In volatile emerging-market resource economies, financiers face three systemic failure modes:

  1. Commodity Price Vulnerability: Contractor operating margins contract sharply when thermal coal prices (ESDM HBA) or palm oil benchmark prices dip, depressing Debt Service Coverage Ratios (DSCR) below the 1.0x break-even point.
  2. Hidden Leverage in Stated Income: Retail credit bureaus frequently report raw monthly debt obligations as debt ratios when income is omitted, introducing massive distortion if left unnormalized.
  3. Depreciation vs Amortization Mismatch: Heavy machinery experiences steep initial operational wear (~15% annual market depreciation). Without front-loaded down payments (≥ 20%) and linear principal amortization, asset recovery values plunge below outstanding debt balances during foreclosure.

02. Dataset Integrity & Anomaly Guard (GiveMeSomeCredit 150k Cohort)

The underwriting pipeline operates on the complete 150,000 borrower records from GiveMeSomeCredit, evaluating binary default risk (SeriousDlqin2yrs = 90+ days past due or charge-off within 24 months). Exploratory audits revealed two severe data anomalies requiring robust feature guards:

The 96/98 Delinquency Error Code Cohort

A subset of 269 borrowers exhibited extreme delinquency counts of 96 or 98 across all past-due columns (NumberOfTime30-59DaysPastDueNotWorse, NumberOfTime60-89DaysPastDueNotWorse, NumberOfTimes90DaysLate). Rather than legitimate incident counts, these represent credit bureau processing exception codes.

Debitur SegmentSample Size (N)Mean Default RateRisk MultiplierUnderwriting Treatment
Standard Borrowers149,7316.60%1.00xStandard Scorecard Rating
Anomaly Code (96/98)26954.65%8.28xHigh-Risk Flag / Manual Audit
Entire Population150,0006.68%1.01xBaseline Benchmark

Because the default rate for this anomaly group is 54.65% (more than 8 times the population baseline), dropping these rows would erase critical credit risk signal. The pipeline creates a dedicated binary feature is_delinquency_error_code = 1 while capping the numeric counters at the 99th percentile (5).

!Credit Bureau 96/98 Anomaly Default Multiplier

CODE
5 LINES
Revolving Utilization Distribution:
[ 0.00 - 0.30 ]  ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ (2.22% Default Rate)
[ 0.30 - 0.70 ]  ■■■■■■■ (7.40% Default Rate)
[ 0.70 - 1.00 ]  ■■■■■■■■■■■■■■■■■ (17.72% Default Rate)
[    > 1.00   ]  ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ (37.25% Default Rate)

03. The 5C Credit Appraisal Mathematical Framework

Institutional commercial underwriting synthesizes qualitative business governance with rigorous quantitative ratio analysis across the Five Cs of Credit:

A. Character (Biro Kredit & Integritas Rekam Jejak)

Measures willingness to pay via past delinquency severity. A composite delinquency penalty index isolates repeated short-term arrears from chronic non-performance:

Mathematical Model • Econometric FormulationSPECIFICATION
Penalty Index = (1.0 × DPD_30-59) + (2.5 × DPD_60-89) + (5.0 × DPD_90+) + (15.0 × ErrorCode_96/98)

B. Capacity (Kapasitas Pembayaran Arus Kas)

Evaluates whether project revenues sufficiently service debt amortizations. The primary hurdle is the Debt Service Coverage Ratio (DSCR):

Mathematical Model • Econometric FormulationSPECIFICATION
DSCR = (Net Operating Cash Flow / Total Monthly Debt Service) = (Monthly Revenue - Operating Expenses / Existing Debt + New Lease Installment)

*Target Standard*: DSCR ≥ 1.15 × under baseline operations; DSCR ≥ 1.00 × under stress testing.

C. Capital (Struktur Permodalan & Leverage)

Measures balance sheet solvency and owner equity skin-in-the-game via the Debt to Equity Ratio (DER):

Mathematical Model • Econometric FormulationSPECIFICATION
DER = (Total Liabilities / Tangible Net Worth) = (Short-Term Debt + Long-Term Debt / Total Assets - Total Liabilities)

*Target Standard*: DER ≤ 2.00 × for mining and agro contractors; hard stop at 2.50 ×.

D. Collateral (Agresi Depresiasi & Perlindungan Agunan)

Guarantees secondary asset recovery. Collateral Coverage Ratio (CCR) is calibrated at origination (Month = 0) and monitored over the 36-month amortization window:

Mathematical Model • Econometric FormulationSPECIFICATION
CCRₜ = (Appraised Equipment Market Valueₜ / Outstanding Loan Principalₜ)

Assuming a standard 15% annual declining balance equipment depreciation rate:

Mathematical Model • Econometric FormulationSPECIFICATION
Market Valueₜ = Invoice₀ × (1 - 0.15)^(t / 12)
Amortization TimelineAppraised Unit ValueRemaining PrincipalCollateral Coverage (CCR)Secondary Liquidity State
Day 0 (Origination)$100,000$80,000125.0%20% Down Payment Equity Buffer
Month 6 (0.5 Years)$92,195$66,667138.3%Substantial Equity Expansion
Month 12 (1.0 Year)$85,000$53,333159.4%Robust Foreclosure Security
Month 24 (2.0 Years)$72,250$26,667270.9%Minimal Lender Exposure
Month 36 (Maturity)$61,412$0Fully AmortizedOption to Purchase / Title Transfer

E. Condition (Kondisi Makroekonomi & Siklus Komoditas)

Stresses debtor cash flows against volatility in the Harga Batubara Acuan (ESDM HBA) and Crude Palm Oil (CPO) benchmark indices.


04. Machine Learning Tournament & Basel II Scorecard Calibration

Two distinct model families were trained on an 80:20 stratified split (120,000 train records, 30,000 test records) to predict 24-month delinquency:

Model ArchitectureTest ROC-AUCKolmogorov-Smirnov (KS)Gini Coefficient (2 × AUC - 1)Regulatory Explainability
Logistic Regression (Standardized)0.861556.13%0.7229High (Linear Weight Table)
HistGradientBoosting Classifier0.868858.53%0.7377Moderate (Tree Ensembles)
Baseline Random Chance0.50000.00%0.0000Zero Discriminatory Value

!ROC Curves of Credit Scoring Models

!Feature Importance Weights

!Scorecard Probability Distribution

CODE
8 LINES
Standardized Logistic Regression Feature Coefficients:
utilization_winsorized          [ +0.7112 ] ■■■■■■■■■■■■■■■■ (Risk Escalator)
NumberOfTimes90DaysLate_capped  [ +0.4579 ] ■■■■■■■■■■ (Severe Delinquency)
NumberOfTime60-89DPD_capped     [ +0.4265 ] ■■■■■■■■■ (Mid-Term Delinquency)
NumberOfTime30-59DPD_capped     [ +0.4081 ] ■■■■■■■■■ (Early Delinquency)
delinquency_penalty_index       [ +0.3324 ] ■■■■■■■ (Composite Score)
age_cleaned                     [ -0.2746 ] ■■■■■■ (Risk Reducer)
DSCR_proxy                      [ -0.1102 ] ■■■ (Cash Flow Buffer)

Basel II Scorecard Point Scaling Engine

To bridge machine learning probabilities with credit committee workflows, raw default probabilities PD are mapped to a traditional 300 to 850 credit scorecard scale:

Mathematical Model • Econometric FormulationSPECIFICATION
Score = Offset + Factor × ln(Odds)

where Odds = (1 - PD / PD). Enforcing a Base Score of 600 at 50:1 Odds with Points to Double Odds (PDO) = 20:

Mathematical Model • Econometric FormulationSPECIFICATION
Factor = (20 / ln(2)) ≈ 28.853901
Mathematical Model • Econometric FormulationSPECIFICATION
Offset = 600 - 28.853901 × ln(50.0) ≈ 487.1229
Credit Score RangeRating TierUnderwriting RecommendationMax Allowable LTVMin Down PaymentAction Directive
750 - 850AAAAuto-Approve85%15%Fast-track disbursement; prime rate
680 - 749AAApprove (Standard)80%20%Standard commercial credit terms
620 - 679AConditional Approval75%25%Corporate personal guarantee required
550 - 619BBBHigh Risk (Watchlist)65%35%Escrow account cash sweep covenant
300 - 549REJECTDecline0%--Application declined; excessive NPL risk

05. Macroeconomic Commodity Overlay & Sector Sensitivity Stress Test

Debtor performance in natural resource equipment financing is heavily coupled to commodity cycles. The engine incorporates an empirical macroeconomic sensitivity overlay using historical ESDM Harga Batubara Acuan (HBA) pricing data from 2021 through 2024:

Commodity Shock ScenarioMining Contractor PDMining Score DeltaPalm Oil (Agro) PDAgro Score DeltaCivil Construction PD
Baseline (Current HBA)1.82%738 (AA)2.10%726 (AA)2.45%
Mild Shock (-10% Price)2.65%712 (AA)2.80%705 (AA)3.10%
Moderate Shock (-20% Price)3.85%674 (A)3.65%682 (AA)3.90%
Severe Downturn (-30% Price)5.95%632 (A)4.80%651 (A)4.95%
CODE
4 LINES
Historical ESDM HBA Coal Price vs Heavy Equipment NPL Correlation:
2022-Q2 (HBA $310.8/MT) ──► Mining Equipment NPL: 1.2% (Historical Low)
2023-Q2 (HBA $190.2/MT) ──► Mining Equipment NPL: 2.4% (Normalizing)
2024-Q4 (HBA $115.0/MT) ──► Mining Equipment NPL: 5.4% (Stress Incurred)

!ESDM HBA Coal Benchmark vs Heavy Equipment NPL

!Macroeconomic Stress Testing by Sector

Because mining contractors bear high fixed operating expenses (diesel fuel, equipment maintenance, haul road maintenance), a -20% drop in coal prices triggers an average -13% contraction in net operating cash flows, reducing debt service coverage and escalating default risk by 1.75 ×.


06. IFRS 9 Expected Loss & Secondary Asset Liquidation Economics

Under the IFRS 9 / PSAK 71 accounting framework, credit provisions are calculated via the tripartite Expected Loss (EL) model:

Mathematical Model • Econometric FormulationSPECIFICATION
Expected Loss (EL) = PD × LGD × EAD

Where:

  • PD (Probability of Default): 12-month or lifetime probability derived from the calibrated Basel scorecard.
  • LGD (Loss Given Default): Unrecovered exposure post-collateral liquidation, factoring in secondary market liquidity haircuts:
  • Excavator 20-Ton: 25.0% LGD (High secondary market liquidity; active inter-island resale demand).
  • Heavy Dump Truck: 35.0% LGD (Accelerated chassis fatigue and tire depreciation).
  • Bulldozer D85 Track: 35.0% LGD (Undercarriage wear and higher overhaul logistics cost).
  • Wheel Loader 3.0 m³: 30.0% LGD (Standard agricultural and batching plant utility).
  • EAD (Exposure at Default): Outstanding principal plus accrued interest at default.

For a prime four-unit excavator facility ($320,000 USD / IDR 4.8B exposure) with PD = 1.82% and LGD = 25.0%:

Mathematical Model • Econometric FormulationSPECIFICATION
Expected Loss = 0.0182 × 0.250 × IDR 4.800.000.000 = IDR 21.840.000 (0.455% of EAD)

07. Production Implementation & Credit Committee Workflow Integration

The engine is engineered as a zero-dependency, type-safe TypeScript underwriting library (`lib/credit-risk.ts`) integrated into an interactive web cockpit (`components/CreditAnalystStudio.tsx`) and validated by automated regression tests (`lib/credit-risk.test.ts`).

The automated workflow transforms credit origination:

  1. Instant Ratio Screening: As underwriting analysts input balance sheet figures, DSCR, DER, and CCR Day 0 compliance flags update in real time.
  2. Dynamic Risk-Based Pricing: Rather than flat interest margins, interest rates scale automatically with debtor scorecard rating tiers (10.75% for AAA up to 14.50% for BBB).
  3. Automated Credit Memorandum Generation: Generates compliant Nota Analisis Kredit (NAK) summaries ready for instant review and export by Credit Committee executives.

Visual evidence & interactive artifacts

Production Visuals & System Artifacts.

Interactive inspection gallery for heavy-equipment-credit-risk-analytics. Click any card to expand, zoom, and test live data parameters.

🔍 INTERACTIVE
ROC curves showing model discriminatory power on GiveMeSomeCredit test dataset.
dashboardSLOT 01
Credit Scoring ROC Curve & Tournament Performance

Benchmark evaluation of Logistic Regression (AUC 0.8615, KS 56.1%) and HistGradientBoosting (AUC 0.8688, KS 58.5%).

Expand & Explore Live↗
🔍 INTERACTIVE
Feature importance horizontal bar chart.
diagramSLOT 02
Feature Importance & Standardized Logistic Coefficients

Standardized risk factor weights highlighting revolving utilization, delinquency penalty, and DSCR impact.

Expand & Explore Live↗
🔍 INTERACTIVE
Scorecard density plot comparing performing vs default borrowers.
tableSLOT 03
Scorecard Distribution & Default Separation

Probability density separation between performing contracts and 90+ DPD defaults across the 300-850 scorecard scale.

Expand & Explore Live↗
🔍 INTERACTIVE
Dual-axis time series chart comparing HBA coal prices to mining leasing NPL rates.
chartSLOT 04
ESDM HBA Coal Benchmark vs Mining Equipment NPL

Historical relationship between Indonesian coal prices (2021-2024) and mining sector credit risk.

Expand & Explore Live↗
🔍 INTERACTIVE
Bar chart illustrating sector default rate escalation under macro stress.
chartSLOT 05
Macroeconomic Stress Testing by Industry Sector

Comparison of baseline PD vs stressed PD under a severe 25% commodity price contraction across sectors.

Expand & Explore Live↗
🔍 INTERACTIVE
Bar chart comparing default rates for standard records vs bureau error codes.
chartSLOT 06
Credit Bureau 96/98 Anomaly Default Multiplier

Empirical verification of the 8.3x default risk escalation for bureau records with 96/98 error codes.

Expand & Explore Live↗

Impact

Compressed underwriting turnaround from 5 business days to under 15 minutes, identified an 8.3x delinquency risk multiplier on error-coded bureau records, and protected portfolio provisions via automated 36-month CCR tracking.

Lessons

  • Unsupervised Bureau Anomalies Conceal Extreme Risk: Records coded with 96/98 delinquency values suffer a 54.65% default rate (8.3x higher than baseline); flagging them prevents catastrophic mispricing.
  • Asset Collateral Mitigates Tail Risk but Requires Depreciation Discipline: Equipment values drop ~15% annually; maintaining positive equity requires aggressive linear principal amortization and Day 0 CCR >= 120%.
  • Commodity Shocks Require Asymmetric Sector Elasticities: Mining contractors exhibit 1.75x higher default elasticity to coal price shocks than agricultural or civil infrastructure debtors.
  • Explainable Scorecards Outperform Black-Box Models in Committee: Scaling ML probabilities to Basel II points (Base 600 @ 50:1, PDO 20) bridges the gap between predictive power and regulatory auditability.