A production credit-risk scoring system for a financial institution
An end-to-end machine learning system that scores credit risk for a Swiss financial institution — delivered as a reproducible, containerized, serverless API with automated CI/CD, not just a model.
The problem
The institution needed to predict credit-default risk reliably, but required more than a model in a notebook: a system aligned with the business, reproducible for auditors, and deployable as a real service the organization could depend on.
Approach
Working with data engineers, data scientists and business analysts to keep the work aligned to business goals, I designed a full-stack ML pipeline and treated evaluation and reproducibility as first-class requirements throughout.
- EDA → feature selection → SMOTE class balancing → model optimization
- Hyperparameter tuning with RandomizedSearchCV
- Benchmarked XGBoost, Random Forest and Logistic Regression
- XGBoost selected as the best-performing model
Architecture
The optimized model was packaged into a containerized Docker and FastAPI application with automated tests, giving a portable, reproducible inference service that behaves identically across environments.
- Docker + FastAPI inference service
- Automated tests with pytest and curl
- Version-controlled, reproducible pipeline
Deployment
The service was deployed as a serverless API on AWS Lambda, secured behind a custom domain via Route 53, with CI/CD workflows built on Docker and GitHub Actions for automated, repeatable releases.
- Serverless API on AWS Lambda
- Custom domain secured via Route 53
- CI/CD with Docker + GitHub Actions
Business value
The institution received a scalable, reproducible credit-risk solution it can maintain and extend — with modern MLOps practices ensuring the model can be redeployed and validated safely over time, rather than becoming an unmaintainable artifact.
Lessons learned
On imbalanced credit data, disciplined balancing (SMOTE) and honest metrics matter more than chasing a single headline score.
Packaging the model as a tested, containerized API is what turns a good model into a dependable business asset.
Serverless deployment kept the solution low-maintenance and cost-aligned for the client's scale.