When he undertook this task, Bassignani says, there was no question in his mind about which development tool to use: “I knew that MATLAB was the solution even before I started.” So confident was he in the capabilities of MATLAB that he took the bold step of replacing Desktop’s entire core library of financial and accounting functions.
MATLAB supported this step in several key ways. For example, Bassignani recalls, “I did not have to write core fixed-income analytical functions because they already existed in Financial Toolbox.”
Bassignani adds, “Writing code in MATLAB is much faster than in C++ because MATLAB is a higher-level language. This means that you don’t get bogged down with issues like data typing and memory management. You also benefit from having many more tools available. For example, nearest-neighbor interpolation is a function call in MATLAB. In C++, I would either need to write my own function or go find one that someone else wrote, which is time consuming.”
After developing and testing the algorithms, Bassignani built a test suite using known good market data, importing it into MATLAB with Database Toolbox.
Once he was satisfied with the MATLAB code base, he compiled (translated) all the code to C++ using the MATLAB Compiler and the C/C++ Math Library. He then wrote a class in C++ to act as the interface between the C++ analog of his MATLAB library and Evare’s C++ application. This interface was needed for mapping data types and handling array output. The entire application was compiled into a single DLL (linking against other DLLs) and handed over to the C++ development team for use in building the rest of Evare Desktop.
Having the test suite in MATLAB was important both during and after the development process. When bugs were identified, Bassignani could quickly go back to MATLAB, fix them there, run the test suite in MATLAB to make sure that the fix didn’t break anything, and then retranslate and compile the entire DLL again.
Following their successful experience with the Desktop, engineers at Evare are now using MathWorks tools to develop a new library of portfolio stress-testing tools. This application will consist of several graphical user interfaces, infrastructure for portfolio manipulation, and libraries of analytical tools. It will also be capable of running in standalone mode or from within Evare Desktop.