By Nicholas Pratt

Customising FX algorithms: fine tuning your order execution strategies

By Nicholas Pratt

The FX world has now fully adapted and attuned itself to the world of algorithmic trading and these tools are now being widely employed across the industry as opposed to being restricted to the elite word of high frequency trading populated by technology-driven hedge funds and prop shops. But now that mainstream adoption has begun, it is clear that the demands from traders are becoming more specific when it comes to their algorithms and the services needed to support them.

The one-size-fits-all approach has become largely redundant and traders are now looking to fine-tune their execution set-up to fit certain trading strategies, functions, time frames, visibility preferences and investment objectives. The benefits of moving away from a 'black box' approach are becoming more obvious. But what steps should traders take when looking to develop more customisation? Is it possible to customise an off-the-self trading system? Can the customisation be done in tandem with the vendors or can it be done in-house?

And while the benefits of customisation may be attractive to firms looking to form a competitive edge and mark themselves as distinct from their rivals, are there any risks associated with this tailoring? Will it become harder to backtest and benchmark such unique and untried trading techniques? Perhaps lessons can be learned from other asset classes that are further along the evolutionary scale in terms of algorithms. Or perhaps it is too precarious a step to blindly translate the properties of one asset class to another.

Customising FX algorithms: fine tuning your order execution strategies

So what order types are proving to be most popular with FX firms? "With FX we have seen a slightly different approach than we have seen in equities and the order types do not always translate easily from one asset class to another," says David Hastings, global head of sales FX at trading software developer FlexTrade. "In FX we are seeing trading in the normal OCO orders, take-profit orders and moving take-profit orders. Time-slice orders are proving particularly popular with FX firms due to the fact that they are able to send the liquidity back into the market without affecting the market's flow."

It may have taken a while but the FX world is becoming more accustomed to algorithmic trading, says Hastings. "Traders are realising that whatever they used to do verbally can now be done algorithmically. So when it comes to customising algorithms, it means listening to the client and understanding exactly what it is they want to do and then designing the algorithms accordingly - whether it be maximising alpha or minimising slippage. But it also involves some buy-in from the traders and they have to take a leap of faith to an extent."

Evolutionary process

Does this leap of faith extend to moving away from the traditional black-box approach of the past? "It is an evolutionary process. When the black boxes first came out, not many traders understood how they worked but they have gradually got more acquainted with them and the signals they send are now they are being continually back-tested and fine-tuned. If you overlay execution algorithms on top of the black boxes you create a very well-rounded execution tool."

Customising FX algorithms: fine tuning your order execution strategies
David Hastings

"Time-slice orders are proving particularly popular with FX firms due to the fact that they are able to send the liquidity back into the market without affecting the market's flow."

The extent to which algorithms can be customised is very dependant on the capabilities of the trading firm, says Hastings. "Off-the-shelf algorithms can be customised or slightly fine-tuned by the traders themselves to fit their needs without requiring too much knowledge of the programming language and code that it was originally written in. The technology has helped by making it much easier to write algorithms and it has become much easier to transpose trading ideas into an algorithmic context. And we can provide them with the tools they need to create their own algos and backtest them. However, I maintain that the easiest way to customise the algorithms is for traders to work in partnership with the vendor and explain what they are trying to achieve."

The proprietary instincts of most traders has led many of them to try to keep the mechanics of their trading and what they put into their buy and sell signals secret from even their vendors, says Hastings. And these instincts also lead many traders to customise their own algorithms. In terms of the risks associated with this do-it-yourself approach, the only real concern that Hastings highlights is backtesting and benchmarking. "With an experienced vendor, they would have run these tests several times whereas traders may be running them for the first time. You have to be very sure that you have ticked every box. It is really about data assimilation and getting hold of the liquidity providers' price feeds so that you can create an environment in which you can test how effective your execution algorithms would have been. There are still challenges involved around the provision of the data but it is certainly easier than it was."

In terms of benchmarking there is an obvious trade-off involved between the ability to compare algorithms and the desire to have algorithms that are wholly unique compared to everything else out in the market. And in the main, it is a trade-off that most traders are prepared to make, says Hastings. "I don't think anyone changes the bog-standard algorithms without knowing the risks that are involved and the desire to differentiate is still a big driver."

Legacy technology

Another reason why traders are looking to move on from the black-box approach of the past is the legacy nature of the technology. Legacy systems have long been frowned upon in the financial technology sector even though they sit at the heart of many banks and financial institutions and have done so for years. However, like any bank employee that has been there for decades, they tend to be inflexible, difficult to integrate and largely impenetrable when it comes to working out what is going on inside. For relatively new technology like algorithmic black boxes, this impenetrability is of particular concern, says Giles Nelson, Deputy CTO, Progress Software, a provider of complex event processing technology.

Customising FX algorithms: fine tuning your order execution strategies
Giles Nelson

"Typically we don't know a great deal about what our clients are doing with the software and they can be very secretive."

"We had a customer come to us that had been using a black-box that was put together by a couple of in-house developers. It worked very well but after a while they wanted to make some changes only to find that the developers had left and no-one else knew how it worked. They could not change it so they had to throw it away. But now it is possible to buy software and create tools that can be used by business analysts to test and deploy an algorithmic trading strategy that can evolve as firms get used to algorithmic trading, market changes and employees leaving."

As is common among the vendor community, Nelson also feels the proprietary instincts among FX traders are still strong and have an influence on their decisions regarding the customisation of algorithms and the relationship with third party software vendors. "Typically we don't know a great deal about what our clients are doing with the software and they can be very secretive. This might be because they are not regular users of third party software and are keener to develop their technology in-house but I think that is the wrong approach. Why not use a tool that can make you more productive even if it has been developed by a third party? Of course it depends on the institution involved but sometimes these decisions are based more on the protection of jobs in the IT department rather than increasing productivity."

The interest in customising algorithms is being seen across the market, including agency broker Bloomberg Tradebook. "Bloomberg Tradebook is a broker and a technology company. We pride ourselves in our transparency, analytics, trading algorithms and staff of execution consultants," says Gary Stone,director of development and trading research & strategy. "A few years ago FX trading technology was all about transparency - helping traders find and extract liquidity so providing them with a deep liquid marketplace and a market depth screen was the big game. Clients have moved very quickly and now they need much more than that - algorithms, STP and different order types. So our focus for the next year is on continuing to develop algorithms and build flexibility that enables traders to combine algos together to implement their strategy and trade their idea.."

Customising FX algorithms: fine tuning your order execution strategies
Gary Stone

" in the future FX market, brokers will add more value than just a dumb pipe."

Self-service approach

This focus has led to an initiative that Tradebook calls its 'black box within a box'. "Where some clients are going to third party, off-the-shelf FIX engines or contracting with developers to customise their algorithms, that only serves the top end of the market. We are attempting to do that directly on our front-end and through an order API. Customers will be able to mix and match different order types, data triggers and tactical trading algorithms such as trailing stops, laddering/scaling and average price algorithms together or build their own algorithms. It is a flexible approach that enables a trader to get from idea to implementation rapidly before the market conditions change and negate the strategy."

As the algorithmic trading market continues to develop and become more accepted in the mainstream, are we likely to see even the most vanilla of FX traders using their own customised algorithms rather than the commoditised products available off the shelf? "The mainstream FX traders may not have the time, funding, expertise or effort to develop algorithms. Even at the high end where high frequency traders are looking to develop their own algos and typically use brokers as a pipe, they are looking for an easy-to-use incubator for proving ideas before engaging in full blown development." Stone continues, "This is what we saw in the equities market where it started with a 'their algo-our pipe' approach. In time, however, the traders recognised that we brokers are more adept at understanding the idiosyncracies and microstructure of the market. We have tactical trading algorithms, smart order handlers that are specifically tailored to finding and extracting liquidity and a set of execution consultants that can advise of which ones to leverage to seek a better execution. So in the future FX market, brokers will add more value than just a dumb pipe. It will be more a case of their idea and intelligence, our consultants working with for appropriate algo selection and our pipes. The client still uses their intellectual property in terms of what to trade and what price but they use our raw materials to interact more efficiently in the market and let us make the decision on how best to engage the marketplace."

According to Jeff Grossman, head of sales at Ireland-based Baxter FX, customising the algorithms is the only way to keep pace with the general fragmentation in the market and the mutation of liquidity. But there are several factors that FX trading firms must consider when deciding whether to customise their algorithms on an in-house basis or leave it to the provider. "They must consider the importance of any proprietary information and also reflect on what the true cost of developing in-house will be. In terms of considering the involvement of a provider they must look at the benefit of support and the ease at which it might be given as well as the reduction in time to market."

Customising FX algorithms: fine tuning your order execution strategies
Jeff Grossman

"The difficulty with backtesting is avoiding back-fitting."

Simulating performance

There are also several steps that must be taken to simulate the performance expected from a customised algorithm. "The key steps are debugging and optimizing by simply running the algo in production type environment. The greatest challenge is actually the replication of production conditions. The difficulty with backtesting is avoiding back-fitting." Benchmarking also becomes more challenging once algorithms are customised, says Grossman, meaning that the greatest risk from customising your algorithms is that you waste resources on marginal improvements or improvements that you cannot measure.

Jan-Folkert Kunst, Managing Director of TradeSense, a Holland-based trading software vendor and algo integrator identifies a number of steps that should be followed in the backtesting and simulation of a customised algorithm. The first of these involves defining the various factors to be tested through written descriptions, case studies and flow charts. "Then you have to look at the coding, and the actual testing and the test environment to be used. The tests in production should be done with small amounts and be monitored at all times. The key principle is the documentation and the biggest challenge is finding the right test environment," says Kunst.

Despite the challenges involved in the testing and the risk that customised algorithms may become too specific, cannot be adapted for any other use or be compared or benchmarked, Kunst believes that a bespoke approach has a number of different ways in which it can help firms differentiate their trading strategy. "The most important aspect is the flexibility needed for changing market behaviour. Especially now, the greater trading firms are able to adapt their strategies in this way because of customised algorithms. Furthermore, as this market matures quickly, we will see specific demand arising in less commoditised products, like emerging market currencies and more new order types will be needed."

Added sophistication

The trend for added sophistication in FX algorithms is something that is being observed across the industry.
"What I am seeing is more complex algorithms built on top of pre-existing simple ones; this is a natural progression as the market matures and traders seek to develop advanced customisations on top of proven logic," says Joey Horowitz, chief technology officer of the Athena Transactions Platform at Thomson Reuters. "The basic trading algorithms are also becoming a much more routine and natural part of the system."

Another notable trend that Horowitz has seen is a change in the type of tools that traders are using when building their algorithms. "Many are starting with complex event processing (CEP) tools but then move on to 3GL tools. So while CEP is a great technology for algo development, as the traders become more skilled and the algorithms more sophisticated and time sensitive they will often code directly into the execution management system's API's." These trends are generally indicative of a growing familiarity with their algorithmic tools and a realisation that if they invest in better systems they will achieve better results, says Horowitz. "Time to market and faster prototyping has advantages but traders are realising that rather than taking short cuts when investing in their algorithms, in the end result they can make more money by coding them directly."

Customising FX algorithms: fine tuning your order execution strategies
Jan-Folkert Kunst

"..as this market matures quickly, we will see specific demand arising in less commoditised products, like emerging market currencies and more new order types will be needed."

While there is still a significant demand for the standard, off-the-shelf algorithms from manual traders looking to bring more automation into their executions, the decision to customise algorithms has been made easier by the fact that it is no longer such a complex undertaking. "You no longer have to get the code from the vendor and extend that logic. The algos are simply an innate part of the system and have become the default mechanism," says Horowitz.

Customising FX algorithms: fine tuning your order execution strategies
Joey Horowitz

"What I am seeing is more complex algorithms built on top of pre-existing simple ones; this is a natural progression as the market matures and traders seek to develop advanced customisations on top of proven logic,"

Furthermore, the algorithms are much more user-friendly and accessible to the traders themselves rather than their more technically minded colleagues or the supplying vendor. "The vendors have come up to speed and recognize which algorithms are naturally used in particular trading circumstances so that when the trader undergoes a particular action, they will automatically be launching an algo rather than requesting one."

Challenges of testing

In terms of the testing process for algorithms, there are a growing number of tools now available that reflect the customisation of algorithms and the challenges involved, says Horowitz. "Functional testing is complicated and you have to be in control of all of your market data and order executions to create a deterministic and predictable testing environment so that you can be assured that your algorithm is operating correctly. We provide tools that take into account algorithmic actions within the simulated market so that you can create a testing environment which can monitor any subtle changes that have been made to the algorithm."

Despite the importance of the benchmarking and backtesting process, it is still not as widely practiced as it perhaps should be due to its complex nature and a lack of recognition within the market that there are tools out there to help them, says Horowitz. "It is hard and there is a lot of skill and technique involved. It is also important that the testing tools be directly connected to the algorithmic trading system itself. Ultimately correct testing procedures streamlines the whole customisation and development process because it helps traders understand how their algos will perform."