Credit and Market Risk Management: From Risk Modeling to Regulatory Compliance
In this technical session, Valerio Sperandeo, Senior Application Engineer, demonstrated how MATLAB can support financial institutions in building robust, transparent, and scalable risk models aligned with regulatory frameworks such as Basel (CCR and FRTB).
Access the Materials
Why Risk Validation Matters
Accurate risk modeling is essential for capital adequacy and efficient portfolio management. Inaccurate estimates of risk measures—such as probability of default, loss given default, exposure at default, value-at-risk (VaR), and expected shortfall (ES)—can lead to under- or overestimation of capital requirements. The webinar emphasized the importance of model validation to ensure predictive accuracy, reasonable assumptions, and performance under different economic conditions.
Tools for Validation and Backtesting
Valerio introduced the new Risk Validation Package in MATLAB R2025a, which provides a unified framework for assessing model discrimination and calibration. Discrimination measures how well a model separates different outcomes—for example, distinguishing between defaulting and non-defaulting borrowers. Calibration evaluates how closely predicted probabilities match observed outcomes. Both are essential for understanding model performance and ensuring regulatory compliance.
Unlike previous model-specific functions, this package supports validation across models built in MATLAB or imported from other languages. It includes metrics such as accuracy ratio, area under curve, Kolmogorov-Smirnov statistic, and Brier score.

The session featured a practical example comparing logistic regression and decision tree models for credit scoring, using validation metrics and decile-based analysis to assess performance. Calibration tests such as binomial and correlated binomial tests were also demonstrated.
The Risk Validation Package enables validation across credit, market, insurance, and climate risk types. It integrates with MATLAB workflows for scorecard development, backtesting, and simulation. All code is open and editable to support transparency and debugging. This consistent framework helps risk teams assess performance, identify weaknesses, and benchmark models across diverse modeling approaches.

Market Risk Backtesting
When working with market risk measures and time series data, validation often involves backtesting. This helps assess how well a model’s forecasts align with actual outcomes over time—an essential step for internal governance and regulatory compliance.
The webinar explored the MATLAB frameworks for backtesting VaR and ES. The VaR backtest object supports statistical tests like the traffic light test, binomial test, and proportion of failures. For ES, MATLAB offers multiple backtest objects based on academic research, including minimally biased tests that jointly evaluate VaR and ES forecasts. These tools help risk teams assess the reliability of ES forecasts, which is increasingly important in regulatory contexts.

Valerio demonstrated how to compare historical and filtered historical methods for estimating VaR and ES on a portfolio of U.S. Treasuries. Filtered historical methods showed better adaptability to changing market regimes and improved backtest results.
Regulatory Workflows: CCR and FRTB
Even when market risk teams build internal models, they still need to implement the SA to benchmark results. If the Internal Models Approach (IMA) is not approved, SA becomes the fallback for regulatory capital calculations.
The webinar showcased the MATLAB standardized approach engines for CCR (SA-CCR) and FRTB (FRTB-SA). These tools ingest ISDA CRIF files and compute capital charges for sensitivity-based, default risk, and residual risk components. Valerio demonstrated how to automate these workflows and visualize capital attribution across portfolios and risk types.


Automation and Dashboards
To scale validation and reporting across multiple trading desks, a certain level of automation is essential. Valerio introduced MATLAB App Designer for building interactive dashboards. He showed a P&L attribution test app that visualizes test results and exports graphics to risk reports. This approach enhances transparency, supports stakeholder communication, and streamlines compliance.
Looking Ahead
The webinar concluded with a reminder that risk management is not one-size-fits-all. Institutions need flexible tools that adapt to evolving data and regulatory requirements. MATLAB provides a customizable framework for building and validating risk models, automating reporting, and performing what-if analysis.
Learn More
- Read Navigating FRTB white paper
- Explore FRTB with MATLAB discovery page
- Discover FRTB SA vs IMA blog post


评论
要发表评论,请点击 此处 登录到您的 MathWorks 帐户或创建一个新帐户。