https://arxiv.org/api/R/UwpHtwv3ahW9zwzsFc4iKvzxs 2026-06-21T02:43:45Z 2263 675 15 http://arxiv.org/abs/2311.02088v1 Combining Deep Learning on Order Books with Reinforcement Learning for Profitable Trading 2023-10-24T15:58:58Z High-frequency trading is prevalent, where automated decisions must be made quickly to take advantage of price imbalances and patterns in price action that forecast near-future movements. While many algorithms have been explored and tested, analytical methods fail to harness the whole nature of the market environment by focusing on a limited domain. With the evergrowing machine learning field, many large-scale end-to-end studies on raw data have been successfully employed to increase the domain scope for profitable trading but are very difficult to replicate. Combining deep learning on the order books with reinforcement learning is one way of breaking down large-scale end-to-end learning into more manageable and lightweight components for reproducibility, suitable for retail trading. The following work focuses on forecasting returns across multiple horizons using order flow imbalance and training three temporal-difference learning models for five financial instruments to provide trading signals. The instruments used are two foreign exchange pairs (GBPUSD and EURUSD), two indices (DE40 and FTSE100), and one commodity (XAUUSD). The performances of these 15 agents are evaluated through backtesting simulation, and successful models proceed through to forward testing on a retail trading platform. The results prove potential but require further minimal modifications for consistently profitable trading to fully handle retail trading costs, slippage, and spread fluctuation. 2023-10-24T15:58:58Z Koti S. Jaddu Paul A. Bilokon http://arxiv.org/abs/2310.15082v1 Cognitive Energy Cost of Informed Decisions 2023-10-23T16:44:37Z Time irreversibility in neuronal dynamics has recently been demonstrated to correlate with various indicators of cognitive effort in living systems. Using Landauer's principle, which posits that time-irreversible information processing consumes energy, we establish a thermodynamically consistent measure of cognitive energy cost associated with belief dynamics. We utilize this concept to analyze a two-armed bandit game, a standard decision-making framework under uncertainty, considering exploitation, finite memory, and concurrent allocation to both game options or arms. Through exploitative, prediction-error-based belief dynamics, the decision maker incurs a cognitive energy cost. Initially, we observe the rise of dissipative structures in the steady state of the belief space due to time-reversal symmetry breaking at intermediate exploitative levels. To delve deeper into the belief dynamics, we liken it to the behavior of an active particle subjected to state-dependent noise. This analogy enables us to relate emergent risk aversion to standard thermophoresis, connecting two apparently unrelated concepts. Finally, we numerically compute the time irreversibility of belief dynamics in the steady state, revealing a strong correlation between elevated - yet optimized - cognitive energy cost and optimal decision-making outcomes. This correlation suggests a mechanism for the evolution of living systems towards maximally out-of-equilibrium structures. 2023-10-23T16:44:37Z Michele Vodret http://arxiv.org/abs/2310.14320v1 Analysis of the RMM-01 Market Maker 2023-10-22T14:48:28Z Constant function market makers(CFMMS) are a popular market design for decentralized exchanges(DEX). Liquidity providers(LPs) supply the CFMMs with assets to enable trades. In exchange for providing this liquidity, an LP receives a token that replicates a payoff determined by the trading function used by the CFMM. In this paper, we study a time-dependent CFMM called RMM-01. The trading function for RMM-01 is chosen such that LPs recover the payoff of a Black--Scholes priced covered call. First, we introduce the general framework for CFMMs. After, we analyze the pricing properties of RMM-01. This includes the cost of price manipulation and the corresponding implications on arbitrage. Our first primary contribution is from examining the time-varying price properties of RMM-01 and determining parameter bounds when RMM-01 has a more stable price than Uniswap. Finally, we discuss combining lending protocols with RMM-01 to achieve other option payoffs which is our other primary contribution. 2023-10-22T14:48:28Z Waylon Jepsen Colin Roberts http://arxiv.org/abs/2206.00648v2 PreBit -- A multimodal model with Twitter FinBERT embeddings for extreme price movement prediction of Bitcoin 2023-10-21T10:45:31Z Bitcoin, with its ever-growing popularity, has demonstrated extreme price volatility since its origin. This volatility, together with its decentralised nature, make Bitcoin highly subjective to speculative trading as compared to more traditional assets. In this paper, we propose a multimodal model for predicting extreme price fluctuations. This model takes as input a variety of correlated assets, technical indicators, as well as Twitter content. In an in-depth study, we explore whether social media discussions from the general public on Bitcoin have predictive power for extreme price movements. A dataset of 5,000 tweets per day containing the keyword `Bitcoin' was collected from 2015 to 2021. This dataset, called PreBit, is made available online. In our hybrid model, we use sentence-level FinBERT embeddings, pretrained on financial lexicons, so as to capture the full contents of the tweets and feed it to the model in an understandable way. By combining these embeddings with a Convolutional Neural Network, we built a predictive model for significant market movements. The final multimodal ensemble model includes this NLP model together with a model based on candlestick data, technical indicators and correlated asset prices. In an ablation study, we explore the contribution of the individual modalities. Finally, we propose and backtest a trading strategy based on the predictions of our models with varying prediction threshold and show that it can used to build a profitable trading strategy with a reduced risk over a `hold' or moving average strategy. 2022-05-30T19:25:12Z 21 pages, submitted preprint to Elsevier Expert Systems with Applications Expert Systems with Applications, 233, 120838 (2023) Yanzhao Zou Dorien Herremans 10.1016/j.eswa.2023.120838 http://arxiv.org/abs/1812.00595v4 Building Trust Takes Time: Limits to Arbitrage for Blockchain-Based Assets 2023-10-19T15:01:43Z A blockchain replaces central counterparties with time-consuming consensus protocols to record the transfer of ownership. This settlement latency slows cross-exchange trading, exposing arbitrageurs to price risk. Off-chain settlement, instead, exposes arbitrageurs to costly default risk. We show with Bitcoin network and order book data that cross-exchange price differences coincide with periods of high settlement latency, asset flows chase arbitrage opportunities, and price differences across exchanges with low default risk are smaller. Blockchain-based trading thus faces a dilemma: Reliable consensus protocols require time-consuming settlement latency, leading to arbitrage limits. Circumventing such arbitrage costs is possible only by reinstalling trusted intermediation, which mitigates default risk. 2018-12-03T08:14:01Z This paper replaces an earlier draft titled "Limits to Arbitrage in Markets with Stochastic Settlement Latency". 49 pages, 2 figures, 7 tables Nikolaus Hautsch Christoph Scheuch Stefan Voigt http://arxiv.org/abs/2306.16522v2 The Implied Views of Bond Traders on the Spot Equity Market 2023-10-17T19:57:28Z This study delves into the temporal dynamics within the equity market through the lens of bond traders. Recognizing that the riskless interest rate fluctuates over time, we leverage the Black-Derman-Toy model to trace its temporal evolution. To gain insights from a bond trader's perspective, we focus on a specific type of bond: the zero-coupon bond. This paper introduces a pricing algorithm for this bond and presents a formula that can be used to ascertain its real value. By crafting an equation that juxtaposes the theoretical value of a zero-coupon bond with its actual value, we can deduce the risk-neutral probability. It is noteworthy that the risk-neutral probability correlates with variables like the instantaneous mean return, instantaneous volatility, and inherent upturn probability in the equity market. Examining these relationships enables us to discern the temporal shifts in these parameters. Our findings suggest that the mean starts at a negative value, eventually plateauing at a consistent level. The volatility, on the other hand, initially has a minimal positive value, peaks swiftly, and then stabilizes. Lastly, the upturn probability is initially significantly high, plunges rapidly, and ultimately reaches equilibrium. 2023-06-28T19:34:46Z 15 pages, 4 figures Yifan He Yuan Hu Svetlozar Rachev http://arxiv.org/abs/2310.09621v1 Prime Match: A Privacy-Preserving Inventory Matching System 2023-10-14T17:03:44Z Inventory matching is a standard mechanism/auction for trading financial stocks by which buyers and sellers can be paired. In the financial world, banks often undertake the task of finding such matches between their clients. The related stocks can be traded without adversely impacting the market price for either client. If matches between clients are found, the bank can offer the trade at advantageous rates. If no match is found, the parties have to buy or sell the stock in the public market, which introduces additional costs. A problem with the process as it is presently conducted is that the involved parties must share their order to buy or sell a particular stock, along with the intended quantity (number of shares), to the bank. Clients worry that if this information were to leak somehow, then other market participants would become aware of their intentions and thus cause the price to move adversely against them before their transaction finalizes. We provide a solution, Prime Match, that enables clients to match their orders efficiently with reduced market impact while maintaining privacy. In the case where there are no matches, no information is revealed. Our main cryptographic innovation is a two-round secure linear comparison protocol for computing the minimum between two quantities without preprocessing and with malicious security, which can be of independent interest. We report benchmarks of our Prime Match system, which runs in production and is adopted by J.P. Morgan. The system is designed utilizing a star topology network, which provides clients with a centralized node (the bank) as an alternative to the idealized assumption of point-to-point connections, which would be impractical and undesired for the clients to implement in reality. Prime Match is the first secure multiparty computation solution running live in the traditional financial world. 2023-10-14T17:03:44Z 27 pages, 7 figures, USENIX Security 2023 Prime match: A privacy-preserving inventory matching system. In Joseph A. Calandrino and Carmela Troncoso, editors, 32nd USENIX Security Symposium, USENIX Security 2023, Anaheim, CA, USA, August 9-11, 2023. USENIX Association, 2023 Antigoni Polychroniadou Gilad Asharov Benjamin Diamond Tucker Balch Hans Buehler Richard Hua Suwen Gu Greg Gimler Manuela Veloso http://arxiv.org/abs/2310.09273v1 Uncovering Market Disorder and Liquidity Trends Detection 2023-10-13T17:36:49Z The primary objective of this paper is to conceive and develop a new methodology to detect notable changes in liquidity within an order-driven market. We study a market liquidity model which allows us to dynamically quantify the level of liquidity of a traded asset using its limit order book data. The proposed metric holds potential for enhancing the aggressiveness of optimal execution algorithms, minimizing market impact and transaction costs, and serving as a reliable indicator of market liquidity for market makers. As part of our approach, we employ Marked Hawkes processes to model trades-through which constitute our liquidity proxy. Subsequently, our focus lies in accurately identifying the moment when a significant increase or decrease in its intensity takes place. We consider the minimax quickest detection problem of unobservable changes in the intensity of a doubly-stochastic Poisson process. The goal is to develop a stopping rule that minimizes the robust Lorden criterion, measured in terms of the number of events until detection, for both worst-case delay and false alarm constraint. We prove our procedure's optimality in the case of a Cox process with simultaneous jumps, while considering a finite time horizon. Finally, this novel approach is empirically validated by means of real market data analyses. 2023-10-13T17:36:49Z Etienne Chevalier Yadh Hafsi Vathana Ly Vath http://arxiv.org/abs/2211.13777v3 The Short-Term Predictability of Returns in Order Book Markets: a Deep Learning Perspective 2023-10-08T20:07:02Z In this paper, we conduct a systematic large-scale analysis of order book-driven predictability in high-frequency returns by leveraging deep learning techniques. First, we introduce a new and robust representation of the order book, the volume representation. Next, we carry out an extensive empirical experiment to address various questions regarding predictability. We investigate if and how far ahead there is predictability, the importance of a robust data representation, the advantages of multi-horizon modeling, and the presence of universal trading patterns. We use model confidence sets, which provide a formalized statistical inference framework particularly well suited to answer these questions. Our findings show that at high frequencies predictability in mid-price returns is not just present, but ubiquitous. The performance of the deep learning models is strongly dependent on the choice of order book representation, and in this respect, the volume representation appears to have multiple practical advantages. 2022-11-24T19:46:28Z Lorenzo Lucchese Mikko Pakkanen Almut Veraart http://arxiv.org/abs/2206.03772v3 Reducing Obizhaeva-Wang type trade execution problems to LQ stochastic control problems 2023-09-28T11:33:28Z We start with a stochastic control problem where the control process is of finite variation (possibly with jumps) and acts as integrator both in the state dynamics and in the target functional. Problems of such type arise in the stream of literature on optimal trade execution pioneered by Obizhaeva and Wang (models with finite resilience). We consider a general framework where the price impact and the resilience are stochastic processes. Both are allowed to have diffusive components. First we continuously extend the problem from processes of finite variation to progressively measurable processes. Then we reduce the extended problem to a linear quadratic (LQ) stochastic control problem. Using the well developed theory on LQ problems we describe the solution to the obtained LQ one and trace it back up to the solution to the (extended) initial trade execution problem. Finally, we illustrate our results by several examples. Among other things the examples show the Obizhaeva-Wang model with random (terminal and moving) targets, the necessity to extend the initial trade execution problem to a reasonably large class of progressively measurable processes (even going beyond semimartingales) and the effects of diffusive components in the price impact process and/or in the resilience process. 2022-06-08T09:40:05Z 45 pages; to appear in Finance and Stochastics Julia Ackermann Thomas Kruse Mikhail Urusov http://arxiv.org/abs/2309.15767v1 Implementing portfolio risk management and hedging in practice 2023-09-27T16:36:26Z In academic literature portfolio risk management and hedging are often versed in the language of stochastic control and Hamilton--Jacobi--Bellman~(HJB) equations in continuous time. In practice the continuous-time framework of stochastic control may be undesirable for various business reasons. In this work we present a straightforward approach for thinking of cross-asset portfolio risk management and hedging, providing some implementation details, while rarely venturing outside the convex optimisation setting of (approximate) quadratic programming~(QP). We pay particular attention to the correspondence between the economic concepts and their mathematical representations; the abstractions enabling us to handle multiple asset classes and risk models at once; the dimensional analysis of the resulting equations; and the assumptions inherent in our derivations. We demonstrate how to solve the resulting QPs with CVXOPT. 2023-09-27T16:36:26Z Paul Alexander Bilokon http://arxiv.org/abs/2309.15640v1 Hedging Properties of Algorithmic Investment Strategies using Long Short-Term Memory and Time Series models for Equity Indices 2023-09-27T13:18:39Z This paper proposes a novel approach to hedging portfolios of risky assets when financial markets are affected by financial turmoils. We introduce a completely novel approach to diversification activity not on the level of single assets but on the level of ensemble algorithmic investment strategies (AIS) built based on the prices of these assets. We employ four types of diverse theoretical models (LSTM - Long Short-Term Memory, ARIMA-GARCH - Autoregressive Integrated Moving Average - Generalized Autoregressive Conditional Heteroskedasticity, momentum, and contrarian) to generate price forecasts, which are then used to produce investment signals in single and complex AIS. In such a way, we are able to verify the diversification potential of different types of investment strategies consisting of various assets (energy commodities, precious metals, cryptocurrencies, or soft commodities) in hedging ensemble AIS built for equity indices (S&P 500 index). Empirical data used in this study cover the period between 2004 and 2022. Our main conclusion is that LSTM-based strategies outperform the other models and that the best diversifier for the AIS built for the S&P 500 index is the AIS built for Bitcoin. Finally, we test the LSTM model for a higher frequency of data (1 hour). We conclude that it outperforms the results obtained using daily data. 2023-09-27T13:18:39Z 19 pages, 5 figures Jakub Michańków Paweł Sakowski Robert Ślepaczuk http://arxiv.org/abs/2309.14615v1 Gray-box Adversarial Attack of Deep Reinforcement Learning-based Trading Agents 2023-09-26T02:07:26Z In recent years, deep reinforcement learning (Deep RL) has been successfully implemented as a smart agent in many systems such as complex games, self-driving cars, and chat-bots. One of the interesting use cases of Deep RL is its application as an automated stock trading agent. In general, any automated trading agent is prone to manipulations by adversaries in the trading environment. Thus studying their robustness is vital for their success in practice. However, typical mechanism to study RL robustness, which is based on white-box gradient-based adversarial sample generation techniques (like FGSM), is obsolete for this use case, since the models are protected behind secure international exchange APIs, such as NASDAQ. In this research, we demonstrate that a "gray-box" approach for attacking a Deep RL-based trading agent is possible by trading in the same stock market, with no extra access to the trading agent. In our proposed approach, an adversary agent uses a hybrid Deep Neural Network as its policy consisting of Convolutional layers and fully-connected layers. On average, over three simulated trading market configurations, the adversary policy proposed in this research is able to reduce the reward values by 214.17%, which results in reducing the potential profits of the baseline by 139.4%, ensemble method by 93.7%, and an automated trading software developed by our industrial partner by 85.5%, while consuming significantly less budget than the victims (427.77%, 187.16%, and 66.97%, respectively). 2023-09-26T02:07:26Z Foozhan Ataiefard Hadi Hemmati http://arxiv.org/abs/2309.14334v1 Tasks Makyth Models: Machine Learning Assisted Surrogates for Tipping Points 2023-09-25T17:58:23Z We present a machine learning (ML)-assisted framework bridging manifold learning, neural networks, Gaussian processes, and Equation-Free multiscale modeling, for (a) detecting tipping points in the emergent behavior of complex systems, and (b) characterizing probabilities of rare events (here, catastrophic shifts) near them. Our illustrative example is an event-driven, stochastic agent-based model (ABM) describing the mimetic behavior of traders in a simple financial market. Given high-dimensional spatiotemporal data -- generated by the stochastic ABM -- we construct reduced-order models for the emergent dynamics at different scales: (a) mesoscopic Integro-Partial Differential Equations (IPDEs); and (b) mean-field-type Stochastic Differential Equations (SDEs) embedded in a low-dimensional latent space, targeted to the neighborhood of the tipping point. We contrast the uses of the different models and the effort involved in learning them. 2023-09-25T17:58:23Z 29 pages, 8 figures, 6 tables Gianluca Fabiani Nikolaos Evangelou Tianqi Cui Juan M. Bello-Rivas Cristina P. Martin-Linares Constantinos Siettos Ioannis G. Kevrekidis http://arxiv.org/abs/2301.08688v2 Asynchronous Deep Double Duelling Q-Learning for Trading-Signal Execution in Limit Order Book Markets 2023-09-25T15:57:24Z We employ deep reinforcement learning (RL) to train an agent to successfully translate a high-frequency trading signal into a trading strategy that places individual limit orders. Based on the ABIDES limit order book simulator, we build a reinforcement learning OpenAI gym environment and utilise it to simulate a realistic trading environment for NASDAQ equities based on historic order book messages. To train a trading agent that learns to maximise its trading return in this environment, we use Deep Duelling Double Q-learning with the APEX (asynchronous prioritised experience replay) architecture. The agent observes the current limit order book state, its recent history, and a short-term directional forecast. To investigate the performance of RL for adaptive trading independently from a concrete forecasting algorithm, we study the performance of our approach utilising synthetic alpha signals obtained by perturbing forward-looking returns with varying levels of noise. Here, we find that the RL agent learns an effective trading strategy for inventory management and order placing that outperforms a heuristic benchmark trading strategy having access to the same signal. 2023-01-20T17:19:18Z Front. Artif. Intell., 25 September 2023 Sec. Artificial Intelligence in Finance Volume 6 - 2023 Peer Nagy Jan-Peter Calliess Stefan Zohren 10.3389/frai.2023.1151003