algo-risk-credit

Solid

"Build credit scoring models to predict default probability from borrower characteristics. Use this skill when the user needs to assess creditworthiness, build a credit scorecard, or evaluate lending risk — even if they say 'predict default risk', 'credit scoring', or 'loan approval model'.".

AI & Automation 22 stars 8 forks Updated 1 weeks ago MIT

Install

View on GitHub

Quality Score: 82/100

Stars 20%
45
Recency 20%
90
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

# Credit Scoring Model ## Overview Credit scoring models predict the probability of default (PD) from borrower characteristics using logistic regression or gradient boosting. Output: a score (300-850 range) or PD (0-1). Used for loan approval, pricing, and portfolio risk management. ## When to Use **Trigger conditions:** - Building a scorecard for loan/credit approval decisions - Predicting default probability for risk-based pricing - Evaluating existing credit models for discriminatory power **When NOT to use:** - For corporate bankruptcy prediction (use Altman Z-Score) - For market risk measurement (use VaR) ## Algorithm ``` IRON LAW: A Credit Model Must Discriminate AND Be Calibrated Discrimination (AUC): correctly ranking good vs bad borrowers. Calibration: predicted PD matches actual default rates. A model with AUC=0.85 but predicted PD 2x actual default rate will cause systematic over/under-pricing. Need BOTH properties. ``` ### Phase 1: Input Validation Collect: borrower features (income, debt ratio, credit history length, delinquency count, utilization), outcome variable (default within 12-24 months). Handle: missing values, class imbalance (typically 2-5% default rate). **Gate:** Sufficient defaults (300+ events), features available at decision time. ### Phase 2: Core Algorithm 1. Feature engineering: WOE (Weight of Evidence) binning for logistic regression, or direct encoding for GBDT 2. Train model: logistic regression (interpretable, regulatory-preferred)...

Details

Author
charlieviettq
Repository
charlieviettq/awesome-agent-skill
Created
2 months ago
Last Updated
1 weeks ago
Language
Python
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category