2023-06-28

AFM Market Watch 8: Algorithmic Trading

The Dutch Authority for the Financial Markets (AFM) issued this report to clarify terminology, assess risks, and outline supervision regarding algorithmic trading on Dutch capital markets. The document highlights that algorithmic trading now constitutes 74% of transactions, primarily driven by non-Dutch firms, and emphasizes the need for robust control frameworks to prevent market disruptions like flash crashes. Additionally, the AFM warns that advanced machine learning models may inadvertently learn to manipulate markets and requires firms to rigorously test algorithms to ensure orderly trading conditions.

Autoriteit Financiele Markten logo

Netherlands

Autoriteit Financiele Markten

Click to view thumbnail

Algorithmic Trading March 2023, edition 8 Market Watch #8 Continue reading

Table of contents 2 01 What is new under the sun? 3 02 Terminology 3 03 Algorithmic trading on Dutch capital markets 5 04 Benefits of algorithmic trading 5 05 Potential risks of algorithmic trading 6 AFM supervision on algorithmic trading in recent years 7 Closing remarks 8 FACTS & FIGURES - THE DUTCH SPAC MARKET: AN UPDATE 9 Table of contents

Market Watch, edition 8 | Algorithmic Trading 3 #8 The first objective of this Market Watch is to make the reader aware of a number of different concepts with regards to the term ‘algorithmic trading’ - what are we actually talking about? Next, the AFM shares several data insights on algorithmic trading on Dutch trading venues - how big is algorithmic trading in the Netherlands? and the subsequent sections will touch upon some of the benefits and risks of trading algorithmically - what is on the mind of the supervisory authority? Algorithmic trading is a difficult concept to pin down as algorithms come in many different shapes and forms and are used by many different actors for many different (trading) purposes. Furthermore, it has been and remains a moving target as technology develops. Considering the absolute majority of trades is done algorithmically, the AFM has made the supervision of algorithmic trading, including gaining more knowledge about this topic (please see our recent publication on Machine Learning in trading algorithms), one of its key attention areas for the coming years. 02 Terminology The algorithmic trading universe is vast and algorithms come in many different shapes and sizes. Algorithmic trading makes use of many different techniques ‘under the hood’, ranging from (human) business logic to advanced artificial intelligence. Furthermore, algorithms are used by many different actors, ranging from pension funds to proprietary traders. Some forms of algorithmic trading are unbelievably fast and need to be so, but for others speed does not matter much. When thinking and talking about algorithmic trading, terminology matters a great deal. Especially when it comes to thinking about the impact on markets, about risks, about policy, there is a need to account for the many nuances that are out there. A first distinction can be made between execution algorithms and trading algorithms, which have different aims and are used by different actors. 01 What is new under the sun? In 1982, the American Commodity Futures Trading Commission allowed a new financial instrument to be traded: the stock index future. That year the S&P 500 futures contract was created. It quickly became, and four decades later still is, the dominant contract out there. During that same time, instead of carrying notes by hand, technology in the US allowed for trading multiple stocks simultaneously, sending many orders ‘automatically’ to the different stock specialists in the trading pit. This was called program trading and was initially developed to support portfolio trading – where a portfolio would typically consist of many different stocks. It did not take long before program trading was used for arbitrage between the stocks and the novel index futures. It really took off in the mid-80s when it also became possible for orders to be entered automatically by computers. In the aftermath of the 1987 stock market crash, NYSE banned the use of the Designated Order Turnaround system for arbitrage trades for several weeks and introduced ‘circuit breakers’ – a tool to automatically halt trading in times of crashing prices. The extent to which speculation in index futures, index arbitrage, and program trading may have triggered the 1987 stock market crash was much debated well into the 1990s. This still is an ongoing debate. Many things have changed since the 1980s, particularly due to advances in technology. Take the speed of execution for example: where it used to take several minutes to buy an entire S&P500 index portfolio, it now takes a fraction of a second. Or intelligence: where the intelligence within algorithms was based on human business logic and at best supported by computers, whole strategies are now ‘thought out’ and executed by AI algorithms. It has even come to the point that scientists are now investigating the real possibility of advanced AI algorithms working together, without needing any human instructions, to “coordinate” the prices of financial instruments. But many things have also remained the same since the 1980s. As was the case back then, confusion existst when it comes to the terminology for automated, algorithmic, or ‘computerised’ trading. And the jury is still out on the effects of algorithmic trading on markets.

Market Watch, edition 8 | Algorithmic Trading 4 #8 The following is a simplified version of a trading algorithm used by several HFT firms subject to supervision of the AFM. It (1) predicts a theoretical price of a certain financial instrument (via a machine learning model) and based on that prediction (2) takes a certain investment decision. The machine learning model (e.g. linear regression) is optimised to predict the price of an instrument. It uses all sorts of properties of the order book to do so: order book imbalance, volume, price trend and many permutations of these at different time horizons (last millisecond, last 10 milliseconds, etc.) This data is fed into the model in real-time and a theoretical price comes out (which keeps changing in real time), based on which orders are sent to the exchange(s). Please see this link for our full report on the application of machine learning in trading algorithms by several investment firms under our supervision. Simplification of structure of a trading algorithm the AFM encountered Data feed Trading algorithm Order book data Correlated products Typical HFT data input:

  • Focus on order book activity
  • Most recent micro-second data most predictive power Model exists of 1000s of features with their own parameters Machine Learning based model that aims to predict the next theoretical price of instrument x THEO(retical price) IF Theo > current price then buy, IF Theo < … Limited number of possible actions Sends/amends order to exchange Execution algorithms aim to execute an order. The investment decision itself is taken elsewhere. These algorithms are often used to place large orders (e.g. portfolio trades) in an intelligent manner in the market so as not to pay the highest price. An example would be a Volume Weighed Average Price (VWAP) algo. Trading algorithms aim to automate a certain strategy and automatic execution is part of the algorithm: the trading algorithm takes the investment decision itself. It can be programmed to take the decision when a certain situation arises, but it may also make use of AI models to detect trading opportunities itself. An example would be a quantitative hedge fund algo seeking to optimise a portfolio’s exposure and automatically executing the strategy. In the earlier days of algorithmic trading, both execution and trading algorithms were programmed to operate according to some business logic: a trader’s idea or mathematical model. In the past decade, Artificial Intelligence (AI), and in particular Natural Language Processing and Machine Learning, have been applied on a large scale to algorithms. We have seen a sea-change in the last decade with the application of AI, as the logic that AI applies to arrive at a certain decision/action may now be beyond human understanding. Then there is another concept that is related to algorithmic trading but is often wrongly assumed to be synonymous with it: High Frequency Trading (HFT). In essence, this is merely a technique that allows for extremely fast signal processing and/or order execution. In turn, the extremely fast order execution allows for certain automated trading strategies to be successful where speed is of the utmost importance. Hence, HFT is a subset of trading algorithms. But even within the world of HFT, there are many different types of actors and strategies, and there is slower and ultra HFT. In addition, as machine learning has been applied in HFT trading algorithms for years now to arrive at investment decisions, the extremely fast algorithms are becoming ever more intelligent, and consequently also more complex.

Market Watch, edition 8 | Algorithmic Trading 5 #8 Orders executed n Algo order n Manual order 350.000.000 300.000.000 0 250.000.000 200.000.000 150.000.000 100.000.000 50.000.000 400.000.000 Other Italy US Switerland Spain The Netherlands UK Ireland France Germany 04 Benefits of algorithmic trading Before looking more closely at the risks, the benefits algorithmic trading has brought to the markets needs to be acknowledged. It was introduced to enable more efficient execution to facilitate better portfolio trading. It has also enabled an increase in speed and faster transfer of risks by HFT market makers, which, in combination with the increased competition, has reduced the spreads of many financial instruments to the point where they cannot get much narrower. In that sense, algorithmic trading has improved liquidity by making it cheaper and easier for investors to buy and sell financial instruments. 03 Algorithmic trading on Dutch capital markets Data analysis by the AFM of Dutch algorithmic trading in 2021 resulted, among others, in two interesting findings:

  1. Algorithmic trading is the norm n Algorithmic trades n Manual trades 74% 26% The pie chart shows the number of transactions per month on Dutch trading venues and for all asset classes in November 2020. The dark purple represents the number of algo trades, the light purple the number of non-algo trades.
  2. Majority of algorithmic trading on Dutch trading venues by non-Dutch firms The bar chart shows the number of algo- and non-algo executed transactions per country of origin on all Dutch venues in the period 2018-2021 in all asset classes. The graph shows that firms located in Germany, Ireland, France, United Kingdom, The Netherlands, and Spain play a big role on Dutch Venues, and most trades are algorithmic in nature. Some of those firms are subsidiaries of US companies. When looking at the type of firms that trade algorithmically, many different actors can be identified amongst the top 20 traders (by numer of transactions), such as (investment) banks, proprietary trading firms, and brokers.

Market Watch, edition 8 | Algorithmic Trading 6 #8 In its MiFID review, ESMA proposed to amend the testing requirement to a principle￾based testing regime where the test should demonstrate that an algorithm produces certain prescribed outcomes (e.g. not contribute to excess volatility). We believe any progress on this requirement, would be a step forward. In general, the AFM has observed cases in which trading algorithms do not behave as intended by the developers. An example was an HFT market maker firm that used a trading algorithm that responded to its own orders. The algorithm observed an order being entered (its own order), and – based on that information – decided to cancel its orders. The cancellation in turn triggered a new order by the algorithm, etc. This led to a feedback loop, with many order entries and cancellations occurring in a short time span, creating disorderly conditions. The combination of speed, the amount of orders, and the complexity of the underlying model of the algorithm in the above example shows that the exact behaviour of an algorithm might be hard to predict under all circumstances. The AFM expects that firms remain in a position where they are able to explain the behaviour of their algorithms and ensure it is orderly and as intended. 2022 Flash Crash On May 2 2022, stock prices on several major EU trading venues started to plummet quickly until they triggered the circuit breakers. This so-called flash crash started when a trader executing a large portfolio order made a typing error when entering the size into the system. Due to this ‘fat finger’ error, the portfolio order started to execute in many, many small ‘child orders’ on several trading venues. Before the hard-coded controls on both the firm’s side and the trading venue side stopped the execution of the remainder of the basket, many orders had already been sent to several EU exchanges to wreak havoc. This incident illustrates the importance of sound governance and compliance culture on the ‘people’ side as well as having firm-specific hard-coded controls tailored to its actual business activity. On the trading decision side, algorithms are emotionless and do as they are programmed which avoids any human errors that might be caused by nerves and emotion. In addition, advances in AI have enabled algorithms to incorporate more information and make more accurate (price) predictions used by market makers. Such advancements increase the level of competition, which should ultimately be reflected in lower trading costs through smaller spreads for other market participants. 05 Potential risks of algorithmic trading Algorithmic trading is a generic concept and the risks listed below are generic as well. The list is non-exhaustive and emphasises risks relevant to the AFM’s capacity as a conduct supervisor: risks that jeopardise the robustness of the infrastructure of the financial markets and the fair, orderly and transparent operation of these markets. Control framework An algorithm can disrupt the markets, impacting its robustness and orderly operation. And this can have a huge impact, as shown by the occasional flash crashes (where humans also play a role). The 2022 flash crash (see box on the right) shows the importance of a sound control framework, governance, calibrated and sensibly tailored risk controls, and a strong compliance culture. Regulations have set requirements for controls and require investment firms to thoroughly assess the suitability of their algo controls on an annual basis. The same goes for trading venues, which have to adhere to their own set of algo controls. In addition, legislation requires trading venues to have a role in controlling whether their members have specific algo controls in place and for members to certify that their algorithms have been tested. The AFM expects trading venues to firmly take up this role and will monitor this. There is a specific requirement for trading firms to test their trading algorithms before they enter the market to make sure they do not behave in an unintended manner and/or cause disorderly trading conditions. At present, the testing environments used do not necessarily enable measuring market impact and/or interaction between trading algorithms.

Market Watch, edition 8 | Algorithmic Trading 7 #8 AFM supervision on algorithmic trading in recent years Risk and control framework of trading firms and trading venue Firms that engage in algorithmic trading must adhere to extensive legal requirements to avoid market disruptions and market manipulation caused by algorithms. In 2020, the AFM completed an extensive review of proprietary trading firms’ and trading venues’ compliance with relevant regulations. The report can be found here. We expect firms to thoroughly assess their compliance and suitability of their algo controls on an annual basis. They also need to improve compliance with testing requirements. Machine learning study Recently, the AFM conducted an exploratory study on how machine learning is applied in trading algorithms by several proprietary trading firms under our supervision. The full report can be found here. In short, our study found that these firms make extensive use of complex machine learning models. The AFM also found that these models rely heavily on order book data making them prone to react to any (deliberate or inadvertent) disruptions. Collaboration with Alan Turing Institute The AFM has large datasets at its disposal. The AFM collaborates with researchers from the Alan Turing Institute to obtain valuable insights from this data to improve our market surveillance and understanding. Market manipulation Manipulation directly affects the fair and orderly operation of capital markets. A trading algorithm can learn to manipulate the market. Firms and trading venues are required to establish and maintain effective arrangements, systems and procedures to detect and report suspicious orders and transactions indicative of attempted or actual insider dealing or market manipulation and should notify the competent authority without delay. In addition, the AFM monitors the markets through its own set of detection algorithms. Some of these are focused on algo-related variations of market abuse, taking into account variables that are especially important for many trading algorithms (mainly microstructure properties such as order book imbalance, volatility, recent activity in order book, etc.). Advances in machine learning technologies, particularly in the subtype Reinforcement Learning – where the model learns which actions are most rewarding given a certain state of affairs and is free to take many different actions – raise real concerns that trading algorithms might learn to manipulate the market in very shrewd ways, even unintentionally (without the developers wanting the algorithm to do so). A concern is that such trading algorithms might abuse relationships across instruments or trading venues. Market quality The quality of a market can be captured by characteristics like the bid-ask spread, depth of the book, and market efficiency. Some algorithms may impact market quality inadvertently, some when they interact with other algorithms (herding, exacerbating volatility, mini-flash crashes), some even by design (e.g. arguably, latency arbitrage algorithms). These are serious concerns that deserve attention and further scrutiny. Besides the impact of algorithms on the market, concentration risk might have a big impact: when barriers to entry are too high, market quality can be impacted. Literature shows that algorithmic market making contributes to market quality (liquidity) but only when there is enough competition.

Market Watch, edition 8 | Algorithmic Trading 8 #8 Closing remarks We have seen that algorithmic trading entails many different types of algorithms and actors, ‘that for the last decade most transactions have come from algorithms’, that algorithmic trading is very international, and that algorithms can be very complex. We also took a brief look at the benefits to market quality and some of the risks. The topic algorithmic trading is diverse and has many facets. In addition, it is developing rapidly with the advent of new technology. There still is a lot to learn and understand about this topic on all levels: about the impact of algorithms together, how different individual algorithms may be, on market micro structure, and about the systemic impact of all these algorithmis interconnecting many different markets together. The AFM will closely monitor developments in this area and conduct exploratory studies to better understand and assess risks in order to tailor its supervision. In addition, the AFM works together with other supervisory authorities, actively contributes to ESMA working groups, and is in close contact with scientists that research aspects of algorithmic trading. Lastly, the AFM strives to share knowledge where it can and is keen to learn from market participants, scientists, and fellow supervisory authorities.

Market Watch, edition 8 | Algorithmic Trading 9 #8 Figure 1: Number of IPOs, SPAC IPOs and de-SPACs on Euronext Amsterdam from 2018 to 2022 0 3 6 12 15 18 2019 n Traditional IPO n SPAC IPO n De-SPAC 2018 2020 2021 2022 9 Two SPACs were required to publish an approved prospectus with respect to the business combination. As of the date of this publication, three of them are trading significantly below their initial issuance price of €10 per share. Trading activities SPAC IPOs in the Netherlands are solely targeted at professional investors. There were low levels of trading in SPAC shares in the secondary markets and only a small fraction was traded by retail investors.2 Upcoming deadlines Currently, 14 SPACs are still searching for a target company to merge with. Most SPACs have a term of 24 months to complete a business combination. 11 of them had the option of an extension period of (a total of) six months, subject to shareholder approval. For many SPACs the deadline is approaching fast. In most cases in Q2 and Q3 2023 as shown in Figure 2.3 Investors should be aware that the sponsors of a SPAC have a commercial incentive to avoid a no-deal, which increases the risk of an acquisition of a low-quality target. In general, sponsors only receive compensation when a business combination is completed. In the situation of a no￾deal, the sponsors may lose their total initial investment to cover the costs for the SPAC. 2 Based on reported MiFID data. 3 Based on the terms mentioned in the SPAC IPO prospectuses (and updated in accordance with recent announcements, if applicable). FACTS & FIGURES This section of the AFM Market Watch describes a development in the Dutch Financial Markets with a specific focus on facts and figures. This section contains information up to 14 February 2023. The Dutch SPAC market: an update In 2021, Euronext Amsterdam experienced a record number of sixteen Initial Public Offerings (‘IPOs’) of Special Purpose Acquisition Companies (better known as ‘SPACs’), raising a total of approximately €3.7 billion. A SPAC is a company without business activities that raises capital with the intention to purchase all or part of a non-listed company in the relatively near term. In January 2022, the AFM published an overview of the Dutch SPAC market in edition #5 of the AFM Market Watch.1 How has the Dutch SPAC market developed since then? SPAC boom has ended The notable boom of SPAC IPOs on Euronext Amsterdam slowed down significantly in 2022, as shown in Figure 1. Only two new SPACs were listed in the first half of 2022 and since then no new SPACs came to the market. While there were no traditional IPOs in 2022 (compared to nine in 2021), four SPACs listed on Euronext Amsterdam completed a business combination with a target company (also known as a ‘de-SPAC’ transaction). De-SPACs In the case of two de-SPACs, a majority of the shareholders reclaimed their invested funds from these SPACs by exercising their redemption rights. These SPACs nonetheless managed to complete the business combination by obtaining additional funding. 1 Please see edition #5 of the AFM Market Watch. The AFM has expressed its concerns that investing in SPACs is considered highly complex and has substantial risks for investors. The AFM believes investing in SPACs is only suitable for a (very) limited group of retail investors.

Market Watch, edition 8 | Algorithmic Trading 10 #8 Figure 2: Upcoming deadlines per quarter of SPACs listed on Euronext Amsterdam 0 2 4 6 10 8 Q1 2023 Q2 2023 Q3 2023 Q4 2023 Q1 2024 Q2 2024 Inside information requirements It is expected that many SPACs will try to complete a business combination in 2023. This will lead to situations in which the SPAC, like any other listed company, will need to disclose (inside) information to comply with the Market Abuse Regulation. Examples of such situations are when sponsors exclusively negotiate with a target or seek to close a business combination deal. Inside information should be disclosed as soon as possible. The AFM will thoroughly perform its task of real-time surveillance of SPACs’ price movements and press releases and will intervene if necessary. Shareholder circular Once SPACs find a suitable target, they should provide detailed information about the proposed business combination to their shareholders. This is usually presented in a so-called ‘shareholder circular’. SPACs should be aware that this document should be consistent with the information in the SPACs’ IPO prospectus and should have a level of disclosure similar to an approved prospectus.4 4 ESMA, 15 July 2021, SPACs: prospectus disclosure and investor protection considerations. However, investors should be aware that shareholder circulars are not approved by the AFM. Where SPACs do not inform investors in accordance with these requirements, the AFM has supervisory powers to intervene and impose sanctions. For more information about the Dutch SPAC market, see also edition #5 of the AFM Market Watch: AFM Market Watch | Topics AFM | AFM Professionals. More information and relevant Q&As about this topic can be found on the AFM website.

The Dutch Authority for the Financial Markets PO Box 11723 | 1001 GS Amsterdam Telephone +31 20 797 2000 www.afm.nl Data classification AFM - Publiek Follow us: The AFM is committed to promoting fair and transparent financial markets. As an independent market conduct authority, we contribute to a sustainable financial system and prosperity in the Netherlands. The text of this publication has been compiled with care and is informative in nature. No rights may be derived from it. Changes to national and international legislation and regulation may mean that the text is no longer fully up to date when you read it. The Dutch Authority for the Financial Markets is not liable for any consequences - such as losses incurred or lost profits - of any actions taken in connection with this text. © Copyright AFM 2023 Any questions or comments about this publication? Send an email to: redactie@afm.nl