Banche Popolari Unite Analyzes Credit Risk

"The numerical computation and visualization capabilities of MATLAB are incredible! We can implement up to 100,000 simulations to hundreds of thousands of positions and relative aggregations quickly."


Identify and analyze potential portfolio credit risk


Use MATLAB and Statistics and Machine Learning Toolbox to develop a VaR model that enables fast computation and analysis of large data sets


  • Fast, precise analysis of more than 700,000 credit risk sensitive portfolio positions
  • Reduction in algorithm development time
  • Reliable analytical model
Loss distribution deployed by UBI in MATLAB.

To protect their portfolio offerings and remain profitable, banks must determine potential credit risk. With customer and market data growing exponentially, however, running the large computations required for precise analysis can be challenging.

Banche Popolari Unite (UBI Banca) of Italy, now part of the Intesa Sanpaolo Group, monitors firm-specific and industry portfolio credit risk using a value-at-risk (VaR) model developed with MATLAB® and Statistics and Machine Learning Toolbox™.

"MATLAB allows us to manage a huge amount of data and to generate an impressive number of scenarios very quickly," says Roberto Modafferi, a quantitative analyst in the Risk Management Division of UBI Banca. "This has enabled us to monitor credit risk as a result of the estimated degree of portfolio diversification and concentration."


To build their credit model, UBI Banca would need to process and analyze hundreds of thousands of data points based on monthly internal and weekly market data. Developing the model in C or C++ would be too time-consuming.

They sought a computing environment that would eliminate tedious hand coding and enable them to present their results to upper management in a visually accessible form.


UBI Banca used MATLAB and Statistics and Machine Learning Toolbox to develop a Merton-based credit model that determines the distribution of losses and the VaR at different confidence intervals. They delivered their findings to upper management in an intuitive graphical format.

Modafferi used MATLAB to import both market data, such as stock and stock index quotes, and internal data, such as decade rates, losses given default, and exposures at default. He created a default model with MATLAB, aggregating the data by sector. Statistics and Machine Learning Toolbox enabled Modafferi to perform sector regression and correlation analyses to assess the effects of diversification and concentration of the credit portfolio.

He used MATLAB and Statistics and Machine Learning Toolbox to model and run Monte Carlo simulations to assess precise estimates of the loss distribution by analyzing the data convergence. The simulations enabled him to determine the entity of the losses at different confidence intervals over a specific time period.

Using MATLAB and Statistics and Machine Learning Toolbox, Modafferi developed a factor model that distinguishes between systematic and specific risk. Along with easing the computational burden, the model enabled Modafferi to obtain more efficient risk estimates and obtain more insight into the nature of the portfolio risk.

MATLAB helped Modafferi display the simulation results in analytical and graphical formats, including histograms, loss distributions, and convergence graphics. He delivered his findings as part of a quarterly risk management report that the bank management uses to make strategic decisions, such as rebalancing sectors in UBI’s portfolios.

Modafferi is also using MATLAB and related toolboxes to develop an internal pricing system that helps evaluate various portfolios of the trading and banking books as well as hedging policies to test and integrate external suites.


  • Fast, precise analysis of more than 700,000 credit risk sensitive portfolio positions. "It would have been very difficult to manage hundreds of thousands of positions in a Monte Carlo simulation framework where each position is considered both individually and as part of a group," explains Modafferi. "The MATLAB high-level matrix-based programming language allowed us to reduce a huge amount of computational effort, resulting in both speed and precision."

  • Reduction in algorithm development time. "MATLAB enabled us to save hours of development time in writing and optimizing our algorithms to minimize computational time," says Modafferi. "Implementing our model in other low-level programming languages would have required additional months of work."

  • Reliable analytical model. "With MathWorks tools, we designed an original and consistent model that considers scientific literature, best practices, real data, and the bank’s business peculiarities as negotiated instruments," says Modafferi. "With this, we’re confident in where results come from."