User Stories

A2A Develops Comprehensive Risk Management Solution for Energy Markets

View PDF

A2A’s point-and-click interface for calibrating and forecasting electricity spot price, a component of the Risk Management Dashboard
A2A’s point-and-click interface for calibrating and forecasting electricity spot price, a component of the Risk Management Dashboard.

“When you deal with numbers all day and work with sophisticated analytical models, having an integrated environment is invaluable. With MATLAB we visualize data, conduct back-testing, and plot graphs to see the results of changes we make, all in one environment, and that saves time.”

Simone Visonà, A2A

The risk management unit of A2A performs risk analyses in support of corporate and product strategies, including electrical power. The analyses help to facilitate and monitor daily trading activities and support longer-term strategy-setting for A2A, which is one of the largest utility companies in Italy.

A2A uses a risk management platform to gather historical and current market data, apply sophisticated nonlinear models, perform Monte Carlo simulations, quantify value at risk (VaR), and present results graphically to A2A analysts and traders. The entire platform was developed using MATLAB® and companion toolboxes.

“MATLAB is built for the kind of complex computations that we need to make,” says Simone Visonà, risk manager at A2A. “MATLAB has opened more trading opportunities for A2A because it enables us to rapidly compute a fair price and market risk for new contracts.”


A2A found that using spreadsheets to evaluate risk was unworkable. “Calculating VaR with 50 to 60 risk factors using spreadsheets took about an hour, which caused a bottleneck in our process,” says Visonà. “In addition, everyone had access to the spreadsheet, so errors made by one analyst were often propagated to the whole team.”

Deregulation and the need to factor in seasonal and monthly market fluctuations meant that A2A had to account for more than 500 risk factors. Further, for industrial trading operations, A2A needed to deduce a reasonable and fair price for every hour of a full year based on quarterly median prices and other market data. That kind of analysis could not be done with spreadsheet technology.

A2A found significant drawbacks with off-the-shelf risk management solutions as well. “Commercially available packages are essentially general frameworks for computing risk,” says Visonà. “Producing all the necessary data and models—which is perhaps 90% of the job—is left to the end user.”

To accelerate calculations, develop more sophisticated models, and minimize errors, A2A needed a new development platform for risk management.


A2A risk managers used MATLAB as the foundation for their production architecture for analyzing and managing commodity risk across market sectors.

The team used Database Toolbox to import market data from a Microsoft® SQL Server™ database. They preprocessed and error-checked the data in MATLAB before exporting it to a second database for analysis. They complemented this data with market data retrieved from Bloomberg and other sources using MATLAB and Datafeed Toolbox.

The team developed nonlinear MATLAB models to estimate missing market price data. They calibrated their models with Econometrics Toolbox and used Statistics Toolbox to perform nonlinear regressions.

Using Optimization Toolbox the team constrained their power price models to comply with quoted market prices.

With Financial Toolbox, the group computed variance-covariance matrices of time series data. They then calculated mark-to-market valuations and associated risk metrics using Financial Derivatives Toolbox.

A2A used MATLAB Compiler to deploy standalone applications that analysts can use as a dashboard for visualizing results, managing risk, and recording contract information. In addition, the team used Spreadsheet Link EX to produce Microsoft Excel® reports of the risk analysis results for distribution to analysts and managers throughout A2A.

The risk management system is currently in production. A2A analysts are now using MATLAB Builder NE to create and deploy .NET and COM versions of their risk and pricing models.


  • Hour-long calculations completed in 30 seconds. “Using spreadsheets, it took an hour or more to calculate VaR with about 60 risk factors,” says Visonà. “Using MATLAB we handle 10 times that number and complete the calculation in about 30 seconds.”
  • Development time halved. “We completed the core risk management system in about 18 months with MATLAB,” says Visonà. “Using Java or another lower-level language, we estimate that it would have taken twice as long in our current operation environment.”
  • Pricing model development accelerated. “To react quickly to market opportunities, our analysts can’t wait years for us to build new solutions,” says Visonà. “With MATLAB, we can develop and deploy a new pricing model for a completely new market in weeks. If it’s an extension of an existing model, we can have it ready within hours.”


Manage and mitigate risk across markets in a large utility company


Use MATLAB and companion toolboxes to process data, develop risk and pricing models, and deploy an interactive dashboard for analysts


  • Hour-long calculations completed in 30 seconds
  • Development time halved
  • Pricing model development accelerated

Products Used

Learn more about A2A SpA