# Financial Credit Risk Analyst

> End-to-end consumer credit risk pipeline with PD modeling, Excel dashboards, and Streamlit underwriting cockpits.

Financial Credit Risk Analyst is a free AI agent skill on Agensi by Sheikh Samsuddin Rahaman, in Trading & Investing. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: Free
- Creator: [Sheikh Samsuddin Rahaman](https://www.agensi.io/creators/sheikh-samsuddin-rahaman)
- Category: [Trading & Investing](https://www.agensi.io/skills/trading-investing)
- Version: 1.0
- Last updated: 2026-11-30
- Security: scan passed (2026-11-30); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/financial-credit-risk-analyst
- Tags: trading, python, scikit-learn, data-analysis, streamlit, finance

## About this skill

Building manual credit risk models from scratch is error prone and slow. This skill provides a complete consumer credit analytics and underwriting workflow, moving from raw borrower data to production ready risk dashboards and interactive cockpits.

### What it does
- **Synthetic Data Generation** creates a ledger of 175 synthetic loan applicants with consistent financial attributes.
- **Rules Based Scorecarding** maps DTI, LTV, and credit scores into High, Medium, and Low risk grades.
- **PD Modeling** trains a Logistic Regression model to predict Probability of Default using standardized feature scaling.
- **Excel Dashboarding** builds a portfolio ledger with live formulas for Expected Loss (EL), Loss Given Default (LGD), and Exposure at Default (EAD).
- **Macro Stress Testing** simulates macroeconomic downturns by applying income shocks to the portfolio and measuring EL increases.
- **Interactive Underwriting** provides a Streamlit cockpit for individual applicant lookups and real time parameter adjustments.

### How it works
1. **Initialize Pipeline** by running the synthetic data generator to create the base borrower ledger and scorecard rules.
2. **Train Analytics** using the Logistic Regression script to generate a ROC curve and append Predicted PD values to the dataset.
3. **Build Dashboard** to export a formatted Excel portfolio with calculated risk metrics and lookup tables.
4. **Execute Stress Tests** to run a -20% income shock simulation and generate a narrative credit committee memo.

### Frameworks & tools
This skill utilizes Python 3.11 with `pandas`, `scikit-learn`, `numpy`, and `openpyxl`. It features a `Streamlit` and `Plotly` interface for the web based underwriting cockpit.

### Why this beats prompting it yourself
Prompting a model to build a risk pipeline often results in disconnected scripts and inconsistent math between the model and the dashboard. This skill provides a unified codebase where the Excel formulas, the Python model, and the stress test logic all reference the same underwriting logic and features.

### Use cases
- Generate synthetic datasets for training credit risk analysts.
- Perform portfolio wide stress tests for credit committee reviews.
- Build a prototype underwriting tool for consumer loan products.
- Create automated Expected Loss reports for risk management.

### Known limitations
The PD model is limited to Logistic Regression by default and requires `StandardScaler` consistency. It assumes a fixed 8% interest rate for DTI calculations.

## Requires

- Git

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the Financial Credit Risk Analyst skill from Agensi" and describe your task.
3. Your agent loads the skill from Agensi when it needs it. Nothing is downloaded.

## Frequently asked questions

### What specific credit risk problems does this skill address?

This skill automates a consumer credit analytics workflow by generating synthetic applicant data, training a Logistic Regression model to predict defaults, and performing macroeconomic stress testing. It solves the issue of manual, error prone risk modeling by providing a unified pipeline where Python models and Excel dashboards use consistent logic.

### What tangible outputs can I expect after running the pipeline?

You will receive a suite of financial artifacts including a professional Excel portfolio dashboard with live formulas, an interactive Streamlit underwriting cockpit, and a narrative credit committee memorandum. It also produces ROC-AUC plots for model validation and detailed stress test reports in text and image formats.

### Are there any specific constraints or assumptions in the risk modeling?

The Probability of Default model is currently optimized for Logistic Regression and requires consistent feature scaling via StandardScaler. Additionally, the Debt to Income (DTI) calculations assume a fixed interest rate of 8 percent.

### How should I direct my AI agent to interact with this skill?

You can ask your agent to generate a synthetic borrower ledger, train the probability of default model on existing data, or run a 20 percent income shock simulation to see how it affects expected losses. You can also direct it to launch the Streamlit app for real time underwriting lookups.

### Does this skill require any external software or accounts to function?

Beyond an AI agent capable of executing the provided files, you will need a Python environment with libraries such as pandas, scikit-learn, and openpyxl. The skill includes a requirements file to ensure all necessary tools for data processing and dashboarding are available.

### Can this skill simulate how a portfolio performs during an economic downturn?

Yes, the skill includes a dedicated stress testing script that simulates a 20 percent income contraction across the portfolio. It recalculates risk metrics to show the impact on Expected Loss and generates an executive memo for credit committee reviews.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
