Metadata-Version: 2.4
Name: fincausal
Version: 0.2.0
Summary: Finance decision intelligence tools for cost-sensitive credit and fraud risk modelling.
Author: Swapnil Bhagat
License-Expression: MIT
Keywords: finance,risk,credit-risk,fraud-detection,cost-sensitive-learning,stress-testing,machine-learning,model-risk
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Financial and Insurance Industry
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: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy>=1.23
Requires-Dist: pandas>=1.5
Requires-Dist: scikit-learn>=1.2
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == "dev"
Requires-Dist: build>=1.0; extra == "dev"
Requires-Dist: twine>=4.0; extra == "dev"
Dynamic: license-file

# 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

```bash
pip install fincausal
```

## Quickstart

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