Skip to main content

Finance decision intelligence tools for cost-sensitive credit and fraud risk modelling.

Project description

FinCausal

FinCausal is a finance-focused Python library for decision intelligence in credit and fraud risk workflows.

It helps analysts move from:

"This model has good accuracy"

to:

"This decision threshold reduces expected financial loss under these cost assumptions."

Version 0.2.0 focus

  • explicit CostMatrix object
  • threshold optimization by expected financial loss
  • professional finance-style decision reports
  • stress-test summaries
  • model-based intervention simulation
  • stronger input validation
  • scikit-learn-style estimator design
  • synthetic credit-risk dataset for demos and tests

Install

pip install fincausal

Quickstart

from sklearn.model_selection import train_test_split
from fincausal import CostMatrix, CostSensitiveClassifier, make_credit_risk_data

X, y = make_credit_risk_data(n_samples=3000, random_state=42)
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.3, random_state=42, stratify=y)

costs = CostMatrix(false_positive=50, false_negative=500, currency="GBP")
model = CostSensitiveClassifier(cost_matrix=costs)
model.fit(X_train, y_train)
model.optimize_threshold(X_test, y_test)
print(model.summary(X_test, y_test))

Current status

This is an early open-source project. It is not a production-grade bank model-risk platform.

Roadmap

  • SHAP-based explanation wrapper
  • HTML/PDF report export
  • model-card templates
  • fraud-risk dataset demo
  • MLflow experiment logging
  • validation and monitoring reports
  • documentation website

License

MIT License.

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

fincausal-0.2.0.tar.gz (9.0 kB view details)

Uploaded Source

Built Distribution

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

fincausal-0.2.0-py3-none-any.whl (8.8 kB view details)

Uploaded Python 3

File details

Details for the file fincausal-0.2.0.tar.gz.

File metadata

  • Download URL: fincausal-0.2.0.tar.gz
  • Upload date:
  • Size: 9.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.7

File hashes

Hashes for fincausal-0.2.0.tar.gz
Algorithm Hash digest
SHA256 26a9d614c196de7c4cbe9a68736a04924348a1a4e298577671755902c5a4ce82
MD5 184076a8afd18efe295c46fc47ea9178
BLAKE2b-256 ac05ea088d604fd70fa655e3eda553f7ee7dd896bce33fd4414f1e146ba21224

See more details on using hashes here.

File details

Details for the file fincausal-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: fincausal-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 8.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.7

File hashes

Hashes for fincausal-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9b788fd2ee0265f7ad5ff4def246b11fe28d7f4d49d77f937b6edab65cdeee3d
MD5 10d15a3851f0dd809a9cb86406365b67
BLAKE2b-256 5d68b55b59131105bc2e0b9f4233e18ffc6b763c5d03301d24422938c1126c9d

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