https://arxiv.org/abs/2502.15757 Skip to main content Cornell University We gratefully acknowledge support from the Simons Foundation, member institutions, and all contributors. Donate arxiv logo > q-fin > arXiv:2502.15757 [ ] Help | Advanced Search [All fields ] Search arXiv logo Cornell University Logo [ ] GO quick links * Login * Help Pages * About Quantitative Finance > Statistical Finance arXiv:2502.15757 (q-fin) [Submitted on 12 Feb 2025 (v1), last revised 7 May 2025 (this version, v3)] Title:TLOB: A Novel Transformer Model with Dual Attention for Price Trend Prediction with Limit Order Book Data Authors:Leonardo Berti, Gjergji Kasneci View a PDF of the paper titled TLOB: A Novel Transformer Model with Dual Attention for Price Trend Prediction with Limit Order Book Data, by Leonardo Berti and 1 other authors View PDF HTML (experimental) Abstract:Price Trend Prediction (PTP) based on Limit Order Book (LOB) data is a fundamental challenge in financial markets. Despite advances in deep learning, existing models fail to generalize across different market conditions and assets. Surprisingly, by adapting a simple MLP-based architecture to LOB, we show that we surpass SoTA performance; thus, challenging the necessity of complex architectures. Unlike past work that shows robustness issues, we propose TLOB, a transformer-based model that uses a dual attention mechanism to capture spatial and temporal dependencies in LOB data. This allows it to adaptively focus on the market microstructure, making it particularly effective for longer-horizon predictions and volatile market conditions. We also introduce a new labeling method that improves on previous ones, removing the horizon bias. We evaluate TLOB's effectiveness across four horizons, using the established FI-2010 benchmark, a NASDAQ and a Bitcoin dataset. TLOB outperforms SoTA methods in every dataset and horizon. Additionally, we empirically show how stock price predictability has declined over time, -6.68 in F1-score, highlighting the growing market efficiency. Predictability must be considered in relation to transaction costs, so we experimented with defining trends using an average spread, reflecting the primary transaction cost. The resulting performance deterioration underscores the complexity of translating trend classification into profitable trading strategies. We argue that our work provides new insights into the evolving landscape of stock price trend prediction and sets a strong foundation for future advancements in financial AI. We release the code at this https URL. Statistical Finance (q-fin.ST); Artificial Intelligence Subjects: (cs.AI); Machine Learning (cs.LG); Trading and Market Microstructure (q-fin.TR) Cite as: arXiv:2502.15757 [q-fin.ST] (or arXiv:2502.15757v3 [q-fin.ST] for this version) https://doi.org/10.48550/arXiv.2502.15757 Focus to learn more arXiv-issued DOI via DataCite Submission history From: Leonardo Berti [view email] [v1] Wed, 12 Feb 2025 12:41:10 UTC (14,857 KB) [v2] Thu, 27 Feb 2025 13:59:09 UTC (14,858 KB) [v3] Wed, 7 May 2025 21:14:14 UTC (13,842 KB) Full-text links: Access Paper: View a PDF of the paper titled TLOB: A Novel Transformer Model with Dual Attention for Price Trend Prediction with Limit Order Book Data, by Leonardo Berti and 1 other authors * View PDF * HTML (experimental) * TeX Source * Other Formats license icon view license Current browse context: q-fin.ST < prev | next > new | recent | 2025-02 Change to browse by: cs cs.AI cs.LG q-fin q-fin.TR References & Citations * NASA ADS * Google Scholar * Semantic Scholar a export BibTeX citation Loading... BibTeX formatted citation x [loading... ] Data provided by: Bookmark BibSonomy logo Reddit logo (*) Bibliographic Tools Bibliographic and Citation Tools [ ] Bibliographic Explorer Toggle Bibliographic Explorer (What is the Explorer?) [ ] Connected Papers Toggle Connected Papers (What is Connected Papers?) [ ] Litmaps Toggle Litmaps (What is Litmaps?) [ ] scite.ai Toggle scite Smart Citations (What are Smart Citations?) ( ) Code, Data, Media Code, Data and Media Associated with this Article [ ] alphaXiv Toggle alphaXiv (What is alphaXiv?) [ ] Links to Code Toggle CatalyzeX Code Finder for Papers (What is CatalyzeX?) [ ] DagsHub Toggle DagsHub (What is DagsHub?) [ ] GotitPub Toggle Gotit.pub (What is GotitPub?) [ ] Huggingface Toggle Hugging Face (What is Huggingface?) [ ] Links to Code Toggle Papers with Code (What is Papers with Code?) [ ] ScienceCast Toggle ScienceCast (What is ScienceCast?) ( ) Demos Demos [ ] Replicate Toggle Replicate (What is Replicate?) [ ] Spaces Toggle Hugging Face Spaces (What is Spaces?) [ ] Spaces Toggle TXYZ.AI (What is TXYZ.AI?) ( ) Related Papers Recommenders and Search Tools [ ] Link to Influence Flower Influence Flower (What are Influence Flowers?) [ ] Core recommender toggle CORE Recommender (What is CORE?) * Author * Venue * Institution * Topic ( ) About arXivLabs arXivLabs: experimental projects with community collaborators arXivLabs is a framework that allows collaborators to develop and share new arXiv features directly on our website. Both individuals and organizations that work with arXivLabs have embraced and accepted our values of openness, community, excellence, and user data privacy. arXiv is committed to these values and only works with partners that adhere to them. Have an idea for a project that will add value for arXiv's community? Learn more about arXivLabs. Which authors of this paper are endorsers? | Disable MathJax (What is MathJax?) * About * Help * Click here to contact arXiv Contact * Click here to subscribe Subscribe * Copyright * Privacy Policy * Web Accessibility Assistance * arXiv Operational Status Get status notifications via email or slack