https://arxiv.org/api/F8rM1mKUrlVSLQKOE/dN1qaK1Eg2026-06-20T23:12:59Z226363015http://arxiv.org/abs/2303.16266v3On-line reinforcement learning for optimization of real-life energy trading strategy2024-02-14T15:34:10ZAn increasing share of energy is produced from renewable sources by many small producers. The efficiency of those sources is volatile and, to some extent, random, exacerbating the problem of energy market balancing. In many countries, this balancing is done on the day-ahead (DA) energy markets. This paper considers automated trading on the DA energy market by a medium-sized prosumer. We model this activity as a Markov Decision Process and formalize a framework in which an applicable in real-life strategy can be optimized with off-line data. We design a trading strategy that is fed with the available environmental information that can impact future prices, including weather forecasts. We use state-of-the-art reinforcement learning (RL) algorithms to optimize this strategy. For comparison, we also synthesize simple parametric trading strategies and optimize them with an evolutionary algorithm. Results show that our RL-based strategy generates the highest market profits.2023-03-28T19:27:02ZŁukasz LepakPaweł Wawrzyńskihttp://arxiv.org/abs/2402.09129v1Optimal Automated Market Makers: Differentiable Economics and Strong Duality2024-02-14T12:27:54ZThe role of a market maker is to simultaneously offer to buy and sell quantities of goods, often a financial asset such as a share, at specified prices. An automated market maker (AMM) is a mechanism that offers to trade according to some predetermined schedule; the best choice of this schedule depends on the market maker's goals. The literature on the design of AMMs has mainly focused on prediction markets with the goal of information elicitation. More recent work motivated by DeFi has focused instead on the goal of profit maximization, but considering only a single type of good (traded with a numeraire), including under adverse selection (Milionis et al. 2022). Optimal market making in the presence of multiple goods, including the possibility of complex bundling behavior, is not well understood. In this paper, we show that finding an optimal market maker is dual to an optimal transport problem, with specific geometric constraints on the transport plan in the dual. We show that optimal mechanisms for multiple goods and under adverse selection can take advantage of bundling, both improved prices for bundled purchases and sales as well as sometimes accepting payment "in kind." We present conjectures of optimal mechanisms in additional settings which show further complex behavior. From a methodological perspective, we make essential use of the tools of differentiable economics to generate conjectures of optimal mechanisms, and give a proof-of-concept for the use of such tools in guiding theoretical investigations.2024-02-14T12:27:54ZMichael J. CurryZhou FanDavid C. Parkeshttp://arxiv.org/abs/2402.08233v1End-to-End Policy Learning of a Statistical Arbitrage Autoencoder Architecture2024-02-13T05:53:00ZIn Statistical Arbitrage (StatArb), classical mean reversion trading strategies typically hinge on asset-pricing or PCA based models to identify the mean of a synthetic asset. Once such a (linear) model is identified, a separate mean reversion strategy is then devised to generate a trading signal. With a view of generalising such an approach and turning it truly data-driven, we study the utility of Autoencoder architectures in StatArb. As a first approach, we employ a standard Autoencoder trained on US stock returns to derive trading strategies based on the Ornstein-Uhlenbeck (OU) process. To further enhance this model, we take a policy-learning approach and embed the Autoencoder network into a neural network representation of a space of portfolio trading policies. This integration outputs portfolio allocations directly and is end-to-end trainable by backpropagation of the risk-adjusted returns of the neural policy. Our findings demonstrate that this innovative end-to-end policy learning approach not only simplifies the strategy development process, but also yields superior gross returns over its competitors illustrating the potential of end-to-end training over classical two-stage approaches.2024-02-13T05:53:00Z11 pages, 1 figureFabian KrauseJan-Peter Calliesshttp://arxiv.org/abs/2309.03202v3Evaluation of Reinforcement Learning Techniques for Trading on a Diverse Portfolio2024-02-10T23:14:06ZThis work seeks to answer key research questions regarding the viability of reinforcement learning over the S&P 500 index. The on-policy techniques of Value Iteration (VI) and State-action-reward-state-action (SARSA) are implemented along with the off-policy technique of Q-Learning. The models are trained and tested on a dataset comprising multiple years of stock market data from 2000-2023. The analysis presents the results and findings from training and testing the models using two different time periods: one including the COVID-19 pandemic years and one excluding them. The results indicate that including market data from the COVID-19 period in the training dataset leads to superior performance compared to the baseline strategies. During testing, the on-policy approaches (VI and SARSA) outperform Q-learning, highlighting the influence of bias-variance tradeoff and the generalization capabilities of simpler policies. However, it is noted that the performance of Q-learning may vary depending on the stability of future market conditions. Future work is suggested, including experiments with updated Q-learning policies during testing and trading diverse individual stocks. Additionally, the exploration of alternative economic indicators for training the models is proposed.2023-06-28T22:39:14ZCourse project not to be posted onlineIshan S. KhareTarun K. MartheswaranAkshana Dassanaike-Pererahttp://arxiv.org/abs/2309.07708v2Market-GAN: Adding Control to Financial Market Data Generation with Semantic Context2024-02-10T07:30:39ZFinancial simulators play an important role in enhancing forecasting accuracy, managing risks, and fostering strategic financial decision-making. Despite the development of financial market simulation methodologies, existing frameworks often struggle with adapting to specialized simulation context. We pinpoint the challenges as i) current financial datasets do not contain context labels; ii) current techniques are not designed to generate financial data with context as control, which demands greater precision compared to other modalities; iii) the inherent difficulties in generating context-aligned, high-fidelity data given the non-stationary, noisy nature of financial data. To address these challenges, our contributions are: i) we proposed the Contextual Market Dataset with market dynamics, stock ticker, and history state as context, leveraging a market dynamics modeling method that combines linear regression and Dynamic Time Warping clustering to extract market dynamics; ii) we present Market-GAN, a novel architecture incorporating a Generative Adversarial Networks (GAN) for the controllable generation with context, an autoencoder for learning low-dimension features, and supervisors for knowledge transfer; iii) we introduce a two-stage training scheme to ensure that Market-GAN captures the intrinsic market distribution with multiple objectives. In the pertaining stage, with the use of the autoencoder and supervisors, we prepare the generator with a better initialization for the adversarial training stage. We propose a set of holistic evaluation metrics that consider alignment, fidelity, data usability on downstream tasks, and market facts. We evaluate Market-GAN with the Dow Jones Industrial Average data from 2000 to 2023 and showcase superior performance in comparison to 4 state-of-the-art time-series generative models.2023-09-14T13:42:27ZAccepted to the 38th Annual AAAI Conference on Artificial Intelligence (AAAI24), Vancouver, British Columbia, 2024Haochong XiaShuo SunXinrun WangBo Anhttp://arxiv.org/abs/2402.06731v1Closed-form solutions for generic N-token AMM arbitrage2024-02-09T19:02:26ZConvex optimisation has provided a mechanism to determine arbitrage trades on automated market markets (AMMs) since almost their inception. Here we outline generic closed-form solutions for $N$-token geometric mean market maker pool arbitrage, that in simulation (with synthetic and historic data) provide better arbitrage opportunities than convex optimisers and is able to capitalise on those opportunities sooner. Furthermore, the intrinsic parallelism of the proposed approach (unlike convex optimisation) offers the ability to scale on GPUs, opening up a new approach to AMM modelling by offering an alternative to numerical-solver-based methods. The lower computational cost of running this new mechanism can also enable on-chain arbitrage bots for multi-asset pools.2024-02-09T19:02:26Z6 pages plus appendixMatthew WillettsChristian Harringtonhttp://arxiv.org/abs/2403.18831v1DeepTraderX: Challenging Conventional Trading Strategies with Deep Learning in Multi-Threaded Market Simulations2024-02-06T14:20:51ZIn this paper, we introduce DeepTraderX (DTX), a simple Deep Learning-based trader, and present results that demonstrate its performance in a multi-threaded market simulation. In a total of about 500 simulated market days, DTX has learned solely by watching the prices that other strategies produce. By doing this, it has successfully created a mapping from market data to quotes, either bid or ask orders, to place for an asset. Trained on historical Level-2 market data, i.e., the Limit Order Book (LOB) for specific tradable assets, DTX processes the market state $S$ at each timestep $T$ to determine a price $P$ for market orders. The market data used in both training and testing was generated from unique market schedules based on real historic stock market data. DTX was tested extensively against the best strategies in the literature, with its results validated by statistical analysis. Our findings underscore DTX's capability to rival, and in many instances, surpass, the performance of public-domain traders, including those that outclass human traders, emphasising the efficiency of simple models, as this is required to succeed in intricate multi-threaded simulations. This highlights the potential of leveraging "black-box" Deep Learning systems to create more efficient financial markets.2024-02-06T14:20:51Z11 pages, 9 png figures, uses apalike.sty and SCITEPRESS.sty, to be published in the proceedings of ICAART 2024In Proceedings of the 16th International Conference on Agents and Artificial Intelligence - Volume 3, ISBN 978-989-758-680-4, ISSN 2184-433X, pages 412-421 (2024)Armand Mihai Cismaru10.5220/0000183700003636http://arxiv.org/abs/2401.14199v2MTRGL:Effective Temporal Correlation Discerning through Multi-modal Temporal Relational Graph Learning2024-02-06T01:43:58ZIn this study, we explore the synergy of deep learning and financial market applications, focusing on pair trading. This market-neutral strategy is integral to quantitative finance and is apt for advanced deep-learning techniques. A pivotal challenge in pair trading is discerning temporal correlations among entities, necessitating the integration of diverse data modalities. Addressing this, we introduce a novel framework, Multi-modal Temporal Relation Graph Learning (MTRGL). MTRGL combines time series data and discrete features into a temporal graph and employs a memory-based temporal graph neural network. This approach reframes temporal correlation identification as a temporal graph link prediction task, which has shown empirical success. Our experiments on real-world datasets confirm the superior performance of MTRGL, emphasizing its promise in refining automated pair trading strategies.2024-01-25T14:21:14ZJunwei SuShan WuJinhui Lihttp://arxiv.org/abs/2401.02378v2Opinion formation in the world trade network2024-02-05T13:45:47ZWe extend the opinion formation approach to probe the world influence of economical organizations. Our opinion formation model mimics a battle between currencies within the international trade network. Based on the United Nations Comtrade database, we construct the world trade network for the years of the last decade from 2010 to 2020. We consider different core groups constituted by countries preferring to trade in a specific currency. We will consider principally two core groups, namely, 5 Anglo-Saxon countries which prefer to trade in US dollar and the 11 BRICS+ which prefer to trade in a hypothetical currency, hereafter called BRI, pegged to their economies. We determine the trade currency preference of the other countries via a Monte Carlo process depending on the direct transactions between the countries. The results obtained in the frame of this mathematical model show that starting from year 2014 the majority of the world countries would have preferred to trade in BRI than USD. The Monte Carlo process reaches a steady state with 3 distinct groups: two groups of countries preferring, whatever is the initial distribution of the trade currency preferences, to trade, one in BRI and the other in USD, and a third group of countries swinging as a whole between USD and BRI depending on the initial distribution of the trade currency preferences. We also analyze the battle between USD, EUR and BRI, and present the reduced Google matrix description of the trade relations between the Anglo-Saxon countries and the BRICS+.2024-01-04T17:38:15Z16 pages, 19 figures (including 9 figures present in Appendix section) and 1 tableCoquidé C., Lages J. and Shepelyansky D.L., Opinion formation in the world trade network. Entropy 2024, 26(2), 141Célestin CoquidéJosé LagesDima L. Shepelyansky10.3390/e26020141http://arxiv.org/abs/2209.04001v3Optimal Bubble Riding: A Mean Field Game with Varying Entry Times2024-01-31T20:22:06ZRecent financial bubbles such as the emergence of cryptocurrencies and "meme stocks" have gained increasing attention from both retail and institutional investors. In this paper, we propose a game-theoretic model on optimal liquidation in the presence of an asset bubble. Our setup allows the influx of players to fuel the price of the asset. Moreover, traders will enter the market at possibly different times and take advantage of the uptrend at the risk of an inevitable crash. In particular, we consider two types of crashes: an endogenous burst which results from excessive selling, and an exogenous burst which cannot be anticipated and is independent from the actions of the traders.
The popularity of asset bubbles suggests a large-population setting, which naturally leads to a mean field game (MFG) formulation. We introduce a class of MFGs with varying entry times. In particular, an equilibrium will depend on the entry-weighted average of conditional optimal strategies. To incorporate the exogenous burst time, we adopt the method of progressive enlargement of filtrations. We prove existence of MFG equilibria using the weak formulation in a generalized setup, and we show that the equilibrium strategy can be decomposed into before-and-after-burst segments, each part containing only the market information. We also perform numerical simulations of the solution, which allow us to provide some intriguing results on the relationship between the bubble burst and equilibrium strategies.2022-09-08T18:52:18Z54 pages, 3 figuresLudovic TangpiShichun Wanghttp://arxiv.org/abs/2312.14903v2Scalable Agent-Based Modeling for Complex Financial Market Simulations2024-01-31T10:25:38ZIn this study, we developed a computational framework for simulating large-scale agent-based financial markets. Our platform supports trading multiple simultaneous assets and leverages distributed computing to scale the number and complexity of simulated agents. Heterogeneous agents make decisions in parallel, and their orders are processed through a realistic, continuous double auction matching engine. We present a baseline model implementation and show that it captures several known statistical properties of real financial markets (i.e., stylized facts). Further, we demonstrate these results without fitting models to historical financial data. Thus, this framework could be used for direct applications such as human-in-the-loop machine learning or to explore theoretically exciting questions about market microstructure's role in forming the statistical regularities of real markets. To the best of our knowledge, this study is the first to implement multiple assets, parallel agent decision-making, a continuous double auction mechanism, and intelligent agent types in a scalable real-time environment.2023-12-22T18:29:07ZAaron WheelerJeffrey D. Varnerhttp://arxiv.org/abs/2401.14761v1ESG driven pairs algorithm for sustainable trading: Analysis from the Indian market2024-01-26T10:37:23ZThis paper proposes an algorithmic trading framework integrating Environmental, Social, and Governance (ESG) ratings with a pairs trading strategy. It addresses the demand for socially responsible investment solutions by developing a unique algorithm blending ESG data with methods for identifying co-integrated stocks. This allows selecting profitable pairs adhering to ESG principles. Further, it incorporates technical indicators for optimal trade execution within this sustainability framework. Extensive back-testing provides evidence of the model's effectiveness, consistently generating positive returns exceeding conventional pairs trading strategies, while upholding ESG principles. This paves the way for a transformative approach to algorithmic trading, offering insights for investors, policymakers, and academics.2024-01-26T10:37:23ZEeshaan DuttaSarthak DiwanSiddhartha P. Chakrabartyhttp://arxiv.org/abs/2401.11011v1BioFinBERT: Finetuning Large Language Models (LLMs) to Analyze Sentiment of Press Releases and Financial Text Around Inflection Points of Biotech Stocks2024-01-19T20:09:44ZLarge language models (LLMs) are deep learning algorithms being used to perform natural language processing tasks in various fields, from social sciences to finance and biomedical sciences. Developing and training a new LLM can be very computationally expensive, so it is becoming a common practice to take existing LLMs and finetune them with carefully curated datasets for desired applications in different fields. Here, we present BioFinBERT, a finetuned LLM to perform financial sentiment analysis of public text associated with stocks of companies in the biotechnology sector. The stocks of biotech companies developing highly innovative and risky therapeutic drugs tend to respond very positively or negatively upon a successful or failed clinical readout or regulatory approval of their drug, respectively. These clinical or regulatory results are disclosed by the biotech companies via press releases, which are followed by a significant stock response in many cases. In our attempt to design a LLM capable of analyzing the sentiment of these press releases,we first finetuned BioBERT, a biomedical language representation model designed for biomedical text mining, using financial textual databases. Our finetuned model, termed BioFinBERT, was then used to perform financial sentiment analysis of various biotech-related press releases and financial text around inflection points that significantly affected the price of biotech stocks.2024-01-19T20:09:44ZValentina AparicioDaniel GordonSebastian G. HuayamaresYuhuai Luohttp://arxiv.org/abs/2401.10722v1Stylized Facts and Market Microstructure: An In-Depth Exploration of German Bond Futures Market2024-01-19T14:35:21ZThis paper presents an in-depth analysis of stylized facts in the context of futures on German bonds. The study examines four futures contracts on German bonds: Schatz, Bobl, Bund and Buxl, using tick-by-tick limit order book datasets. It uncovers a range of stylized facts and empirical observations, including the distribution of order sizes, patterns of order flow, and inter-arrival times of orders. The findings reveal both commonalities and unique characteristics across the different futures, thereby enriching our understanding of these markets. Furthermore, the paper introduces insightful realism metrics that can be used to benchmark market simulators. The study contributes to the literature on financial stylized facts by extending empirical observations to this class of assets, which has been relatively underexplored in existing research. This work provides valuable guidance for the development of more accurate and realistic market simulators.2024-01-19T14:35:21ZHamza BodorLaurent Carlierhttp://arxiv.org/abs/2401.08302v1Do backrun auctions protect traders?2024-01-16T12:00:37ZWe study a new "laminated" queueing model for orders on batched trading venues such as decentralised exchanges. The model aims to capture and generalise transaction queueing infrastructure that has arisen to organise MEV activity on public blockchains such as Ethereum, providing convenient channels for sophisticated agents to extract value by acting on end-user order flow by performing arbitrage and related HFT activities. In our model, market orders are interspersed with orders created by arbitrageurs that under idealised conditions reset the marginal price to a global equilibrium between each trade, improving predictability of execution for liquidity traders.
If an arbitrageur has a chance to land multiple opportunities in a row, he may attempt to manipulate the execution price of the intervening market order by a probabilistic blind sandwiching strategy. To study how bad this manipulation can get, we introduce and bound a price manipulation coefficient that measures the deviation from global equilibrium of local pricing quoted by a rational arbitrageur. We exhibit cases in which this coefficient is well approximated by a "zeta value' with interpretable and empirically measurable parameters.2024-01-16T12:00:37ZKeywords: MEV, queue discipline, sandwich, CFMM, arbitrage, blockchain, EthereumAndrew W. Macpherson