Risk Model Validation
Validation metrics are fundamental tools for developing, validating, and monitoring risk models. Risk Management Toolbox™ provides a risk model validation namespace that includes a suite of data drift, discrimination, and calibration metrics. You can integrate these metrics into your credit and market risk workflows.
Functions
risk.validation.areaUnderCurveTest | Area under curve test (Since R2026a) |
risk.validation.binomialTest | Binomial test (Since R2025a) |
risk.validation.correlatedBinomialTest | Correlated binomial test (Since R2025a) |
risk.validation.generalizedAreaUnderCurveTest | Generalized area under curve test (Since R2026a) |
risk.validation.herfindahlIndexTest | Herfindahl index test (Since R2026a) |
risk.validation.hosmerLemeshowTest | Hosmer-Lemeshow test (Since R2025a) |
risk.validation.jeffreysTest | Jeffreys test (Since R2026a) |
risk.validation.migrationMatrixStabilityTest | Migration matrix stability test (Since R2026a) |
risk.validation.proportionOfFailuresTest | Proportion of failures (POF) test (Since R2025b) |
risk.validation.slotBacktest | Slot backtest (Since R2026a) |
risk.validation.trafficLightVaRTest | Value-at-risk (VaR) traffic light test (Since R2025b) |
risk.validation.groupNumberByQuantile | Group array elements by quantile (Since R2025a) |
risk.validation.makeResponseBinary | Discretize continuous response variable (Since R2025a) |
risk.validation.accuracyRatio | Accuracy ratio value (Since R2025a) |
risk.validation.areaUnderCurve | Area under curve (Since R2025a) |
risk.validation.bayesianErrorRate | Compute Bayesian error rate (Since R2026a) |
risk.validation.brierScore | Brier score for probability data (Since R2025a) |
risk.validation.kendallTau | Compute Kendall tau correlation (Since R2026a) |
risk.validation.kolmogorovSmirnov | Kolmogorov-Smirnov statistic (Since R2025a) |
risk.validation.matrixWeightedBandwidth | Matrix weighted bandwidth (Since R2026a) |
risk.validation.populationStabilityIndex | Population stability index (Since R2026a) |
risk.validation.somersD | Compute Somers' D value (Since R2026a) |
risk.validation.thresholdMetrics | Threshold metrics for receiver operating characteristic curve (Since R2025a) |
risk.validation.kolmogorovSmirnovPlot | Plot Kolmogorov-Smirnov statistics (Since R2026a) |
risk.validation.plotSpearmanRanks | Plot Spearman rank correlation (Since R2026a) |
Featured Examples
Credit Scoring Using Logistic Regression and Decision Trees
Create and compare two credit scoring models, which includes:
Perform Profit-and-Loss Attribution Test
Apply the Fundamental Review of the Trading Book (FRTB) profit-and-loss (P&L) attribution test to the recent trading history of a portfolio. The P&L attribution test determines whether two empirical distributions containing different P&L measures are similar enough for the measures to be considered equivalent for regulatory purposes. One distribution contains risk theoretical P&L (RTPL) values, which are the portfolio losses calculated by the trading desk's internal valuation model at the end of the trading period. The other distribution contains hypothetical P&L (HPL) values, which are the losses the portfolio would realize if the portfolio did not buy or sell any assets over the trading period. Profits are represented by negative P&L values.
Explore Fairness Metrics for Credit Scoring Model
Calculate and use data and model metrics to investigate the biases that exist in a model.
Interpretability and Explainability for Credit Scoring
Different techniques for interpreting and explaining the logic behind credit scoring predictions.
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)



