State Street: Using Julia to Identify Best Execution for Foreign Exchange Trading
Every day, $5 trillion changes hands in global foreign exchange markets.
How do traders know whether they are getting the best deal?
They turn to State Street.
State Street is one of America’s 15 largest banks, and their BestX division provides independent trade technology and analytics to define, achieve and demonstrate the best execution of a foreign exchange trade.
How does State Street do this?
That is where Julia comes in.
State Street uses Julia to power their Post-Trade Transaction Cost Analysis (TCA) tool which allows traders to analyze the cost and execution performance of their foreign exchange transactions. It provides a unique set of analytics measuring all aspects of trade execution performance including spread, impact costs and signaling risk.
According to Aman Thind, Co-Founder and Director of BestX, which is now part of State Street:
“We wanted to make sure we didn’t commit the mistake of the dual language problem … where most analytics are written twice – once for prototyping, and then again for running in production”
“We have a very small team so we need to be as efficient as possible”
“We chose Julia which gives us the expressiveness and development speed of Python and the performance of C with a language and type system that aids and does not impede productivity”
“BestX is an innovative, cutting-edge technology-led analytics team, so using the very latest advancements in numerical computing through Julia is a material attraction to us”
“We can run almost all our analytics in less than 5ms per trade which is pretty impressive”
“Writing this in C would’ve taken us much longer and trying to get similar performance through Python would have required special considerations”
“Our initial implementation in pure Python quickly ran into performance problems that required optimisations in Cython”
“Performance in Julia was on par with the Cython-optimized Python without any need for the special attention Python requires”
“Julia has helped us not just bridge the gap between prototyping and production – it has built an 8 lane highway so that the divide has ceased to matter”