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

Neural Hidden Markov Model with Adaptive Granularity Attention for High-Frequency Order Flow Modeling

Author

Listed:
  • Tianzuo Hu

Abstract

We propose a Neural Hidden Markov Model (HMM) with Adaptive Granularity Attention (AGA) for high-frequency order flow modeling. The model addresses the challenge of capturing multi-scale temporal dynamics in financial markets, where fine-grained microstructure signals and coarse-grained liquidity trends coexist. The proposed framework integrates parallel multi-resolution encoders, including a dilated convolutional network for tick-level patterns and a wavelet-LSTM module for low-frequency dynamics. A gating mechanism conditioned on local volatility and transaction intensity adaptively fuses multi-scale representations, while a multi-head attention layer further enhances temporal dependency modeling. Within this architecture, a Neural HMM with conditional normalizing flow emissions is employed to jointly model latent market regimes and complex observation distributions. Empirical results on high-frequency limit order book data demonstrate that the proposed model outperforms fixed-resolution baselines in predicting short-term price movements and liquidity shocks. The adaptive granularity mechanism enables the model to dynamically adjust its focus across time scales, providing improved performance particularly during volatile market conditions.

Suggested Citation

  • Tianzuo Hu, 2026. "Neural Hidden Markov Model with Adaptive Granularity Attention for High-Frequency Order Flow Modeling," Papers 2603.20456, arXiv.org.
  • Handle: RePEc:arx:papers:2603.20456
    as

    Download full text from publisher

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

    References listed on IDEAS

    as
    1. Aur'elien Alfonsi & Antje Fruth & Alexander Schied, 2007. "Optimal execution strategies in limit order books with general shape functions," Papers 0708.1756, arXiv.org, revised Feb 2010.
    2. Matthias Schnaubelt & Jonas Rende & Christopher Krauss, 2019. "Testing Stylized Facts of Bitcoin Limit Order Books," JRFM, MDPI, vol. 12(1), pages 1-30, February.
    3. Michie, Ranald, 2001. "The London Stock Exchange: A History," OUP Catalogue, Oxford University Press, number 9780199242559.
    4. Aurelien Alfonsi & Antje Fruth & Alexander Schied, 2010. "Optimal execution strategies in limit order books with general shape functions," Quantitative Finance, Taylor & Francis Journals, vol. 10(2), pages 143-157.
    5. Adamantios Ntakaris & Martin Magris & Juho Kanniainen & Moncef Gabbouj & Alexandros Iosifidis, 2018. "Benchmark dataset for mid‐price forecasting of limit order book data with machine learning methods," Journal of Forecasting, John Wiley & Sons, Ltd., vol. 37(8), pages 852-866, December.
    6. Francis X. Diebold, 2015. "Comparing Predictive Accuracy, Twenty Years Later: A Personal Perspective on the Use and Abuse of Diebold-Mariano Tests," Journal of Business & Economic Statistics, Taylor & Francis Journals, vol. 33(1), pages 1-1, January.
    7. Ruixue Zhang & Yongtao Hao, 2024. "Time Series Prediction Based on Multi-Scale Feature Extraction," Mathematics, MDPI, vol. 12(7), pages 1-18, March.
    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. Daniel Hern'andez-Hern'andez & Harold A. Moreno-Franco & Jos'e Luis P'erez, 2017. "Periodic strategies in optimal execution with multiplicative price impact," Papers 1705.00284, arXiv.org, revised May 2018.
    2. Xiaoyue Li & John M. Mulvey, 2023. "Optimal Portfolio Execution in a Regime-switching Market with Non-linear Impact Costs: Combining Dynamic Program and Neural Network," Papers 2306.08809, arXiv.org.
    3. Olivier Guéant & Charles-Albert Lehalle, 2015. "General Intensity Shapes In Optimal Liquidation," Mathematical Finance, Wiley Blackwell, vol. 25(3), pages 457-495, July.
    4. Yinhong Dong & Donglei Du & Qiaoming Han & Jianfeng Ren & Dachuan Xu, 2024. "A Stackelberg order execution game," Annals of Operations Research, Springer, vol. 336(1), pages 571-604, May.
    5. Christopher Lorenz & Alexander Schied, 2013. "Drift dependence of optimal trade execution strategies under transient price impact," Finance and Stochastics, Springer, vol. 17(4), pages 743-770, October.
    6. Ulrich Horst & Michael Paulsen, 2017. "A Law of Large Numbers for Limit Order Books," Mathematics of Operations Research, INFORMS, vol. 42(4), pages 1280-1312, November.
    7. Yamamoto, Ryuichi, 2019. "Dynamic Predictor Selection And Order Splitting In A Limit Order Market," Macroeconomic Dynamics, Cambridge University Press, vol. 23(5), pages 1757-1792, July.
    8. Aur'elien Alfonsi & Alexander Schied & Florian Klock, 2013. "Multivariate transient price impact and matrix-valued positive definite functions," Papers 1310.4471, arXiv.org, revised Sep 2015.
    9. Alberto Ciacci & Takumi Sueshige & Hideki Takayasu & Kim Christensen & Misako Takayasu, 2020. "The microscopic relationships between triangular arbitrage and cross-currency correlations in a simple agent based model of foreign exchange markets," PLOS ONE, Public Library of Science, vol. 15(6), pages 1-19, June.
    10. Marcel Nutz & Kevin Webster & Long Zhao, 2023. "Unwinding Stochastic Order Flow: When to Warehouse Trades," Papers 2310.14144, arXiv.org, revised Nov 2025.
    11. Gerry Tsoukalas & Jiang Wang & Kay Giesecke, 2019. "Dynamic Portfolio Execution," Management Science, INFORMS, vol. 67(5), pages 2015-2040, May.
    12. Aurélien Alfonsi & Alexander Schied, 2010. "Optimal trade execution and absence of price manipulations in limit order book models," Post-Print hal-00397652, HAL.
    13. Sophie Laruelle & Charles-Albert Lehalle & Gilles Pag`es, 2011. "Optimal posting price of limit orders: learning by trading," Papers 1112.2397, arXiv.org, revised Sep 2012.
    14. Rene Carmona & Kevin Webster, 2019. "Applications of a New Self-Financing Equation," Papers 1905.04137, arXiv.org.
    15. Hai-Chuan Xu & Wei Chen & Xiong Xiong & Wei Zhang & Wei-Xing Zhou & H Eugene Stanley, 2016. "Limit-order book resiliency after effective market orders: Spread, depth and intensity," Papers 1602.00731, arXiv.org, revised Feb 2017.
    16. Peter Bank & Antje Fruth, 2013. "Optimal Order Scheduling for Deterministic Liquidity Patterns," Papers 1310.3077, arXiv.org.
    17. Martin D. Gould & Mason A. Porter & Stacy Williams & Mark McDonald & Daniel J. Fenn & Sam D. Howison, 2010. "Limit Order Books," Papers 1012.0349, arXiv.org, revised Apr 2013.
    18. Ningyuan Chen & Steven Kou & Chun Wang, 2018. "A Partitioning Algorithm for Markov Decision Processes with Applications to Market Microstructure," Management Science, INFORMS, vol. 64(2), pages 784-803, February.
    19. Charles-Albert Lehalle & Eyal Neuman, 2019. "Incorporating signals into optimal trading," Finance and Stochastics, Springer, vol. 23(2), pages 275-311, April.
    20. Xuefeng Gao & S. J. Deng, 2014. "Hydrodynamic limit of order book dynamics," Papers 1411.7502, arXiv.org, revised Feb 2016.

    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:2603.20456. 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.