Metadata-Version: 2.4
Name: scorecard-package
Version: 1.0.0
Summary: Python framework for credit risk scorecard development, validation, deployment and monitoring.
Home-page: https://github.com/sanket-shrishrimal/Scorecard-Package
Download-URL: https://github.com/sanket-shrishrimal/Scorecard-Package/archive/refs/tags/v1.0.0.tar.gz
Author: Sanket Shrishrimal
Author-email: shrishrimalsanket@gmail.com
License: MIT
Project-URL: Documentation, https://github.com/sanket-shrishrimal/Scorecard-Package
Project-URL: Source, https://github.com/sanket-shrishrimal/Scorecard-Package
Project-URL: Issues, https://github.com/sanket-shrishrimal/Scorecard-Package/issues
Keywords: credit risk,credit scorecard,scorecard development,credit scoring,woe,information value,logistic regression,weighted logistic regression,vif,stepwise regression,psi,csi,model validation,credit modelling,risk modelling,banking,nbfc,fintech
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Financial and Insurance Industry
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Office/Business :: Financial
Classifier: Topic :: Scientific/Engineering :: Information Analysis
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy>=1.22
Requires-Dist: pandas>=1.5
Requires-Dist: scipy>=1.9
Requires-Dist: statsmodels>=0.13
Requires-Dist: scikit-learn>=1.2
Requires-Dist: matplotlib>=3.6
Requires-Dist: openpyxl>=3.0
Requires-Dist: joblib>=1.2
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: download-url
Dynamic: home-page
Dynamic: keywords
Dynamic: license
Dynamic: license-file
Dynamic: project-url
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# 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

```bash
pip install scorecard-package
```

Import the package:

```python
import Scorecard_Package as sp
```

or install directly from GitHub

```bash
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

```python
import Scorecard_Package as sp
```

### Fine Classing

```python
import Scorecard_Package as sp

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

### Coarse Classing

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

### Model Development

```python
results=sp.scorecard_model_pipeline(...)
```

### Validation

```python
results=sp.deploy_model(...)
```

### CSI

```python
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.
