Ensure compliance with European Solvency II Directive capital requirements while improving the management of market risk
Use MATLAB to aggregate and clean financial data from multiple sources, develop a comprehensive market risk model, run Monte Carlo simulations, and quantify VaR
“MATLAB enabled me to become a programmer even though I had virtually no programming education by making it easy to try ideas on my own. MATLAB is not only a mathematical tool; it handles data file handling, error checking, and other tedious tasks that need to be completed when developing a financial model.”Adam Nowicki, PZU SA
The European Union’s Solvency II Directive includes a solvency capital requirement (SCR) that defines how much capital insurers must hold. Introduced to reduce the risk that insurers would be unable to fully meet claims, Solvency II requires insurers to account for their exposure to market risk as well as the value-at-risk (VaR) of their holdings.
As one of the largest financial institutions in Poland and the largest insurance group in Central and Eastern Europe, PZU Group has developed a market risk model in MATLAB® to meet Solvency II requirements and manage risk more effectively.
“We need to know where our risks are, and the standard formula for the solvency capital requirement does not give us all the answers,” says Adam Nowicki, expert coordinator in the department of risk management at PZU. “The internal market risk model we developed in MATLAB not only supports compliance with the principles of the Solvency II Directive, it also provides valuable insights about our market risk situation.”
To calculate market risk, PZU needed to process data in disparate formats from about a dozen internal accounting and trading systems. Unable to find a commercially available market risk solution capable of meeting its needs, the PZU risk modeling group considered several options for developing its own. One option was a software package for symbolic mathematical computation, but this software lacked the file handling and error checking capabilities the group needed.
The group had previously developed risk models using Visual Basic for Applications (VBA), but found several drawbacks with this approach. The difficulties with VBA ranged from irksome—the switching of month and day in date handling, for example—to more serious concerns about the results of optimization solvers.
The group needed a development environment that nonprogrammers could use to develop a complete, production-ready market risk solution—from data collection and cleaning to risk modeling, Monte Carlo simulation, and VaR calculation. They wanted to accelerate calculations by taking advantage of multicore processors for parallel computing.
PZU used MATLAB to build a comprehensive market risk model.
Working in MATLAB with Statistics and Machine Learning Toolbox™, Nowicki developed algorithms to import and clean data from a variety of sources, including accounting and trading data from internal PZU systems and time series market data from Bloomberg. After checking the data for outliers and errors, the algorithms join the data from all sources and convert it into a standardized format.
Nowicki developed a time series market risk model in MATLAB based on GARCH processes and used the cleaned data to calibrate it. For each time series (including interest rates, equities, currencies, and indexes), the model evaluates PZU’s current position. For bonds with coupons, the model calculates cash flow dates using Financial Toolbox™.
Nowicki used the MATLAB nonlinear optimization function fminsearch to fit the probability density function in the market risk model, minimizing differences between the real and expected probability densities.
To speed these optimizations, Nowicki used Parallel Computing Toolbox™ to execute them concurrently on an eight-core processor.
After running Monte Carlo simulations in MATLAB using the model, Nowicki’s algorithms price PZU instruments, evaluate the company’s positions, and calculate VaR.
As a final step, Nowicki created an interface that other analysts can use to run the model and visualize results even if they have no experience with MATLAB. This interface and the underlying model are now used in production at PZU.
Join the Customer Reference Program