Skip to main content

Python framework for credit risk scorecard development, validation, deployment and monitoring.

Project description

Scorecard Package

Python 3.9+

Version 1.0.0

MIT License

PyPI

Enterprise Credit Risk Scorecard Development Framework

Develop production-ready credit risk scorecards using industry-standard methodologies including Fine Classing (automatic fine binning) and Coarse Classing (user-controlled bin merging), WOE, IV, CSI, Correlation Analysis, VIF, Stepwise Logistic Regression, Logistic Regression, Weighted Logistic Regression, KS, GINI, Score Calibration, PSI, Validation and Deployment.

A comprehensive Python package for developing, validating, deploying and monitoring credit risk scorecards using industry-standard methodologies such as WOE, IV, KS, Logistic Regression, Weighted Logistic Regression, PSI and CSI.


Overview

Scorecard Package provides an end-to-end framework for building production-ready credit risk scorecards.

The package automates the complete scorecard development lifecycle including:

Data Preparation

  • Fine Classing
  • Coarse Classing
  • Rule Management

Feature Engineering

  • WOE
  • IV
  • KS

Model Development

  • Correlation Analysis
  • VIF
  • Stepwise Regression
  • Logistic Regression
  • Weighted Logistic Regression

Validation & Monitoring

  • PSI
  • CSI
  • Deployment

Designed for:

  • Banks
  • NBFCs
  • FinTech Companies
  • Credit Risk Analysts
  • Data Scientists
  • Model Validation Teams

Features

✅ Fine Classing

✅ Coarse Classing

✅ Automatic WOE Transformation

✅ Information Value (IV)

✅ KS Calculation

✅ Variable Bivariate Reports

✅ Correlation Analysis

✅ VIF Filtering

✅ Stepwise Regression

✅ Logistic Regression

✅ Weighted Logistic Regression

✅ Score Calibration

✅ Scorecard Generation

✅ Automatic Score Banding

✅ Model Validation

✅ Deployment Framework

✅ PSI Monitoring

✅ CSI Monitoring

✅ Export to Excel / CSV


Installation

pip install scorecard-package

Import the package:

import Scorecard_Package as sp

or install directly from GitHub

pip install git+https://github.com/sanket-shrishrimal/Scorecard-Package.git

Requirements

  • Python 3.9+
  • NumPy
  • Pandas
  • SciPy
  • Statsmodels
  • Scikit-learn
  • OpenPyXL
  • Matplotlib
  • Joblib

Package Structure

Scorecard_Package
│
├── Fine_Classing.py
├── Coarse_Classing.py
├── Binning_Rules.py
├── Modelling.py
├── Validation.py
└── CSI.py

Workflow

Raw Data
     │
     ▼
Fine Classing
     │
     ▼
Coarse Classing
     │
     ▼
WOE Transformation
     │
     ▼
Correlation Analysis
     │
     ▼
VIF Filtering
     │
     ▼
Stepwise Selection
     │
     ▼
Logistic Regression
     │
     ▼
Score Calibration
     │
     ▼
Validation
     │
     ▼
Deployment
     │
     ▼
PSI / CSI Monitoring

Quick Start

import Scorecard_Package as sp

Fine Classing

import Scorecard_Package as sp

summary, bivariates, rules = sp.fine_classing(
    df=train_df,
    target="Default",
    ...
)

Coarse Classing

summary,bivariates,rules=sp.coarse_classing(...)

Model Development

results=sp.scorecard_model_pipeline(...)

Validation

results=sp.deploy_model(...)

CSI

csi_report=sp.calculate_csi(...)

Main Modules

Fine_Classing

Automatic fine bin creation with:

  • IV
  • KS
  • WOE
  • Bivariate Reports
  • Fine Rules

Coarse_Classing

Automatic and manual bin merging.

Outputs:

  • Coarse Rules
  • WOE
  • IV
  • KS
  • Monotonicity

Modelling

Complete scorecard development pipeline.

Includes:

  • Correlation Analysis
  • VIF
  • Stepwise Selection
  • Logistic Regression
  • Weighted Logistic Regression
  • Score Calibration
  • Scorecard Generation

Validation

Production scoring module.

Automatically performs:

  • Rule Loading
  • WOE Transformation
  • PD Prediction
  • Score Generation
  • Band Assignment
  • PSI Calculation

CSI

Characteristic Stability Index calculation.

Supports:

  • Development vs Validation comparison
  • Stability Reports
  • Excel Export

Outputs

The package automatically generates:

Module Output
Fine Classing Summary, Bivariates, Rules
Coarse Classing Summary, Rules
Modelling Model, Scorecard, Metrics
Validation Validation Report
CSI CSI Report

Why Scorecard Package?

Unlike generic machine learning libraries, Scorecard Package provides an end-to-end implementation of the complete credit scorecard lifecycle used across banks, NBFCs and financial institutions. The framework focuses on transparency, reproducibility and production-ready deployment rather than black-box modelling.

  • End-to-end workflow
  • Industry-standard methodology
  • Transparent calculations
  • Reusable rule engine
  • Production deployment support
  • Excel and CSV exports
  • No hidden black-box modeling

Documentation

A comprehensive User Guide with detailed examples and case studies is currently under development.


Upcoming Features

  • Reject Inferencing
  • SHAP-based Model Explainability
  • Model Monitoring Dashboard
  • Interactive HTML Reports
  • Automated Documentation
  • Population Drift Reports
  • Hyperparameter Optimization

Version

Current Version

1.0.0

Author

Sanket Shrishrimal

Credit Risk & Analytics Consultant

Mumbai, India


License

MIT License


Contributing

Contributions, feature requests and bug reports are welcome.

Please create an Issue or Pull Request.


Contact

For questions, feature requests or collaboration:

Email

shrishrimalsanket@gmail.com


Acknowledgements

This package was developed to simplify and standardize enterprise credit scorecard development while remaining fully transparent and customizable for production use.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

scorecard_package-1.0.0.tar.gz (22.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

scorecard_package-1.0.0-py3-none-any.whl (21.6 kB view details)

Uploaded Python 3

File details

Details for the file scorecard_package-1.0.0.tar.gz.

File metadata

  • Download URL: scorecard_package-1.0.0.tar.gz
  • Upload date:
  • Size: 22.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.14

File hashes

Hashes for scorecard_package-1.0.0.tar.gz
Algorithm Hash digest
SHA256 a70b72a70d57ee03485f882b43617b1b7d31d163aec18813582a2365cb576dda
MD5 b69a51d0e4c64e51f850cbe62208c202
BLAKE2b-256 3b71ba07a2d171a50d4e51f474e0cba6157ebfcbd16294db2c7d8b4a3ab9bab3

See more details on using hashes here.

File details

Details for the file scorecard_package-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for scorecard_package-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c8f30f76a27e94a8f436807e8a40a9cf10c0c4ce2f8ffc44d0f6f1ad9ea505e6
MD5 68ba53a885b577b7f8ea8293750a8b15
BLAKE2b-256 4e9971b13cb90abd63130093b36374443a2ea128d092a85f9eef5756acbe1c0d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page