Nykredit analysts used MATLAB®, Database Toolbox™, and MATLAB Compiler™ to build easy-to-use risk management and portfolio analysis applications for use in production throughout the company.
The team used Database Toolbox to import corporate bond data, rate information, and other financial data from Nykredit’s Oracle databases.
They developed and tested algorithms in MATLAB for calculating relevant risk metrics, including expected shortfall and value at risk. The team identified distributions that fit the data and then ran simulations using copulas to account for correlation between various market sectors.
For some functions, the Analytic Support Unit adapted code samples that they downloaded from MATLAB Central. The team also reused legacy C++ code by calling the routines directly from MATLAB. The open architecture and development environment in MATLAB, particularly features such as the editor, debugger, and code profiler, enabled Ahlgren to build reliable quantitative applications quickly.
For presentation and reporting, the team used MATLAB plotting capabilities to visualize results in multiple formats, making it easy to identify the markets or industries that contribute most to the overall risk.
Once they had fully tested and fine-tuned the algorithms, the team developed a user interface in the MATLAB GUI design environment and used MATLAB Compiler to generate standalone applications, which they deployed to Nykredit analysts and portfolio managers.
Working with student interns from a local university, the team also created a MATLAB based application for producing monthly reports with plots and graphs for Nykredit clients.
The Analytic Support Unit uses MATLAB for rapid analysis tasks as well. In one instance, they analyzed option-adjusted spreads, assessing and visualizing their dependence on interest rates as well as option volatilities.
The risk management and portfolio analysis applications are now in use across the Nykredit Asset Management organization.