Why building your own algorithmic FX trading solution is not child’s play

June 2023 in Previous Features

The traditional build-versus-buy question has become more complicated with the emergence of a variety of off-the-shelf components that make it easier and more cost-effective for either buy-side or smaller sell-side market participants to create their own FX execution solutions.

The traditional build-versus-buy question has become more complicated with the emergence of a variety of off-the-shelf components that make it easier and more cost-effective for either buy-side or smaller sell-side market participants to create their own FX execution solutions. The view from top banks and other providers, however, appears to be clear: buy is cheaper, safer and more efficient. But hang on a moment, you say. They would say that, right? It’s true that algo providers have a reason to be biased when it comes to the buy-build question, but they still offer compelling arguments for why a range of market participants will want to avoid creating in-house solutions. FXAlgoNews spoke to several providers to find out why that’s the case and when it does make sense to build.



“When it comes to build versus buy, ultimately what it comes down to is cost,” said Asif Razaq, global head of algo execution at BNP Paribas.

The question starts by considering how much a bank has already invested in infrastructure that it could reuse.“When we break this down, there are a number of components that need to be considered,” Razaq said. One of these relates to those that give market access, known as market adapters. “If we need to build an adapter to connect to EBS, Reuters or Hotspot, it all comes at a significant cost.”

Many banks will have built their own adapters, which they can code to the specification of the venue that they’re connecting to. “There is a growing trend towards participants buying off-the-shelf products from companies who provide connectivity adapters.” A couple of examples of such vendors are MarketFactory or smartTrade, firms that have already built connectivity adapters.

Next is the cost of building the smart order routers that algo solutions will utilise.

“There are two options a firm can have with this type of technology. They can either build their own proprietary software or buy something off the shelf,” the BNP Paribas executive said.Various companies, such as those which build adapters, will sell APIs which will allow a firm to aggregate and route orders across to different ECNs. But at this point, constraints begin to emerge.

“If you want to build some intelligent logic into the smart order router, using an off-the-shelf product can be quite limited.” Razaq said.

The next cost factor comes in terms of the execution logic, what Razaq calls the brain of the algo. “Now this is where it differs across the marketplace. The brain of the algo has a decision tree which dictates when to trade, how much to trade, when to slice, how much to slice. Once the brain has decided to trade, it then passes the instruction to the smart order router to actually execute the trade onto the chosen trading venue,” he explains.

Some venues offer aggregate solutions which give a firm a basic algorithm such as a TWAP implementation which can be reused across those marketplaces.

“Sourcing sophisticated algorithms is not readily available as an off the shelf product. This is where some algo providers are able to provide a niche offering that optimises execution,” states Razaq.

“In essence if a buy-side client were to build their own algos then your banks become de facto liquidity providers,”

Many sell-side firms focus on this because this, as Razaq says, is where the quant analytics and the sophistication of a bank are critical to building a first class execution strategy.

“And this is where we identify the bulk of the cost to be,” he said. A firm will need a team of quants and an IT team and the costs will quickly mount.

“Some of the bigger banks, have already invested in this area so it effectively comes to leveraging those teams to deliver those type of solutions.”

Gary Stone, Bloomberg Tradebook Chief Strategy Officer, echoed those views. “It is expensive on the infrastructure side. It’s less expensive than it used to be but it’s still expensive. It’s expensive to have the expertise of quants and analytics to be able to look at these issues and set up the infrastructure to be able to understand what is actually happening with it,” he says.

“One of the things in FX is that you have scale. And by that I mean that the more orders you have interacting through the technology, a better understanding you have of how the technology is actually interacting with the marketplace.” He added: “Any quant will tell you the more observations you have, the better the data of understanding what actually is happening.”

Stone said there will be some firms that are tempted to build. “I’m a little biased on this one because at Bloomberg we operate an FX marketplace and we also operate an aggregator,” Stone said.

“From the buy side’s perspective, they’d want to build their own because it comes down to control. They’ve looked at what goes on in the equity market and they’re not really enamored with the level of transparency surrounding routing practices or how their orders are actually being handled. There are issues of what I’ll call ‘prove it, show me that you do what you actually do’. ”

That nagging worry on the buy-side has led to new market offerings for FX. “You are starting to see more and more analytics pop up in the space,” Stone said. “One group of analytics is really focused on transaction cost analysis. Another one is routing metrics, which is each individual slice or child as it interacts with the liquidity, what actually happens during the execution process.”

Stone said that while the TCA concept is well developed in the equity market, it is still being honed for the FX market.

“And the whole routing metrics is becoming more important on the equities side and it’s starting to creep into the conversation on the FX side. FX and equities are very similar marketplaces in respect of how they trade, but they’re very different marketplaces because one is an OTC market and the other is exchange traded.”



Below the top tier, banks typically will not have their own sophisticated electronic platforms, so they are unlikely to have the technology or the staff to build in-house solutions.

“Smaller banks don’t have mature electronic automated trading platforms, so they’re starting from scratch. These banks follow the buy approach whilst targeting a different client base,” states Razaq.

The top banks are competing for sizeable orders from the large corporates and professional institutional clients. “The more sophisticated banks in this area will then look to build value add solutions. You’ll start finding banks will seriously invest in writing their own smart order routers, writing their own market access to get the product streamlined rather than using third-party platforms.”

“I think the advantage of using the bank algorithms is that they do have access to this internalisation stream.”

For instance, BNP Paribas has engineered all of its technology in house. This includes front end algo ticket design, fix engines that facilitate algo communication, the intelligence and core algo brain to the self-learning smart order router and market adapter that provides market access. That means the bank can move some processes from the core brain down into the smart order router level to be closer to the market and reduce latencies.

“You have a lot more flexibility when you build an end to end solution Razaq said. “You have flexibility to move various parts of the business to different components within the product.”

In a complex marketplace, where there’s a high degree of fragmentation, this flexibility can have a big impact. “We have engineered an independent solution which has a self-learning capability to address issues of mirage liquidity and recycled liquidity.” the BNP Paribas executive said. “Now what you really want to do is independent of your execution algo logic in terms of how you want to slice and dice it. You want to have a separate component which manages all that. And you want to build intelligence into that layer.”

Razaq said his bank has built a level of AI into its smart order router which allows it to learn as it trades. “So if it finds that one venue isn’t as reliable as another then the smart order router automatically bans that particular venue. It’s designed to mimic the human thought process.”

That doesn’t mean that a firm can’t use an off-the-shelf solution, only that it needs to recognise the limitations. “Most smart order routers are adequate in routing orders to the market. If you want to be a bit more clever and analyse real-time market analytics, then you basically need to build that intelligence into your smart order router,” Razaq said.

That means a firm would need to build that component outside of the order router, adding an extra layer to the product. .


Another argument against building is that it limits execution venues.

“In essence if a buy-side client were to build their own algos then your banks become de facto liquidity providers,” Razaq said. “So effectively you’re building an algorithm that exclusively trades against your banks’ liquidity which limits execution options.”

But a buy-side firm that uses a bank’s algos is leveraging the bank’s credit lines. “So you have much deeper access of liquidity because the bank has a much bigger credit line in the market than the client may have. But there is also the benefit of capturing spread because you can place passive orders into the market which you can’t necessarily do against your bank’s liquidity.” he said.

Richard James, head of Currencies and Emerging Markets Execution Services at JP Morgan, noted the importance of liquidity. “JP Morgan’s FX algorithms are hybrid, meaning that they access both internal and external sources of liquidity. That our algorithms have the optionality to directly interact with our franchise flow is a big differentiator. Not just because of their hybrid nature, but because of the size and scale of our FX franchise. Internal sources of liquidity can, depending on market conditions, be a very attractive form of incremental liquidity,” he says.

James said this was the type of algorithm which had little alpha footprint and can go in and out of the market without being noticed.

“One of the things in FX is that you have scale. And by that I mean that the more orders you have interacting through the technology, a better understanding you have of how the technology is actually interacting with the marketplace.”

“I think the advantage of using the bank algorithms is that they do have access to this internalisation stream. The size of the overall bank, the volume, determines how high or sophisticated that internalisation option might be.”

For a bank as large as JP Morgan, which handles a tremendous amount of risk each day, the internalisation option offered on their algorithms can become important. Add to that the fact that the algorithms on offer to the clients are the same as those that are used by the bank’s trading desk.

“They are tried, tested and proven algorithmic execution methods. Our algorithms are used not only when we automate the management of our risk, but also when our voice traders are trying to access liquidity. The execution performance of our algorithms in different market conditions are reviewed by our strat quants and regular improvements and tweaks ensure that the algorithms are constantly adapting to the evolving market conditions,” James said.

Razaq of BNP Paribas gave an example of one buy-side firm that had built its own algo and was trading successfully on its own. But in the aftermath of the Swiss National Bank’s policy move this year, which widened spreads, using a bank’s own algo, as opposed to a firm’s proprietary system, had become more attractive.

“Now in a situation where, post SNB the market spreads have completely transformed, the very same execution algo that the buy side has built is proving to be a bit expensive because it’s having to cross the spread on a wider market. When the spreads were very tight these models worked for them, but in a model where the market is very thin, that is now struggling,” he states.

The firm he spoke of is now exclusively using the BNP Paribas algos for execution. “They’re finding actually BNP Paribas is going to have much deeper access to liquidity. It also provides the ability to capture spread and in a wide market that can be a considerable cost saving.”



The FX algo scene has changed dramatically in recent years as top-tier banks have invested in their offerings. So where can clients expect to see more change?

Stone said one area of development has been user interfaces that help direct the routing decisions, “so the buy side has more input into what actually happens”. That requires a set of routing metrics behind it, not at the parent level but at the microstructure level, which show how a trade is interacting with the marketplace in general.

Stone said Bloomberg Tradebook has been developing algorithms in the equities space since 1996. “And when we look at it, we never sit still. We constantly look at the marketplace always and it’s a daily thing, not just a weekly or monthly thing. You do weekly and monthly to see trends but you look at daily to try to figure out what happened in some of the outliers and where there are things that you should be doing but you’re not doing and what you can do better.”

For instance, in FX, Bloomberg Tradebook might look at liquidity interaction on an order by order basis in real time. “We have a whole desk that sits behind it and says, ‘what actually happened here, is this really doing what we want it to do?’”

JP Morgan has seen increased demand recently for “algorithms that are risk reducing or at minimum are not risk inducing in any way, the view being to minimize or remove any alpha leakage”, James said.

“There are definitely different horses for courses in terms of what clients want. Client adoption of algorithms in general has been slower than many initially predicted across the industry, but we are seeing steady growth which points to the increasing use of algorithms as a key tool for accessing liquidity in the FX market.”

Razaq said that buy-side clients that still want to build, tend to be the more sophisticated clients such as systematic funds that have expertise in electronic trading. “Your average real money client would not be looking at that option because they may not necessarily have the investment in house to build those strategies.”

However you look at it, algo providers know they are in an increasingly competitive market. Buy-side players and large corporates are increasingly using these algos, and many of them know that building at this stage is not a realistic option.

That in turn has led to intense competition among providers to build ever more sophisticated solutions.

The good news for the buy side: The banks and providers that are driving all of this innovation have a pretty clear priority: lower costs and better execution.