Skip to content

MukundaKatta/CreditScan

Repository files navigation

CreditScan

CI Python 3.10+ License: MIT Code style: black

Credit risk scoring engine — A Python library that calculates credit risk scores based on financial indicators using a weighted scoring model.

Disclaimer: For educational purposes only — not financial advice.

Inspired by AI credit risk analysis trends.


Architecture

graph TD
    A[Applicant Data] --> B[CreditScan Engine]
    B --> C[Income Ratio Scorer]
    B --> D[Payment History Scorer]
    B --> E[Credit Utilization Scorer]
    B --> F[Account Age Scorer]
    C --> G[Weighted Composite Score]
    D --> G
    E --> G
    F --> G
    G --> H[Risk Classification]
    H --> I[Credit Report]
    I --> J{Decision}
    J -->|Excellent / Good| K[Approved]
    J -->|Fair| L[Review]
    J -->|Poor / Very Poor| M[Declined]
Loading

Quickstart

Installation

pip install -e .

Usage

from creditscan import CreditScan

engine = CreditScan()

applicant = {
    "name": "Jane Doe",
    "income": 85000,
    "debt": 12000,
    "payments_on_time": 45,
    "payments_late": 3,
    "payments_missed": 1,
    "credit_used": 4500,
    "credit_limit": 20000,
    "account_age_years": 7,
}

assessment = engine.score(applicant)
print(f"Score: {assessment.score}")
print(f"Risk:  {assessment.risk_class}")

report = engine.generate_report(assessment)
print(report)

Compare Applicants

applicants = [applicant_a, applicant_b, applicant_c]
ranking = engine.compare_applicants(applicants)
for rank, result in enumerate(ranking, 1):
    print(f"#{rank} {result.applicant_name}{result.score} ({result.risk_class})")

Development

make install    # Install in editable mode with dev deps
make test       # Run test suite
make lint       # Lint with ruff
make format     # Format with black

Project Structure

CreditScan/
├── src/creditscan/
│   ├── __init__.py      # Public API
│   ├── core.py          # CreditScan engine
│   ├── config.py        # Weights & thresholds
│   └── utils.py         # Scoring helpers & report formatting
├── tests/
│   └── test_core.py     # Unit tests
├── docs/
│   └── ARCHITECTURE.md  # Design documentation
├── pyproject.toml
├── Makefile
└── README.md

License

MIT 2026 Officethree Technologies


Built by Officethree Technologies | Made with love and AI

About

Credit risk scoring engine — weighted composite scoring 300-850, risk classification (educational)

Topics

Resources

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors