User Stories

Olam CFSG Develops Trade Management System for Commodity and Derivative Markets

Challenge

Automate manual and spreadsheet-based processes for pricing and evaluating commodities and derivatives

Solution

Use MATLAB to develop a scalable trade management system and deploy it across the enterprise

Results

  • Development time reduced by two years
  • Manual effort reduced by 80%; computational efficiency increased by 80%
  • Scalable trade management platform deployed worldwide

“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

Olam’s trade analytics and risk management system.


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.”

Challenge

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.

Solution

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.

Results

  • Development time reduced by two years. “Thanks to the wide variety of pricing models, statistical functions, and VaR capabilities available in MATLAB, we completed development of the trade management system in about one year,” says Jegan. “Significant incremental capabilities have been deployed in even less time too, such as scenario analysis of portfolios requiring millions of trades, and automating reports into Excel for client communications.”
  • Manual effort reduced by 80%; computational efficiency increased by 80%. “We reduced time and manpower requirements by 80% as a result of using MATLAB to automate the retrieval and parsing of market data directly from Bloomberg,” notes Jegan. “In addition, we increased computational efficiency of trade processing by more than 80% by using Parallel Computing Toolbox and Database Toolbox. Closing business at the financial year end, which was once an onerous process for our trading team, is now a breeze, taking a few hours.”
  • Scalable trade management platform deployed worldwide. “A key advantage of developing our pricing and valuation algorithms in MATLAB is that we could easily deploy them as JAR files using MATLAB Compiler SDK,” says Jegan. “That enabled us to deliver a scalable, enterprise-level application with all the core algorithms written in MATLAB and a presentation layer written in Java.”