Automate manual and spreadsheet-based processes for pricing and evaluating commodities and derivatives
Use MATLAB to develop a scalable trade management system and deploy it across the enterprise
“We process 2GB of market data every day. Our previous system was so tedious and our data sets are so large that I don’t think this would have been possible without MATLAB and its ability to handle big data and interact directly with Bloomberg and our database.”Ananthi Jegan, Olam CFSG
Headquartered in Singapore, Olam International is a leading agribusiness, supplying industrial raw materials and food from seed to shelf to over 16,000 customers in 70 countries. The company’s commodity derivatives trading business unit, CFSG, combines quantitative modeling with Olam’s extensive commodity supply and demand insight to trade futures and options.
To monitor the market risk of these strategies and to perform backtesting and scenario analysis, Olam CFSG built a trade analytics and risk management system in MATLAB®. The system processes 2.5 million transactions and 4 million market data records daily to evaluate trades. The system is used for attributing profitability and performing risk assessments using historical data.
“MATLAB enabled us to develop a scalable enterprise trade management platform that is a tremendous improvement over the previous approach we were using,” says Ananthi Jegan, product manager in Olam CFSG. “With MATLAB, we have reduced errors and staffing requirements while saving time and increasing efficiency.”
In the past, Olam CFSG used a third-party trade management system that was both costly and difficult to customize, making it all but impossible to incorporate new financial instruments. To address these drawbacks, Olam CFSG traders and analysts developed an in-house solution based on Microsoft® Excel® spreadsheets. While it was easier to add new instruments with the spreadsheets, the company soon encountered obstacles with this approach. First, analysts spent too much time manually copying market data from Bloomberg into the spreadsheets. Second, calculations involving large amounts of market and trade data, such as scenario analysis, value at risk (VaR), and backtesting, were time-consuming and frequently led to software crashes. Third, the Excel models were not able to adapt to Monte Carlo simulation for pricing.
Olam CFSG wanted to automate the process of retrieving data, speed pricing algorithms, and eliminate the errors that occurred during manual processing. In addition, they wanted to develop and deploy a scalable trade management system capable of reliably serving users across three continents as well as handling gigabytes of market data and millions of transactions each day.
A team of four Olam CFSG analysts from Bangalore used MATLAB to accelerate the development of the company’s trade analytics and risk management system.
The analysts wrote functions to import market data from Bloomberg using MATLAB and Datafeed Toolbox™.
They cleaned the imported data, using Statistics and Machine Learning Toolbox™ to find missing values via curve fitting. They also used Statistics and Machine Learning Toolbox to identify and visualize trends in the data with a variety of graphs and plots.
They developed a pricing model for a variety of instruments, including American and European barrier options as well as commodity and foreign exchange futures. They based this model on Black-Scholes and Bjerksund-Stensland option pricing models from Financial Instruments Toolbox™.
Using Financial Toolbox™, the team developed algorithms to evaluate bonds and yields and analyze option valuation and sensitivity.
To speed up pricing and valuation calculations, the team used Parallel Computing Toolbox™ to execute them in parallel on multiple processor cores.
The analysts implemented the data access layer of the trade management system’s three-tier architecture using Database Toolbox™. This layer provides access to a MySQL® database that is used to store intermediate and final results from the calculations.
Finally, the team used MATLAB Compiler™ and MATLAB Compiler SDK™ to create Java® classes from their MATLAB algorithms. They deployed these classes as a set of JAR files that are accessed via Remote Method Invocation (RMI) by a custom web application developed in Java.
The trade management system is currently in production, and is used across different business groups in India, United Arab Emirates, Singapore, the United Kingdom, and the United States.
Join the Customer Reference Program