nep-mst New Economics Papers
on Market Microstructure
Issue of 2023‒10‒16
four papers chosen by
Thanos Verousis

  1. Generative AI for End-to-End Limit Order Book Modelling: A Token-Level Autoregressive Generative Model of Message Flow Using a Deep State Space Network By Peer Nagy; Sascha Frey; Silvia Sapora; Kang Li; Anisoara Calinescu; Stefan Zohren; Jakob Foerster
  2. EarnHFT: Efficient Hierarchical Reinforcement Learning for High Frequency Trading By Molei Qin; Shuo Sun; Wentao Zhang; Haochong Xia; Xinrun Wang; Bo An
  3. Decentralised Finance and Automated Market Making: Predictable Loss and Optimal Liquidity Provision By \'Alvaro Cartea; Fay\c{c}al Drissi; Marcello Monga
  4. Improving Capital Efficiency and Impermanent Loss: Multi-Token Proactive Market Maker By Wayne Chen; Songwei Chen; Preston Rozwood

  1. By: Peer Nagy; Sascha Frey; Silvia Sapora; Kang Li; Anisoara Calinescu; Stefan Zohren; Jakob Foerster
    Abstract: Developing a generative model of realistic order flow in financial markets is a challenging open problem, with numerous applications for market participants. Addressing this, we propose the first end-to-end autoregressive generative model that generates tokenized limit order book (LOB) messages. These messages are interpreted by a Jax-LOB simulator, which updates the LOB state. To handle long sequences efficiently, the model employs simplified structured state-space layers to process sequences of order book states and tokenized messages. Using LOBSTER data of NASDAQ equity LOBs, we develop a custom tokenizer for message data, converting groups of successive digits to tokens, similar to tokenization in large language models. Out-of-sample results show promising performance in approximating the data distribution, as evidenced by low model perplexity. Furthermore, the mid-price returns calculated from the generated order flow exhibit a significant correlation with the data, indicating impressive conditional forecast performance. Due to the granularity of generated data, and the accuracy of the model, it offers new application areas for future work beyond forecasting, e.g. acting as a world model in high-frequency financial reinforcement learning applications. Overall, our results invite the use and extension of the model in the direction of autoregressive large financial models for the generation of high-frequency financial data and we commit to open-sourcing our code to facilitate future research.
    Date: 2023–08
  2. By: Molei Qin; Shuo Sun; Wentao Zhang; Haochong Xia; Xinrun Wang; Bo An
    Abstract: High-frequency trading (HFT) uses computer algorithms to make trading decisions in short time scales (e.g., second-level), which is widely used in the Cryptocurrency (Crypto) market (e.g., Bitcoin). Reinforcement learning (RL) in financial research has shown stellar performance on many quantitative trading tasks. However, most methods focus on low-frequency trading, e.g., day-level, which cannot be directly applied to HFT because of two challenges. First, RL for HFT involves dealing with extremely long trajectories (e.g., 2.4 million steps per month), which is hard to optimize and evaluate. Second, the dramatic price fluctuations and market trend changes of Crypto make existing algorithms fail to maintain satisfactory performance. To tackle these challenges, we propose an Efficient hieArchical Reinforcement learNing method for High Frequency Trading (EarnHFT), a novel three-stage hierarchical RL framework for HFT. In stage I, we compute a Q-teacher, i.e., the optimal action value based on dynamic programming, for enhancing the performance and training efficiency of second-level RL agents. In stage II, we construct a pool of diverse RL agents for different market trends, distinguished by return rates, where hundreds of RL agents are trained with different preferences of return rates and only a tiny fraction of them will be selected into the pool based on their profitability. In stage III, we train a minute-level router which dynamically picks a second-level agent from the pool to achieve stable performance across different markets. Through extensive experiments in various market trends on Crypto markets in a high-fidelity simulation trading environment, we demonstrate that EarnHFT significantly outperforms 6 state-of-art baselines in 6 popular financial criteria, exceeding the runner-up by 30% in profitability.
    Date: 2023–09
  3. By: \'Alvaro Cartea; Fay\c{c}al Drissi; Marcello Monga
    Abstract: Constant product markets with concentrated liquidity (CL) are the most popular type of automated market makers. In this paper, we characterise the continuous-time wealth dynamics of strategic LPs who dynamically adjust their range of liquidity provision in CL pools. Their wealth results from fee income and the value of their holdings in the pool. Next, we derive a self-financing and closed-form optimal liquidity provision strategy where the width of the LP's liquidity range is determined by the profitability of the pool (provision fees minus gas fees), the predictable losses (PL) of the LP's position, and concentration risk. Concentration risk refers to the decrease in fee revenue if the marginal exchange rate (akin to the midprice in a limit order book) in the pool exits the LP's range of liquidity. When the marginal rate is driven by a stochastic drift, we show how to optimally skew the range of liquidity to increase fee revenue and profit from the expected changes in the marginal rate. Finally, we use Uniswap v3 data to show that, on average, LPs have traded at a significant loss, and to show that the out-of-sample performance of our strategy is superior to the historical performance of LPs in the pool we consider.
    Date: 2023–09
  4. By: Wayne Chen; Songwei Chen; Preston Rozwood
    Abstract: Current approaches to the cryptocurrency automated market makers result in poor impermanent loss and fragmented liquidity. We focus on the development and analysis of a multi-token proactive market maker (MPMM). MPMM is an extension of the proactive market maker (PMM) introduced by DODO Exchange, which generalizes the constant product market maker (CPMM) and allows for adjustments to the pricing curve's ``flatness" and equilibrium points. We analyze these mechanics as used in both PMM and MPMM and demonstrate via simulation that MPMM significantly improves capital efficiency and price impact compared to its 2-token pool counterparts as well as their multi-token pool generalizations. Furthermore, in typical market conditions, MPMM also combats impermanent loss more effectively than other market maker variants. Overall, this research highlights the advantages multi-token market makers have over pairwise-token models, and poses a novel market making algorithm. The findings provide valuable insights for designing market makers that optimize capital efficiency and mitigate risks in decentralized finance ecosystems.
    Date: 2023–08

This nep-mst issue is ©2023 by Thanos Verousis. It is provided as is without any express or implied warranty. It may be freely redistributed in whole or in part for any purpose. If distributed in part, please include this notice.
General information on the NEP project can be found at For comments please write to the director of NEP, Marco Novarese at <>. Put “NEP” in the subject, otherwise your mail may be rejected.
NEP’s infrastructure is sponsored by the School of Economics and Finance of Massey University in New Zealand.