IDEAS home Printed from https://ideas.repec.org/p/arx/papers/2602.19419.html

RAmmStein: Regime Adaptation in Mean-reverting Markets with Stein Thresholds -- Optimal Impulse Control in Concentrated AMMs

Author

Listed:
  • Pranay Anchuri

Abstract

Concentrated liquidity provision in decentralized exchanges presents a fundamental Impulse Control problem. Liquidity Providers (LPs) face a non-trivial trade-off between maximizing fee accrual through tight price-range concentration and minimizing the friction costs of rebalancing, including gas fees and swap slippage. Existing methods typically employ heuristic or threshold strategies that fail to account for market dynamics. This paper formulates liquidity management as an optimal control problem and derives the corresponding Hamilton-Jacobi-Bellman quasi-variational inequality (HJB-QVI). We present an approximate solution RAmmStein, a Deep Reinforcement Learning method that incorporates the mean-reversion speed (theta) of an Ornstein-Uhlenbeck process among other features as input to the model. We demonstrate that the agent learns to separate the state space into regions of action and inaction. We further extend the framework with RAmmStein-Width, which jointly optimizes rebalancing timing and position width via a 6-action DDQN. We evaluate the framework using high-frequency 1Hz Coinbase trade data comprising over 6.8M trades on a realistic environment (10M TVL, 1% default width). Experimental results show that RAmmStein achieves a net ROI of 1.60%, the highest among all realistic (non-omniscient) strategies, while greedy strategies lose up to -8.4% to gas costs. Notably, the agent reduces rebalancing frequency by 85% compared to greedy rebalancing. RAmmStein-Width discovers extreme parsimony on its own, executing only 9 rebalances and $40 in gas, and degrades more slowly than all active strategies at elevated gas costs. Our results demonstrate that regime-aware laziness can significantly improve capital efficiency by preserving the returns that would otherwise be eroded by the operational costs.

Suggested Citation

  • Pranay Anchuri, 2026. "RAmmStein: Regime Adaptation in Mean-reverting Markets with Stein Thresholds -- Optimal Impulse Control in Concentrated AMMs," Papers 2602.19419, arXiv.org, revised Mar 2026.
  • Handle: RePEc:arx:papers:2602.19419
    as

    Download full text from publisher

    File URL: http://arxiv.org/pdf/2602.19419
    File Function: Latest version
    Download Restriction: no
    ---><---

    References listed on IDEAS

    as
    1. Sebastian Jaimungal & Yuri F. Saporito & Max O. Souza & Yuri Thamsten, 2023. "Optimal Trading in Automated Market Makers with Deep Learning," Papers 2304.02180, arXiv.org, revised May 2026.
    2. Vasicek, Oldrich, 1977. "An equilibrium characterization of the term structure," Journal of Financial Economics, Elsevier, vol. 5(2), pages 177-188, November.
    3. Akaki Mamageishvili & Edward W. Felten, 2022. "Efficient Rollup Batch Posting Strategy on Base Layer," Papers 2212.10337, arXiv.org, revised Feb 2023.
    4. Vasicek, Oldrich Alfonso, 1977. "Abstract: An Equilibrium Characterization of the Term Structure," Journal of Financial and Quantitative Analysis, Cambridge University Press, vol. 12(4), pages 627-627, November.
    5. Stefan Loesch & Nate Hindman & Mark B Richardson & Nicholas Welch, 2021. "Impermanent Loss in Uniswap v3," Papers 2111.09192, arXiv.org.
    6. Jan Arvid Berg & Robin Fritsch & Lioba Heimbach & Roger Wattenhofer, 2022. "An Empirical Study of Market Inefficiencies in Uniswap and SushiSwap," Papers 2203.07774, arXiv.org, revised May 2022.
    7. Lioba Heimbach & Ye Wang & Roger Wattenhofer, 2021. "Behavior of Liquidity Providers in Decentralized Exchanges," Papers 2105.13822, arXiv.org, revised Oct 2021.
    8. Lioba Heimbach & Eric Schertenleib & Roger Wattenhofer, 2022. "Risks and Returns of Uniswap V3 Liquidity Providers," Papers 2205.08904, arXiv.org, revised Sep 2022.
    9. David Silver & Aja Huang & Chris J. Maddison & Arthur Guez & Laurent Sifre & George van den Driessche & Julian Schrittwieser & Ioannis Antonoglou & Veda Panneershelvam & Marc Lanctot & Sander Dieleman, 2016. "Mastering the game of Go with deep neural networks and tree search," Nature, Nature, vol. 529(7587), pages 484-489, January.
    10. Alex Evans, 2020. "Liquidity Provider Returns in Geometric Mean Markets," Papers 2006.08806, arXiv.org, revised Jul 2020.
    11. 'Alvaro Cartea & Fayc{c}al Drissi & Marcello Monga, 2023. "Decentralised Finance and Automated Market Making: Predictable Loss and Optimal Liquidity Provision," Papers 2309.08431, arXiv.org, revised Jun 2024.
    12. Haonan Xu & Alessio Brini, 2025. "Improving DeFi Accessibility through Efficient Liquidity Provisioning with Deep Reinforcement Learning," Papers 2501.07508, arXiv.org.
    13. Thomas Spooner & John Fearnley & Rahul Savani & Andreas Koukorinis, 2018. "Market Making via Reinforcement Learning," Papers 1804.04216, arXiv.org.
    14. Zhengyao Jiang & Dixing Xu & Jinjun Liang, 2017. "A Deep Reinforcement Learning Framework for the Financial Portfolio Management Problem," Papers 1706.10059, arXiv.org, revised Jul 2017.
    15. Volodymyr Mnih & Koray Kavukcuoglu & David Silver & Andrei A. Rusu & Joel Veness & Marc G. Bellemare & Alex Graves & Martin Riedmiller & Andreas K. Fidjeland & Georg Ostrovski & Stig Petersen & Charle, 2015. "Human-level control through deep reinforcement learning," Nature, Nature, vol. 518(7540), pages 529-533, February.
    16. Robin Fritsch, 2021. "Concentrated Liquidity in Automated Market Makers," Papers 2110.01368, arXiv.org.
    17. Jason Milionis & Ciamac C. Moallemi & Tim Roughgarden, 2023. "A Myersonian Framework for Optimal Liquidity Provision in Automated Market Makers," Papers 2303.00208, arXiv.org, revised Nov 2023.
    Full references (including those not matched with items on IDEAS)

    Most related items

    These are the items that most often cite the same works as this one and are cited by the same works as this one.
    1. Shuo Sun & Rundong Wang & Bo An, 2021. "Reinforcement Learning for Quantitative Trading," Papers 2109.13851, arXiv.org.
    2. Iwao Maeda & David deGraw & Michiharu Kitano & Hiroyasu Matsushima & Hiroki Sakaji & Kiyoshi Izumi & Atsuo Kato, 2020. "Deep Reinforcement Learning in Agent Based Financial Market Simulation," JRFM, MDPI, vol. 13(4), pages 1-17, April.
    3. Stella C. Dong & James R. Finlay, 2025. "Dynamic Reinsurance Treaty Bidding via Multi-Agent Reinforcement Learning," Papers 2506.13113, arXiv.org, revised Mar 2026.
    4. Amirhosein Mosavi & Yaser Faghan & Pedram Ghamisi & Puhong Duan & Sina Faizollahzadeh Ardabili & Ely Salwana & Shahab S. Band, 2020. "Comprehensive Review of Deep Reinforcement Learning Methods and Applications in Economics," Mathematics, MDPI, vol. 8(10), pages 1-42, September.
    5. Ben Hambly & Renyuan Xu & Huining Yang, 2021. "Recent Advances in Reinforcement Learning in Finance," Papers 2112.04553, arXiv.org, revised Feb 2023.
    6. Alessio Brini & Daniele Tantari, 2021. "Deep Reinforcement Trading with Predictable Returns," Papers 2104.14683, arXiv.org, revised May 2023.
    7. Deborah Miori & Mihai Cucuringu, 2022. "DeFi: data-driven characterisation of Uniswap v3 ecosystem & an ideal crypto law for liquidity pools," Papers 2301.13009, arXiv.org, revised Jan 2023.
    8. Viraj Nadkarni & Sanjeev Kulkarni & Pramod Viswanath, 2024. "Adaptive Curves for Optimally Efficient Market Making," Papers 2406.13794, arXiv.org, revised Mar 2025.
    9. Erhan Bayraktar & Asaf Cohen & April Nellis, 2024. "DEX Specs: A Mean Field Approach to DeFi Currency Exchanges," Papers 2404.09090, arXiv.org.
    10. Lioba Heimbach & Eric Schertenleib & Roger Wattenhofer, 2022. "Exploring Price Accuracy on Uniswap V3 in Times of Distress," Papers 2208.09642, arXiv.org, revised Nov 2022.
    11. Brini, Alessio & Tantari, Daniele, 2023. "Deep reinforcement trading with predictable returns," Physica A: Statistical Mechanics and its Applications, Elsevier, vol. 622(C).
    12. Zechu Li & Xiao-Yang Liu & Jiahao Zheng & Zhaoran Wang & Anwar Walid & Jian Guo, 2021. "FinRL-Podracer: High Performance and Scalable Deep Reinforcement Learning for Quantitative Finance," Papers 2111.05188, arXiv.org.
    13. Andrey Urusov & Rostislav Berezovskiy & Anatoly Krestenko & Andrei Kornilov & Yury Yanovich, 2025. "Dynamic Liquidity Provision in Decentralized Markets: Strategy Optimization and Performance Evaluation in Concentrated Liquidity AMMs," Papers 2505.15338, arXiv.org, revised Mar 2026.
    14. Lioba Heimbach & Eric Schertenleib & Roger Wattenhofer, 2022. "Risks and Returns of Uniswap V3 Liquidity Providers," Papers 2205.08904, arXiv.org, revised Sep 2022.
    15. Jonathan Sadighian, 2019. "Deep Reinforcement Learning in Cryptocurrency Market Making," Papers 1911.08647, arXiv.org.
    16. Jonathan Sadighian, 2020. "Extending Deep Reinforcement Learning Frameworks in Cryptocurrency Market Making," Papers 2004.06985, arXiv.org.
    17. Xiao-Yang Liu & Hongyang Yang & Qian Chen & Runjia Zhang & Liuqing Yang & Bowen Xiao & Christina Dan Wang, 2020. "FinRL: A Deep Reinforcement Learning Library for Automated Stock Trading in Quantitative Finance," Papers 2011.09607, arXiv.org, revised Mar 2022.
    18. Etienne Vaccaro-Grange, 2025. "Quantitative easing, tightening, and the term premium channel in the Euro Area," Empirical Economics, Springer, vol. 69(6), pages 3089-3125, December.
    19. Camilla LandÊn, 2000. "Bond pricing in a hidden Markov model of the short rate," Finance and Stochastics, Springer, vol. 4(4), pages 371-389.
    20. Álvarez Echeverría Francisco & López Sarabia Pablo & Venegas Martínez Francisco, 2012. "Valuación financiera de proyectos de inversión en nuevas tecnologías con opciones reales," Contaduría y Administración, Accounting and Management, vol. 57(3), pages 115-145, julio-sep.

    More about this item

    NEP fields

    This paper has been announced in the following NEP Reports:

    Statistics

    Access and download statistics

    Corrections

    All material on this site has been provided by the respective publishers and authors. You can help correct errors and omissions. When requesting a correction, please mention this item's handle: RePEc:arx:papers:2602.19419. See general information about how to correct material in RePEc.

    If you have authored this item and are not yet registered with RePEc, we encourage you to do it here. This allows to link your profile to this item. It also allows you to accept potential citations to this item that we are uncertain about.

    If CitEc recognized a bibliographic reference but did not link an item in RePEc to it, you can help with this form .

    If you know of missing items citing this one, you can help us creating those links by adding the relevant references in the same way as above, for each refering item. If you are a registered author of this item, you may also want to check the "citations" tab in your RePEc Author Service profile, as there may be some citations waiting for confirmation.

    For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: arXiv administrators (email available below). General contact details of provider: http://arxiv.org/ .

    Please note that corrections may take a couple of weeks to filter through the various RePEc services.

    IDEAS is a RePEc service. RePEc uses bibliographic data supplied by the respective publishers.