Treasury Today Country Profiles in association with Citi

Algo trading: for a few dollars more

Abstract digital image with equations

Algorithmic trading uses a computer programme and advanced mathematical modelling to trade at the optimum time. Typically associated with large institutional investors and professional traders, does it really have a place in treasury?

Whether it is referred to as automated trading, black-box trading or algorithmic trading, the use of computers and mathematical formulae always makes trading more systematic because it takes the human emotional element out of trading activities. If this is a good thing or not is a moot point: since it arrived in the markets around 15 years ago, algo trading is a potential source of increased profit, an efficient risk management tool or a disaster waiting to happen depending on how it is used.

Those already familiar with this topic will perhaps already be thinking of the $440m loss (and near-collapse) in just 30 minutes of US market maker and broker, Knight Capital, caused by a bug in one of its high frequency trading (HFT) algorithms. HFT aims to achieve the lowest possible execution latency (the time that elapses from the moment a signal is sent to its receipt). More than 5000 orders a second can be sent to a trading venue with order and execution report round-trip times of around 100 microseconds (100 millionths of a second) now possible. A poorly tested system is a recipe for disaster.

The formulae are complex, numerically intensive computations and algo trading systems use them to detect and subtly exploit market movements, according to certain pre-defined thresholds, allowing the trader to manage risk.

Many will certainly know of the most famous HFT ‘event’: the ‘flash crash’ of 2010 when the Dow Jones lost more than 1,000 points in a matter of minutes. Again, this was caused by a bug in a system which sent the whole market into freefall before someone literally pulled the plug on it. Given the interconnectivity of the global financial markets, events of this kind are a worry and cast a shadow over algo trading. But HFT is not algo trading – it is simply a strategy that uses an algorithm to trade.

What is algo trading?

Traditional trading is voice trading – picking up the phone and asking for a quote from a panel of banks and locking in a deal. Electronic trading on multi-bank or proprietary platforms does the same thing only (arguably) more efficiently. In each case, once the deal is agreed, the bank takes on the risk that arises in the time between agreeing the price and executing the transaction (the price continues to move as the bank searches for the liquidity to carry out that deal).

Because of the lack of trade anonymity this process carries, a major trade execution (of perhaps $500m upwards) is difficult to price as a single transaction will move the market against the buyer; the bank either has to factor that likely movement into the price or drip-feed the order into the market – but by placing the order over time it will still be subject to market movements (positive and negative) until the whole trade is complete. Either way, the bank takes the risk and the corporate will pay for the price lock-in, one way or another.

What’s needed is speed and stealth as a means of getting in and out of the market at the most appropriate point. This is where algorithmic execution comes into play. An algorithm is a mathematical formula for solving a problem. The formulae are complex, numerically intensive computations and algo trading systems use them to detect and subtly exploit market movements, according to certain pre-defined thresholds, allowing the trader to manage risk (or drive profits, depending on the algorithm) without creating any significant ‘noise’ that would alert the market and potentially affect price.

Builders of algo trading applications may use development platforms such as MatLab (offered by mathematical computing software developer, Mathworks) but some banks – BNP Paribas, for example (see overleaf) – have their own offerings. The algorithms used will typically be based around concepts such as ‘neural networking’ and ‘adaptive neuro-fuzzy inference’ which, in essence, allow the systems to learn on the job, adapting what they do according to initial parameters and the real-time movements in the markets (and all will now work across multiple venues).

The key components of an algo trading system

Algorithms:

These are required to perform correlation analysis, identify trading opportunities and determine optimal trading launch time. Parameters for the trades are set within the algorithms, such as time, quantity and price. Algorithms also measure the trade execution against benchmarks.

Market data:

Historic, intraday and real-time data is required for the system to analyse trends. This may be drawn from multiple sources including market data feeds and in-house spreadsheets.

Order management:

As well as predicting the optimal order, the system also manages and processes all the orders it makes.

Connectivity:

Algorithms should be connected to liquidity pools such as exchanges and inter-dealer brokers to further monitor market conditions.

Integration:

A system should be fully integrated with back office and trading systems to maximise efficiency and ensure compliance.

Most important of all is an understanding that the more complex the algorithm, the more stringent the back-testing and re-calibration should be. Development of an algorithm must be iterative in order for it to function in a dynamic market; adaptive technologies can do this on the fly.

Algo trading strategies

The dynamic nature of the markets means the process of defining a strategy (or strategies) for using an algo must also be iterative; test and refine are the watchwords. There are a number of trading strategies used in algo trading, each favouring a different outcome or scenario. The algos that fulfil these approaches tend to have descriptive names such as Stealth, Sniper and Guerilla.

“Our initial thought was to make this function an addition to Chameleon but the two algos serve two different needs. We want to make it easier for our clients to understand by making our algos less parameter-heavy.”

Asif Razaq, Global Head of FX Algo Execution, BNP Paribas

The simplest and most common strategies follow trends in moving averages, channel breakouts, price level movements and other related technical indicators. These strategies do not involve predictive analytics or price forecasting to trade but instead require a specified trend or market event to take place. Another useful strategy is time weighted average price (TWAP) which breaks a large order into smaller slices, feeding these into the market over a certain period so as not to cause any ‘noise’ that might influence the trading activity of others and thus price (known as ‘iceberging’). When it became possible to piece together those small trades to find out if a large market player is behind, stealth trading algos were created. Others approaches include the aforementioned HFT, as well as market sentiment, arbitrage and mean reversion models.

Who uses it and why?

Algo trading is used in various forms of trading and investment by short-term traders and sell-side players such as market makers and speculators for whom speed is of the essence. Mid- to long-term investors and institutional buy-side firms (such as pension funds, mutual funds and insurance companies) who trade in large values can also play because the ‘slicing and dicing’ of a single deal (breaking a large value into multiple smaller values) allows them to enter the markets without negatively influencing prices. Systematic traders – those who follows trends or trade currency pairs, for example (including corporates) – may benefit from the efficiencies of automated trading and the liquidity-searching function of an algo.

Algo trading offers a number of potential benefits. With the right (well-tested) algorithm, trades can usually be executed at the best possible prices. An automated system may provide well-timed, immediate and accurate trade order placement, having made simultaneous automated checks on multiple market conditions. A system will also remove the possibility of human error and can provide the trader with anonymity if this should be desired (perhaps as a prelude to a major M&A deal).

The downside

There are well-understood technical risks for users (and for the market if things go that badly). For example, system failure, network connectivity errors, time-lags between trade orders and execution and the chaos that imperfect/poorly tested algorithms can cause. But there are operational disadvantages too. It means paying brokerage fees to banks, but more worryingly – for FX trades, for example – it can expose the trader to market swings during the execution period (whereas with the traditional models the bank takes the risk). Modern algos are increasingly able to slice up and massage deals into the markets (and it needs to be multiple markets) with minimal noise, speeding up and slowing down trades according to market movements, but the risk is still with the trader not the bank.

Is it really for treasurers?

Despite potential benefits, algo trading is not something that has seen a great deal of corporate demand, quite possibly because of the reputation of HFT. Corporates will argue that they do not typically trade and bet against very small market movements; they hedge specific transactional requirements, and there are more appropriate approaches they can use because most do not run their treasury department as a profit centre.

Indeed, part of the treasurer’s role is to minimise the effects of adverse market changes on their core business; engaging in any kind of trading related to their underlying business exposures is either frowned upon or expressly forbidden by policy. As such, corporations typically do not trade, they hedge; even the minority of corporates that do run trading desks tend to operate within conservative boundaries. Algo trading’s reputation may be a sticking point in this case and in FX trading, unless very large deals are sought, the pricing advantages of algo trading are likely to be minimal anyway.

However, where large trades are required, BNP Paribas believes it has tapped into a new wave of interest with a “third generation” of algos that might answer the needs of the treasury community.

Anatomy of an FX algo

Algos for the FX market arrived about seven years ago, introduced by Credit Suisse, which drew inspiration from its successful equities trading platform. The first generation systems that followed allowed traders to buy a certain value over a specific time. They did a reasonable job but also left a heavy footprint in the market; when an algo is ‘discovered’ it is open to manipulation by the HFT community. Around five years’ ago, generation two appeared, allowing slightly more random executions to try to avoid detection. These products also offered a mechanism to consume liquidity across the fragmented FX market, aggregating deals across the 30 or so liquidity venues that were available. For the earlier iterations at least, trades still left too much of a signature for the HFT players to spot and exploit.

On average, the second generation algos probably still outperformed voice and electronic trading in the FX space and more banks were entering the fray, offering a bewildering range of passive and active algos to try to meet their clients’ differing execution strategies. When sourcing the right product, three or four banks multiplied by five or six algorithms equated to client confusion. But even when knowledgably selecting an algorithm, the algo chosen would typically function in the same way regardless of what was happening in the market; an aggressive system remained aggressive even in a quiet market.

“Where you have a large trade or a difficult currency pair, algos are a perfect choice.”

Asif Razaq

With simplification of choice in mind, BNP Paribas’ Cortex iX FX algorithmic execution product is the “third generation” of algo system, says its creator, Asif Razaq, the bank’s Global Head of FX Algo Execution. It was launched two years ago with a choice of just two algorithms: Chameleon and Viper. Chameleon has a more leisurely approach to the market whereas Viper is aimed at traders that need a quick and aggressive execution. A third offering, Iguana, has since been introduced for those wanting to trade over a particular time frame.

Creature features

In building Chameleon, Razaq has created a product that best suits clients that have time to work their order into the market, and which goes a long way to avoid detection. “No two Chameleon executions are the same,” he states. “As a random function of what the market is doing it becomes difficult for the high frequency traders to detect a pattern.”

Chameleon starts with the client’s strategy and proceeds by analysing multiple sources of market data which it uses to re-calibrate its execution strategy in real-time. The algorithm effectively dictates how each order will be executed so that when the markets move, Chameleon moves accordingly, speeding up or slowing down but always remaining in line with strategy. For traders that feel the market has reached a point where it will favour them if they move quickly, a ‘Rapid Fill’ button can temporarily put the algorithm into the more aggressive ‘Viper’ mode, to be switched off when the client chooses.

Indeed, Viper shares many of Chameleon’s functions but is geared to operate in a very tight time schedule (seconds as opposed to minutes). The third algorithm, Iguana, takes the flexibility of Chameleon but additionally allows clients to set a specific time-frame instead of letting the system dictate. “Our initial thought was to make this function an addition to Chameleon but the two algos serve two different needs,” explains Razaq. “We want to make it easier for our clients to understand by making our algos less parameter-heavy.”

The thinking

Rather than feeding orders into a ‘black box’ and waiting, Razaq says clients are able to control the execution strategies themselves. “We wanted to create a simple interface and also have a feedback loop where information is delivered while the algo is trading; if it sees something happening in the market it will relay that back to the client so they can change, slow down, speed up, pause or even end the execution.”

Bearing in mind that this form of trading is for large values only, in practice, the client will issue instructions to purchase a specific currency, driving the algorithm to slice up that deal, minimising market impact by reaching out across every venue. It will then aim for the best spread at the time. The caveat remains that whilst the system is executing, the user is taking on market risk. But, says Razaq, if the algorithm is good enough to capture a significant price improvement over the risk transfer price (the price attained via voice trading or normal electronic trading) then the user will gain overall on a major single trade.

A post-trade report is generated for the client, giving a real-time view of how the algo performed against various market scenarios. With a detailed breakdown of every execution and trade ticket, the system also provides an auditable record of all trading, especially useful for evidence of compliance with corporate ‘best execution’ policy.

Uptake

“We estimate that about 20% of the FX market is now trading via algo products,” says Razaq. “It is a growing space and the biggest growing client sector for adopting this technology is the corporate sector; they are looking for alternate ways to hedge and execute and there are now palatable products that they can use.” Typically corporates will be using an algo for an M&A deal or a dividend payment or anything of significant size. BNP Paribas’ offerings purposefully allow client anonymity (even within the bank) by trading only under the bank’s name. This is important, explains Razaq, because a major corporate suddenly making a large volume of currency transactions could alert the market to an activity (such as an M&A deal) which it may wish to temporarily keep under wraps.

However, he acknowledges that smaller deals, certainly less than a couple of million dollars, will see very little benefit from the algo trade execution process. “Algos only really thrive with large orders; with voice or electronic platform trades the spreads on small orders will be so tight there is no need for the corporates to take on extra market risk. Where you have a large trade or a difficult currency pair, algos are a perfect choice.”