https://arxiv.org/api/uj2V5jNFpHkyZSV4EwLaeNjJ0ss 2026-06-20T21:11:41Z 2263 600 15 http://arxiv.org/abs/2112.04297v3 Mathematical Model of International Trade and Global Economy 2024-04-17T15:31:19Z This work was partially supported by the Program of Fundamental Research of the Department of Physics and Astronomy of the National Academy of Sciences of Ukraine "Mathematical models of non equilibrium processes in open systems" N 0120U100857. 2021-12-08T14:12:05Z 48 pages N. S. Gonchar O. P. Dovzhyk A. S. Zhokhin W. H. Kozyrski A. P. Makhort http://arxiv.org/abs/2309.13648v2 Don't Let MEV Slip: The Costs of Swapping on the Uniswap Protocol 2024-04-17T14:12:56Z We present the first in-depth empirical characterization of the costs of trading on a decentralized exchange (DEX). Using quoted prices from the Uniswap Labs interface for two pools -- USDC-ETH (5bps) and PEPE-ETH (30bps) -- we evaluate the efficiency of trading on DEXs. Our main tool is slippage -- the difference between the realized execution price of a trade, and its quoted price -- which we breakdown into its benign and adversarial components. We also present an alternative way to quantify and identify slippage due to adversarial reordering of transactions, which we call reordering slippage, that does not require quoted prices or mempool data to calculate. We find that the composition of transaction costs varies tremendously with the trade's characteristics. Specifically, while for small swaps, gas costs dominate costs, for large swaps price-impact and slippage account for the majority of it. Moreover, when trading PEPE, a popular 'memecoin', the probability of adversarial slippage is about 80% higher than when trading a mature asset like USDC. Overall, our results provide preliminary evidence that DEXs offer a compelling trust-less alternative to centralized exchanges for trading digital assets. 2023-09-24T14:22:15Z 31 pages, 7 tables, 2 figures Austin Adams Benjamin Y Chan Sarit Markovich Xin Wan http://arxiv.org/abs/2404.09090v1 DEX Specs: A Mean Field Approach to DeFi Currency Exchanges 2024-04-13T22:09:27Z We investigate the behavior of liquidity providers (LPs) by modeling a decentralized cryptocurrency exchange (DEX) based on Uniswap v3. LPs with heterogeneous characteristics choose optimal liquidity positions subject to uncertainty regarding the size of exogenous incoming transactions and the prices of assets in the wider market. They engage in a game among themselves, and the resulting liquidity distribution determines the exchange rate dynamics and potential arbitrage opportunities of the pool. We calibrate the distribution of LP characteristics based on Uniswap data and the equilibrium strategy resulting from this mean-field game produces pool exchange rate dynamics and liquidity evolution consistent with observed pool behavior. We subsequently introduce Maximal Extractable Value (MEV) bots who perform Just-In-Time (JIT) liquidity attacks, and develop a Stackelberg game between LPs and bots. This addition results in more accurate simulated pool exchange rate dynamics and stronger predictive power regarding the evolution of the pool liquidity distribution. 2024-04-13T22:09:27Z Erhan Bayraktar Asaf Cohen April Nellis http://arxiv.org/abs/2310.14973v2 Reconciling Open Interest with Traded Volume in Perpetual Swaps 2024-04-04T17:50:17Z Perpetual swaps are derivative contracts that allow traders to speculate on, or hedge, the price movements of cryptocurrencies. Unlike futures contracts, perpetual swaps have no settlement or expiration in the traditional sense. The funding rate acts as the mechanism that tethers the perpetual swap to its underlying with the help of arbitrageurs. Open interest, in the context of perpetual swaps and derivative contracts in general, refers to the total number of outstanding contracts at a given point in time. It is a critical metric in derivatives markets as it can provide insight into market activity, sentiment and overall liquidity. It also provides a way to estimate a lower bound on the collateral required for every cryptocurrency market on an exchange. This number, cumulated across all markets on the exchange in combination with proof of reserves, can be used to gauge whether the exchange in question operates with unsustainable levels of leverage, which could have solvency implications. We find that open interest in Bitcoin perpetual swaps is systematically misquoted by some of the largest derivatives exchanges; however, the degree varies, with some exchanges reporting open interest that is wholly implausible to others that seem to be delaying messages of forced trades, i.e., liquidations. We identify these incongruities by analyzing tick-by-tick data for two time periods in $2023$ by connecting directly to seven of the most liquid cryptocurrency derivatives exchanges. 2023-10-23T14:21:26Z 10 pages, 2 figures, 5 tables Ledger, Volume 9 (2024), 1-15 Ioannis Giagkiozis Emilio Said 10.5195/ledger.2024.325 http://arxiv.org/abs/2404.08665v1 Targeted aspect-based emotion analysis to detect opportunities and precaution in financial Twitter messages 2024-03-30T16:46:25Z Microblogging platforms, of which Twitter is a representative example, are valuable information sources for market screening and financial models. In them, users voluntarily provide relevant information, including educated knowledge on investments, reacting to the state of the stock markets in real-time and, often, influencing this state. We are interested in the user forecasts in financial, social media messages expressing opportunities and precautions about assets. We propose a novel Targeted Aspect-Based Emotion Analysis (TABEA) system that can individually discern the financial emotions (positive and negative forecasts) on the different stock market assets in the same tweet (instead of making an overall guess about that whole tweet). It is based on Natural Language Processing (NLP) techniques and Machine Learning streaming algorithms. The system comprises a constituency parsing module for parsing the tweets and splitting them into simpler declarative clauses; an offline data processing module to engineer textual, numerical and categorical features and analyse and select them based on their relevance; and a stream classification module to continuously process tweets on-the-fly. Experimental results on a labelled data set endorse our solution. It achieves over 90% precision for the target emotions, financial opportunity, and precaution on Twitter. To the best of our knowledge, no prior work in the literature has addressed this problem despite its practical interest in decision-making, and we are not aware of any previous NLP nor online Machine Learning approaches to TABEA. 2024-03-30T16:46:25Z Silvia García-Méndez Francisco de Arriba-Pérez Ana Barros-Vila Francisco J. González-Castaño 10.1016/j.eswa.2023.119611 http://arxiv.org/abs/2403.00474v2 Volatility-based strategy on Chinese equity index ETF options 2024-03-29T08:17:34Z This study examines the performance of a volatility-based strategy using Chinese equity index ETF options. Initially successful, the strategy's effectiveness waned post-2018. By integrating GARCH models for volatility forecasting, the strategy's positions and exposures are dynamically adjusted. The results indicate that such an approach can enhance returns in volatile markets, suggesting potential for refined trading strategies in China's evolving derivatives landscape. The research underscores the importance of adaptive strategies in capturing market opportunities amidst changing trading dynamics. 2024-03-01T12:00:09Z Peng Yifeng http://arxiv.org/abs/2403.19781v1 Reinforcement Learning in Agent-Based Market Simulation: Unveiling Realistic Stylized Facts and Behavior 2024-03-28T19:06:50Z Investors and regulators can greatly benefit from a realistic market simulator that enables them to anticipate the consequences of their decisions in real markets. However, traditional rule-based market simulators often fall short in accurately capturing the dynamic behavior of market participants, particularly in response to external market impact events or changes in the behavior of other participants. In this study, we explore an agent-based simulation framework employing reinforcement learning (RL) agents. We present the implementation details of these RL agents and demonstrate that the simulated market exhibits realistic stylized facts observed in real-world markets. Furthermore, we investigate the behavior of RL agents when confronted with external market impacts, such as a flash crash. Our findings shed light on the effectiveness and adaptability of RL-based agents within the simulation, offering insights into their response to significant market events. 2024-03-28T19:06:50Z Accpeted in IJCNN 2024 Zhiyuan Yao Zheng Li Matthew Thomas Ionut Florescu http://arxiv.org/abs/2310.10500v2 Few-Shot Learning Patterns in Financial Time-Series for Trend-Following Strategies 2024-03-28T16:30:07Z Forecasting models for systematic trading strategies do not adapt quickly when financial market conditions rapidly change, as was seen in the advent of the COVID-19 pandemic in 2020, causing many forecasting models to take loss-making positions. To deal with such situations, we propose a novel time-series trend-following forecaster that can quickly adapt to new market conditions, referred to as regimes. We leverage recent developments from the deep learning community and use few-shot learning. We propose the Cross Attentive Time-Series Trend Network -- X-Trend -- which takes positions attending over a context set of financial time-series regimes. X-Trend transfers trends from similar patterns in the context set to make forecasts, then subsequently takes positions for a new distinct target regime. By quickly adapting to new financial regimes, X-Trend increases Sharpe ratio by 18.9% over a neural forecaster and 10-fold over a conventional Time-series Momentum strategy during the turbulent market period from 2018 to 2023. Our strategy recovers twice as quickly from the COVID-19 drawdown compared to the neural-forecaster. X-Trend can also take zero-shot positions on novel unseen financial assets obtaining a 5-fold Sharpe ratio increase versus a neural time-series trend forecaster over the same period. Furthermore, the cross-attention mechanism allows us to interpret the relationship between forecasts and patterns in the context set. 2023-10-16T15:20:12Z minor edits Kieran Wood Samuel Kessler Stephen J. Roberts Stefan Zohren 10.3905/jfds.2024.1.157 http://arxiv.org/abs/2403.18737v1 Optimal Rebalancing in Dynamic AMMs 2024-03-27T16:25:57Z Dynamic AMM pools, as found in Temporal Function Market Making, rebalance their holdings to a new desired ratio (e.g. moving from being 50-50 between two assets to being 90-10 in favour of one of them) by introducing an arbitrage opportunity that disappears when their holdings are in line with their target. Structuring this arbitrage opportunity reduces to the problem of choosing the sequence of portfolio weights the pool exposes to the market via its trading function. Linear interpolation from start weights to end weights has been used to reduce the cost paid by pools to arbitrageurs to rebalance. Here we obtain the $\textit{optimal}$ interpolation in the limit of small weight changes (which has the downside of requiring a call to a transcendental function) and then obtain a cheap-to-compute approximation to that optimal approach that gives almost the same performance improvement. We then demonstrate this method on a range of market backtests, including simulating pool performance when trading fees are present, finding that the new approximately-optimal method of changing weights gives robust increases in pool performance. For a BTC-ETH-DAI pool from July 2022 to June 2023, the increases of pool P\&L from approximately-optimal weight changes is $\sim25\%$ for a range of different strategies and trading fees. 2024-03-27T16:25:57Z 16 pages including appendix Matthew Willetts Christian Harrington http://arxiv.org/abs/2305.16915v2 When is cross impact relevant? 2024-03-26T11:17:23Z Trading pressure from one asset can move the price of another, a phenomenon referred to as cross impact. Using tick-by-tick data spanning 5 years for 500 assets listed in the United States, we identify the features that make cross-impact relevant to explain the variance of price returns. We show that price formation occurs endogenously within highly liquid assets. Then, trades in these assets influence the prices of less liquid correlated products, with an impact velocity constrained by their minimum trading frequency. We investigate the implications of such a multidimensional price formation mechanism on interest rate markets. We find that the 10-year bond future serves as the primary liquidity reservoir, influencing the prices of cash bonds and futures contracts within the interest rate curve. Such behaviour challenges the validity of the theory in Financial Economics that regards long-term rates as agents anticipations of future short term rates. 2023-05-26T13:27:27Z 17 pages, 21 figures, 1 table Victor Le Coz Iacopo Mastromatteo Damien Challet Michael Benzaquen http://arxiv.org/abs/2403.17095v1 Revisiting Boehmer et al. (2021): Recent Period, Alternative Method, Different Conclusions 2024-03-25T18:33:14Z We reassess Boehmer et al. (2021, BJZZ)'s seminal work on the predictive power of retail order imbalance (ROI) for future stock returns. First, we replicate their 2010-2015 analysis in the more recent 2016-2021 period. We find that the ROI's predictive power weakens significantly. Specifically, past ROI can no longer predict weekly returns on large-cap stocks, and the long-short strategy based on past ROI is no longer profitable. Second, we analyze the effect of using the alternative quote midpoint (QMP) method to identify and sign retail trades on their main conclusions. While the results based on the QMP method align with BJZZ's findings in 2010-2015, the two methods provide different conclusions in 2016-2021. Our study shows that BJZZ's original findings are sensitive to the sample period and the approach to identify ROIs. 2024-03-25T18:33:14Z David Ardia Clément Aymard Tolga Cenesizoglu 10.2139/ssrn.4703056 http://arxiv.org/abs/2403.15810v1 Anticipatory Gains and Event-Driven Losses in Blockchain-Based Fan Tokens: Evidence from the FIFA World Cup 2024-03-23T11:47:58Z National football teams increasingly issue tradeable blockchain-based fan tokens to strategically enhance fan engagement. This study investigates the impact of 2022 World Cup matches on the dynamic performance of each team's fan token. The event study uncovers fan token returns surged six months before the World Cup, driven by positive anticipation effects. However, intraday analysis reveals a reversal of fan token returns consistently declining and trading volumes rising as matches unfold. To explain findings, we uncover asymmetries whereby defeats in high-stake matches caused a plunge in fan token returns, compared to low-stake matches, intensifying in magnitude for knockout matches. Contrarily, victories enhance trading volumes, reflecting increased market activity without a corresponding positive effect on returns. We align findings with the classic market adage "buy the rumor, sell the news," unveiling cognitive biases and nuances in investor sentiment, cautioning the dichotomy of pre-event optimism and subsequent performance declines. 2024-03-23T11:47:58Z 31 pages, 5 tables, 1 figure Research in International Business and Finance, Volume 70, Part A, 102333 (2024) Aman Saggu Lennart Ante Ender Demir 10.1016/j.ribaf.2024.102333 http://arxiv.org/abs/2304.02472v2 Learning to Predict Short-Term Volatility with Order Flow Image Representation 2024-03-20T11:33:35Z Introduction: The paper addresses the challenging problem of predicting the short-term realized volatility of the Bitcoin price using order flow information. The inherent stochastic nature and anti-persistence of price pose difficulties in accurate prediction. Methods: To address this, we propose a method that transforms order flow data over a fixed time interval (snapshots) into images. The order flow includes trade sizes, trade directions, and limit order book, and is mapped into image colour channels. These images are then used to train both a simple 3-layer Convolutional Neural Network (CNN) and more advanced ResNet-18 and ConvMixer, with additionally supplementing them with hand-crafted features. The models are evaluated against classical GARCH, Multilayer Perceptron trained on raw data, and a naive guess method that considers current volatility as a prediction. Results: The experiments are conducted using price data from January 2021 and evaluate model performance in terms of root mean square error (RMSPE). The results show that our order flow representation with a CNN as a predictive model achieves the best performance, with an RMSPE of 0.85+/-1.1 for the model with aggregated features and 1.0+/-1.4 for the model without feature supplementation. ConvMixer with feature supplementation follows closely. In comparison, the RMSPE for the naive guess method was 1.4+/-3.0. 2023-04-04T12:32:25Z Artem Lensky Mingyu Hao http://arxiv.org/abs/2403.13429v1 Detecting and Triaging Spoofing using Temporal Convolutional Networks 2024-03-20T09:17:12Z As algorithmic trading and electronic markets continue to transform the landscape of financial markets, detecting and deterring rogue agents to maintain a fair and efficient marketplace is crucial. The explosion of large datasets and the continually changing tricks of the trade make it difficult to adapt to new market conditions and detect bad actors. To that end, we propose a framework that can be adapted easily to various problems in the space of detecting market manipulation. Our approach entails initially employing a labelling algorithm which we use to create a training set to learn a weakly supervised model to identify potentially suspicious sequences of order book states. The main goal here is to learn a representation of the order book that can be used to easily compare future events. Subsequently, we posit the incorporation of expert assessment to scrutinize specific flagged order book states. In the event of an expert's unavailability, recourse is taken to the application of a more complex algorithm on the identified suspicious order book states. We then conduct a similarity search between any new representation of the order book against the expert labelled representations to rank the results of the weak learner. We show some preliminary results that are promising to explore further in this direction 2024-03-20T09:17:12Z AAAI 2024 Workshop on AI in Finance for Social Impact Kaushalya Kularatnam Tania Stathaki http://arxiv.org/abs/2312.09353v2 Residual U-net with Self-Attention to Solve Multi-Agent Time-Consistent Optimal Trade Execution 2024-03-19T13:28:49Z In this paper, we explore the use of a deep residual U-net with self-attention to solve the the continuous time time-consistent mean variance optimal trade execution problem for multiple agents and assets. Given a finite horizon we formulate the time-consistent mean-variance optimal trade execution problem following the Almgren-Chriss model as a Hamilton-Jacobi-Bellman (HJB) equation. The HJB formulation is known to have a viscosity solution to the unknown value function. We reformulate the HJB to a backward stochastic differential equation (BSDE) to extend the problem to multiple agents and assets. We utilize a residual U-net with self-attention to numerically approximate the value function for multiple agents and assets which can be used to determine the time-consistent optimal control. In this paper, we show that the proposed neural network approach overcomes the limitations of finite difference methods. We validate our results and study parameter sensitivity. With our framework we study how an agent with significant price impact interacts with an agent without any price impact and the optimal strategies used by both types of agents. We also study the performance of multiple sellers and buyers and how they compare to a holding strategy under different economic conditions. 2023-12-14T21:29:28Z This is an initial draft of the work Andrew Na Justin Wan