Works with the AI Agents you already use

    Financial Credit Risk Analyst

    by Sheikh Samsuddin Rahaman

    1

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

    Free

    Security scanned
    Financial Credit Risk Analyst

    Financial Credit Risk Analyst

    Example session with this skill installed

    Run the full credit risk pipeline, including data generation, model training, and the macroeconomic stress test. Summarize the impact of the income shock.

    • Read your context and instructions
    • Compiled the financial credit risk

    I have executed the end-to-end credit risk pipeline. This included generating the synthetic applicant ledger, training the Logistic Regression model (ROC-AUC verified), and performing the -20% income shock simulation.

    Stress Test Summary: Baseline vs. -20% Income Contraction

    MetricBaseline PortfolioStressed Portfolio (-20% Income)Variance (%)
    Total Exposure (EAD)$4,375,000$4,375,0000.0%
    Avg. Probability of Default (PD)4.2%6.8%+61.9%
    Expected Loss (EL)$82,687$133,962+62.0%
    EL Rate1.89%3.06%+117 bps

    The simulation confirms that a 20% reduction in borrower income significantly degrades the Debt-to-Income (DTI) ratios across the portfolio. Because DTI is a primary feature in the Logistic Regression model, we see a non-linear jump in the Expected Loss, primarily driven by borrowers in the 'Medium' risk grade shifting toward 'High' risk thresholds.

    Next steps

    1. Open outputs/executive_memo.md to review the narrative for the Credit Committee.
    2. Launch the cockpit with streamlit run python/app.py to test different shock levels (0-50%).
    3. Review excel/loan_applicants_portfolio.xlsx for the detailed applicant-level impact.

    Connects securely to your tools. The creator never sees your data.

    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.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before buying a skill.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Free to use

    No account required to browse

    Trust & safety

    Security scan

    Security scan passed 4 days ago

    • Free with an Agensi account

    Software
    Git

    Permissions

    Terminal / Shell
    Read Files
    Write Files
    Listed4 days ago

    What's inside

    Creator

    Sheikh Samsuddin Rahaman

    Sheikh Samsuddin Rahaman

    Frequently Asked Questions

    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.

    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.

    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.

    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.

    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.

    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.

    New in Trading & Investing

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Trading & Investing.

    Free