Skip to content

Collateralized Hedge Optimization

IQdigitec uses Julia to rapidly consolidate and optimize the assignment of thousands of financial collateral instruments for multiple non-cleared OTC derivatives and counterparties
Julia delivered better governance with more auditable code, documentation completeness and achieved performance benchmark targets

IQdigitec is a Canadian-based international software development and advisory firm that has deployed mission-critical enterprise solutions for mid to large corporations and governments.

IQdigitec was approached by a multinational insurance client with $1.4 trillion in assets to develop a solution to optimize collateral assignment for their swaps and derivatives. The client firm is a market maker for fixed income instruments in their domestic bond market and manages large value non-cleared OTC derivatives with multiple counterparties belonging to the top 120 banks in the world.

The goal of this optimization solution is for the entities is to minimize the pool of liquid assets needed to adequately collateralize the future liability exposure which have been stochastically derived for each derivative instrument. This is done by assigning thousands of bond instruments in multiple combinations, in accordance with global standards of the Master Agreement from the International Swaps and Derivatives Association (ISDA).

The scope of calculations is inherently complex given the existence of multiple counterparties, further compounded by the addition of numerous dependent conditions which govern the valuation of each of the thousands of collateral instruments in accordance with the Credit Support Annexes (CSA) which are layered over the ISDA Master Agreement. These valuation adjustments are commonly referred to as “haircuts” in corporate finance.

In addition, the nature of the optimization exercise among multiple counterparties becomes exponentially complex when the scenarios involve the ability to lend collateral instruments among related companies in the large conglomerate that is under common control by a parent company.

The project team was led by IQdigitec Technology Architect Al Wong, Chief Technology Officer Anurag Agarwal, and corporate finance specialist Marcel Joaquin. The IQdigitec team analyzed many alternatives to Julia including Python, R and MATLAB. The careful and detailed deliberations were conducted with the client’s technology architects. The scope of in-depth analysis also considered how each language ecosystem can be efficiently deployed into the existing environment of this very large multinational conglomerate.

According to Al Wong,

As we looked at promoting faster compute times and scalability for the future, Julia was the better choice for replacing the legacy APL language. Julia works well for executing compute intensive matrix math that works through optimization scenarios which involve very large volumes of alternate solution sets.

The team also worked closely with the experts from the client’s solution development and business teams to identify Julia-enabled advantages for algorithm improvement and more optimal results. This multidisciplinary approach yielded valuable improvements for informing executive decision-making and fiscal stewardship.

Marcel Joaquin was impressed by the improved traceability of Julia coded algorithm,

The use of Julia delivered better governance with more auditable code, documentation completeness and achieved performance benchmark targets.

Julia code delivered fast execution that readily beat APL benchmarks for speed and optimized results. Further improvements are also expected as the Julia code is further optimized.

Anurag Agarwal added,

Julia combines the features of interpreted and compiled languages resulting in the ease of use of interpreted languages while also giving the performance of compiled languages.

By using Julia, code expansion for modernizing legacy application was avoided. This would facilitate eventual transition of support to the capable in-house team of the client, giving a roadmap for Julia adoption in rewriting other legacy applications. IQdigitec also regarded the ease of transition for Julia programs from private to public cloud as a valuable benefit for its clients.

OUR ENTERPRISE PRODUCTS