{"paper_id":"2502.15757","title":"TLOB: A Novel Transformer Model with Dual Attention for Price Trend Prediction with Limit Order Book Data","authors":["Leonardo Berti","Gjergji Kasneci"],"paper_date":"2025-02-12","paper_type":"empirical","paper_url":"https://arxiv.org/pdf/2502.15757v3","page_url":"https://thequant.space/flowcharts/tlob-a-novel-transformer-model-with-dual-attention-for-pric/","scores":{"empirical_rigor":7.5,"math_complexity":6,"quadrant":"Holy Grail"},"proposes":{"status":"available","statement":"The paper proposes two new deep‑learning models for LOB‑based price trend prediction: a simple MLP‑based model (MLPLOB) and a transformer with dual attention (TLOB).","quote":"... • TLOB: A transformer-based approach that leverages dual attention mechanisms for both temporal and spatial relationships in LOB data.","summary":"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…","strategy":null},"assumptions":{"status":"available","items":[{"assumption":"Mid‑price is defined as the average of the best ask and best bid prices.","type":"market","stated":"explicit","quote":"The price of a security is commonly defined as the mid-price, calculated as the average of the best ask and best bid prices, with the difference between these prices representing the bid‑ask spread."},{"assumption":"Trend classification threshold θ can be set equal to the average spread to reflect transaction costs.","type":"execution","stated":"implied","quote":"We argue, however, that relating θ to transaction costs can better align trend predictions with profitability. Thus, in Section 7.5, we examine setting θ to the average spread (the difference between the best bid and ask prices) as a percentage of the mid-price."},{"assumption":"The labeling window length k can be chosen independently of the prediction horizon h.","type":"data","stated":"explicit","quote":"To overcome this, we propose a more general labeling strategy that dissociates k from h."},{"assumption":"The LOB snapshots are sampled at regular intervals (e.g., every ten events for FI‑2010).","type":"data","stated":"explicit","quote":"The authors sampled LOB observations at intervals of ten events, resulting in a total of 394,337 samples."}]},"datasets":{"status":"available","items":[{"name":"FI-2010","provider":"Finnish companies listed on NASDAQ Nordic","kind":"benchmark","access":"public","period":"June 1–14, 2010","universe":"Kesko Oyj, Outokumpu Oyj, Sampo, Rautaruukki, Wärtsilä Oyj","quote":"... The data span ten trading days, from June 1st to June 14th, 2010, encompassing approximately 4 million limit order snapshots across ten levels of the LOB.","known_id":"fi-2010"},{"name":"NASDAQ Tesla and Intel","provider":"LOBSTER public sample files","kind":"order-book","access":"public","period":"January 2015","universe":"Tesla (TSLA) and Intel (INTC) stocks","quote":"... The trading day was extracted from the LOBSTER public sample files","known_id":"lobster"},{"name":"BTC dataset","provider":"Kaggle (Binance Bitcoin perpetual data)","kind":"crypto-onchain","access":"public","period":"January 9–20, 2023","universe":"Bitcoin/USDT perpetual futures","quote":"The BTC dataset is extracted from Kaggle and encompasses 12 consecutive days, starting from January 9th, 2023, until January 20th, 2023. It comprises data from Binance Bitcoin perpetual data (BT‑CUSDT.P).","known_id":"kaggle"}],"known":[{"id":"fi-2010","name":"FI-2010","provider":"Ntakaris et al.","kind":"order-book","access":"public","quote":"ther models. The results for the baselines are extracted from the benchmark of Prata et al. [31]8 since the settings are equal for the FI-2010 dataset.","mentions":25,"used_in":3},{"id":"binance","name":"Binance","provider":"Binance","kind":"market-prices","access":"public","quote":"It comprises data from Binance Bitcoin perpetual data (BT-CUSDT.P).","mentions":1,"used_in":1},{"id":"kaggle","name":"Kaggle","provider":"Kaggle","kind":"other","access":"public","quote":"6.2 BTC Dataset The BTC dataset is extracted from Kaggle and encompasses 12 con-secutive days, starting from January 9th, 2023, until January 20th, 2023.","mentions":1,"used_in":1},{"id":"lobster","name":"LOBSTER","provider":"LOBSTER","kind":"order-book","access":"commercial","quote":"Furthermore, the trading day was extracted from the LOBSTER public sample files available at https://lobsterdata.com/info/DataSamples.php, and it was the only day available, eliminating the possibility of cherry picking.","mentions":1,"used_in":1}],"sample":{"start":null,"end":null,"market":null,"asset_class":null,"frequency":null},"data_resolution":"l2-book"},"transaction_costs":{"status":"not_applicable","modeled":"n/a","headline_net_of_costs":null,"detail":null,"quote":null,"source":"front_matter","rule":"R4a","candidates":{"front_matter":"n/a","evidence_card":"partial","evidence_card_quoted":true},"card_detail":"Trend thresholds are set to the average spread (percentage of mid‑price) to reflect the primary transaction cost; performance is re‑evaluated under this definition.","card_quote":"We argue, however, that relating θ to transaction costs can better align trend predictions with profitability. Thus, in Section 7.5, we examine setting θ to the average spread","meaning":"the paper reports no trading or execution result; the cost the extractor found is a model parameter"},"results":{"status":"available","evaluation_type":"forecast-accuracy","findings":[{"finding":"TLOB outperforms all state‑of‑the‑art LOB‑based models on every dataset and horizon, especially for longer horizons.","kind":"performance","quote":"TLOB and MLPLOB surpass SoTA performances on every dataset and every horizon. TLOB performs the best on larger horizons ..."},{"finding":"MLPLOB also surpasses state‑of‑the‑art models, achieving the best results on shorter horizons.","kind":"performance","quote":"MLPLOB performs the best on the shorter ones."},{"finding":"Stock price predictability has declined over time, with a -6.68 drop in F1‑score.","kind":"predictive-accuracy","quote":"empirically show how stock price predictability has declined over time, -6.68 in F1-score, highlighting the growing market efficiency."},{"finding":"Using the average spread as the trend threshold leads to performance deterioration, likely due to class imbalance.","kind":"negative","quote":"In general, performances show a deterioration, which is probably caused by the classes’ unbalance."},{"finding":"Ablation study shows that removing either spatial or temporal attention reduces F1‑score, confirming the importance of dual attention.","kind":"performance","quote":"The full TLOB model, incorporating both spatial and temporal attention mechanisms, consistently outperforms both ablated versions across all prediction horizons."}],"reported_performance":null,"out_of_sample":{"method":"holdout","headline_out_of_sample":null}},"independent_evidence":{"status":"available","supports":[],"contradicts":[],"qualifies":[],"compared_with":39,"citations":{"cited_by_in_corpus":3,"by_independent_authors":3,"how_cited":{"used_as_baseline":0,"uses_method_or_data":1,"extends":0,"discusses_findings":0,"mentions":1,"unclassified":1},"independent_papers":[{"paper":{"paper_id":"2610.02917","title":"Event History Over Scale: Compact Transformers for Low-Latency Limit Order Book Forecasting","paper_date":"2026-10-02","authors":["David Schaurecker","Lasse B. Strand","Kevin O'Sullivan","Robert Jakob"],"empirical_rigor":8,"page_url":"https://thequant.space/flowcharts/event-history-over-scale-compact-transformers-for-low-latency-limit-order-book/"},"how":"uses_method_or_data","quote":null}],"scope":"Citations between papers in this corpus only; citations from outside it are not counted."}},"implementation":{"status":"available","public":true,"code_url":"https://github.com/LeonardoBerti00/TLOB","note":null},"replication":{"status":"none_found","card":null,"note":"No replication of this paper has been run by thequant.space yet."},"extraction":{"text_source":"fulltext","model":"openai/gpt-oss-120b","version":1,"extracted_at":"2026-11-14T17:45:51Z"},"provenance":{"claims":"Everything here is what the authors state in the paper. Nothing was re-run or reproduced by the platform.","quotes":"Assumptions, datasets, cost detail and findings were extracted by a language model. Every quote is verbatim paper text. Where an item has `support`, \"full\" means every figure in it appears in the quoted sentences and \"partial\" means a figure is stated elsewhere in the paper; items with a figure found nowhere in the paper were discarded.","datasets_known":"datasets.known lists well-known vendors and public datasets by a stable id, found by a dictionary over the full text where the sentence says the data is used; it is independent of the model and covers only names in the dictionary.","flags":"transaction_costs.modeled, results.evaluation_type and results.out_of_sample.method are platform classifications (structured-decision models); see https://thequant.space/score-guide/#penalty-flags","comparisons":"supports / contradicts / qualifies are a language model's reading of two papers' quoted findings, restricted to closely related papers that share no author. They are pointers to read, not verified replications, and coverage is partial.","implementation":"code_url is a repository the paper itself presents as its own (rule-scored, ambiguous cases judged by a model), checked for liveness when it was recorded."},"docs":"https://thequant.space/agents/"}