Source-linked AI summary
StochLOB: Heavy-Tailed Score Matching for Robust Limit Order Book Trend Prediction
Arshia Abolghasemi, Seyed Reza Tavakoli, Parsa Naderi, Nazanin Mirzaei, Behrad Jahani, Saba Yousefzadeh, Tahereh Javaheri, Mohammad Hosein Rohban, Gholamali Aminian, Ali Habibnia
TL;DR
LOB order flow can be bursty and heavy-tailed, unlike the Gaussian corruption commonly used in score-based diffusion. STOCHLOB trains with jump-Lévy or clipped α-stable corruption while keeping inference deterministic. Its variants remain competitive on standard Coinbase prediction and improve several realized stress-window diagnostics.
Problem
Brownian Gaussian corruption can poorly represent the abrupt, heavy-tailed residuals observed in LOB order flow.
Source: §1 · p. 1Method
STOCHLOB uses jump-Lévy and clipped α-stable score-matching corruptions during training while deploying a deterministic classifier.
Source: §1 · p. 2Results
STOCHLOB remains competitive on standard Coinbase trend prediction and improves several realized stress-window diagnostics.
Source: §1 · p. 2, §6.2 · p. 7, §8 · p. 9Takeaways & Limitations
The results support testing non-Gaussian corruption for robust LOB prediction while keeping inference free of diffusion sampling.
Source: §1 · p. 2, §8 · p. 9The compound-Poisson corruption remains isotropic after scaling, while real book shocks are signed, level-correlated, and state dependent.
Source: §7 · p. 8
Abstract
from arXiv · showhide
Score-based diffusion methods usually perturb data with Brownian Gaussian noise, corresponding to a light-tailed forward stochastic differential equation (SDE). For market time series this SDE can be a poor abstraction: limit order book (LOB) order flow is heavy-tailed, bursty, and occasionally jump-like. We study STOCHLOB, a training-only score-matching framework that changes the forward diffusion corruption law while leaving the deployed predictor deterministic. Instead of Brownian-only Gaussian corruption, the noising process uses two non-Gaussian SDE-inspired alternatives: jump-L\'evy noise through a compound-Poisson variance mixture, and clipped $\alpha$-stable noise through a positive-stable Gaussian scale mixture. These corruptions inject finite jumps and heavy-tailed residuals into training without requiring reverse-time diffusion sampling at inference. The resulting score target has a useful interpretation: its radial factor $h_t(r)$ is the posterior expected corruption precision, so large residuals are weighted according to the latent corruption scale that most plausibly generated them. On chronologically held-out Coinbase LOB data, the proposed variants remain competitive on uncorrupted BTC and altcoin test horizons and improve several realized tail-window stress diagnostics. An exploratory Feishu A-share transfer study further tests whether the probability outputs remain usable under transaction costs and trading-rule constraints. Code and configuration files are available at https://github.com/ArshiAbolghasemi/Penny.
1 Introduction
The paper argues that Brownian Gaussian corruption poorly reflects bursty, heavy-tailed LOB order flow. STOCHLOB changes the training corruption while keeping inference deterministic, then evaluates standard forecasts and stress-window behavior.
Motivation
- Brownian-only diffusion can poorly represent abrupt, heavy-tailed LOB order flow, whose large residuals are uncommon under Gaussian corruption [Mandelbrot, 1963, Cont, 2001, Cont et al., 2014].The paper identifies order sweeps, liquidity withdrawals, and bursts of directional trading as examples of abrupt movement.Source: §1 · p. 1
Approach
- STOCHLOB modifies training-time score corruption while retaining a deterministic classifier and single-pass inference without reverse-time diffusion sampling.The corruption sampler and score head are used only while learning the shared representation.Source: §1 · p. 2
- Jump-Lévy compound-Poisson and clipped α-stable scale-mixture corruptions expose the representation to finite jumps or heavy-tailed perturbations, with radial score factor ht interpreted as posterior corruption precision.The posterior precision adapts the restoring force to the latent corruption scale that plausibly generated a residual.Source: §1 · p. 2
Evaluation
- On Coinbase BTC and four additional crypto symbols, the variants remain competitive on standard held-out prediction, win selected horizons, and improve several realized stress-window diagnostics.The paper also explores Feishu A-share transfer under transaction costs and trading constraints, as a test of probability usability rather than a complete trading system.Source: §1 · p. 2
2 Related Work
The related work spans LOB forecasting, heavy-tailed and jump processes, and diffusion-based representation learning. STOCHLOB uses non-Gaussian processes as training corruptions for deterministic LOB classification, rather than as market simulators.
LOB trend prediction
- LOB forecasting research ranges from DeepLOB and bilinear-attention models to newer attention and benchmarking approaches, while STOCHLOB retains the standard three-class protocol for comparisons.The listed baselines include linear, recurrent, convolutional-attention, transformer, and single-asset order-flow attention models.Source: §2 · p. 2
Heavy tails and jumps
- Prior work treats heavy tails and jumps as financial stylized facts and models them with stable processes or jump diffusion, but STOCHLOB uses these objects only as training-time corruptions.They are not presented as complete market simulators.Source: §2 · p. 2
Diffusion as representation learning
- Diffusion methods have also been used for supervised representation learning, and non-Gaussian diffusion studies replace Brownian noise with jump or heavy-tailed processes; STOCHLOB applies such corruption as an auxiliary regularizer for deterministic LOB classification.Figure 1 organizes Coinbase BTC stress results by stress, variance, and jump-residual deciles; it reports macro-F1 and paired differences against a cross-entropy-only trunk.Source: §2 · p. 3, Figure 1 · p. 3
3 Background
The background introduces the order book and order-flow imbalance as structured, time-varying signals for LOB prediction. It motivates non-Gaussian training corruption with Coinbase OFI tail behavior.
LOB data
- A LOB snapshot records bid and ask prices and volumes at ordered price levels; with twenty displayed levels, it contains eighty raw book fields before derived features.Consecutive snapshots show queues building, vanishing, or moving across levels, revealing pressure before a mid-price move.Source: §3 · p. 3
OFI representation
- OFI summarizes added, cancelled, or consumed bid- and ask-side liquidity as signed flow, converting irregular book updates into a regular time-series signal.New bid depth or removed ask depth pushes flow positive; removed bid depth or new ask depth pushes it negative.Source: §3 · p. 3
Data details
- The paper provides full LOB notation, Coinbase feature construction, and the exact OFI aggregation formula in Eq. (10); Appendix A.4 reports train-only heavy-tail diagnostics, including Figures 4 and 5.Source: §3 · p. 4
Tail behavior and corruption
- A pooled Hill/Pareto tail-index estimate on Coinbase OFI magnitudes is 1.62, while Gaussian denoising emphasizes fixed quadratic geometry around the clean input.The paper contrasts this with non-Gaussian score tasks that expose the shared classifier trunk to larger residuals during training.Source: §3 · p. 4
4 Methodology
STOCHLOB trains a trend classifier and a score-matching task on clean and corrupted views that share a temporal trunk. Its scale-mixture corruptions alter the training signal, while inference uses only the classifier path.
4 Methodology
- The clean LOB window trains the three-class trend classifier, while a stochastically corrupted view trains a score head attached to the shared temporal trunk.At test time, the noisy view, corruption sampler, score table, and score head are disabled.Source: §4 · p. 4, Figure 2 · p. 6
4.1 Problem and Labels
- Coinbase windows use T = 60 and F = 31, covering ten minutes at ten-second sampling, and are split chronologically only when the full context and future label horizon remain within one split.Labels distinguish down, stationary, and up using train-calibrated thresholds; the split rule avoids leakage from overlapping boundary windows.Source: §4.1 · p. 4
4.2 Generalized Scale-Mixture Score Matching
- Gaussian scale mixtures preserve a tractable isotropic Gaussian score conditional on variance Wt while allowing marginally heavier-tailed residuals; ht(r) is interpreted as posterior expected corruption precision.The paper tabulates ht by Monte Carlo over residual radii and diffusion steps, then interpolates it during training.Source: §4.2 · pp. 4–5
4.3 Two Market-Shaped Corruptions
- The Lévy corruption combines a Brownian background with compound-Poisson gamma variance for mostly ordinary perturbations and occasional shocks, while clipped positive-stable scaling yields truncated heavy-tailed perturbations.Clipping the stable scale at a high quantile provides numerical stability; the resulting law is not a pure infinite-variance process.Source: §4.3 · p. 5
4.4 Architecture
- Both variants share the same classifier family and training-only score branch, so the inference path is unchanged and the corruption law is the differing design choice.The workflow pools the unperturbed representation for trend logits and disables the corruption sampler and score decoder at inference.Source: §4.4 · p. 5, Figure 2 · p. 6
5 Datasets
The study uses point-in-time crypto and equity order-book data, with Coinbase as the crypto benchmark and Feishu as a broader Chinese A-share transfer setting.
- The paper uses point-in-time market data and directs readers to Appendix A for timestamps, feature construction, normalization, split counts, label calibration, and tail diagnostics.Source: §5 · p. 7
Coinbase crypto
- Coinbase experiments use BTC, ETH, BNB, XRP, and USDT, with BTC as the main-text focus and the other symbols reported in Appendix E.The appendix gives results for ETH, BNB, XRP, and USDT.Source: §5 · p. 7
Feishu A-share universe
- The Feishu transfer study combines intraday OFI summaries with daily OHLCV and technical variables for each asset-day.Directional probabilities are evaluated through a common constrained portfolio rule.Source: §5 · p. 7
6 Experiments
Experiments use chronological Coinbase splits to evaluate trend prediction, stress-window stability, and an exploratory Feishu portfolio transfer. StochLOB remains competitive on standard held-out BTC results and shows gains in selected tail-window regimes.
6.1 Experiment Setup
- Coinbase models are evaluated on chronological 70/15/15 train, validation, and test splits, with checkpoints selected by validation macro-F1 and frozen for test metrics.The main tables use OFI windows with T = 60, F = 31, and horizons k ∈{10, 20, 50, 100}.Source: §6.1 · p. 7
6.2 Mid-Price Trend Prediction Results
- StochLOB variants are competitive at the remaining BTC horizons, with jump-Poisson highest in mean macro-F1 at k = 10 and alpha-stable highest at k = 20.Standard-test rankings are mixed, not across-the-board wins.Source: §6.2 · p. 7
6.3 Stress Stability
- Heavy-tailed score corruption gives measurable stability gains in several held-out BTC tail-region windows, although StochLOB variants are not uniformly best on standard held-out data.The stress analysis compares extreme windows across stress, high-variance, and jump-residual regimes; extreme windows are the top decile of each regime score.Source: §6.3 · p. 7
6.4 Feishu Portfolio Transfer
- In the Feishu out-of-sample portfolio check, jump-Poisson reaches 38.78% CAGR and Sharpe 1.04, with the lowest maximum drawdown and volatility among the active models shown.A fixed downstream portfolio rule tests classifier probabilities after frictions and trading constraints.Source: §6.4 · p. 7
7 Discussion
The discussion frames STOCHLOB as a way to adapt training corruption to heavy-tailed market inputs rather than to dominate every standard benchmark. It interprets the score through posterior precision while noting that radial coverage does not capture all directional market stress.
- Table 1 reports BTC OFI accuracy and macro-F1 by horizon as mean±std over five seeds, while Table 2 compares extreme-window macro-F1 across held-out BTC regimes.Table 2 includes the best heavy-tailed variant, matched Gaussian StochLOB baseline, and strongest supervised comparator in each regime-horizon row.Source: Table 2 · p. 8, Table 1 · p. 8
- The central claim is that non-Gaussian corruption better matches heavy-tailed crypto OFI inputs and supports robustness in large-residual states, rather than winning every standard benchmark cell.The posterior-precision view explains how the score adapts to plausible corruption scale as residual magnitude changes.Source: §7 · pp. 7–8
- The compound-Poisson corruption remains isotropic after scaling, while clipped alpha-stable corruption is a truncated-stable training distribution rather than a pure infinite-variance process.The discussion also cautions that robust probabilities are not automatically portfolio-ready; alpha-stable may need threshold or utility-aware calibration.Source: §7 · p. 8
- Radial coverage does not guarantee angular coverage because real book stress is signed, cross-level, and concentrated along a small number of market directions.The paper identifies directional stress modeling and matrix-valued posterior precision as future-work directions.Source: §7 · pp. 8–9
- The Feishu portfolio comparison reports constrained out-of-sample metrics for shown active models, while Figure 3 displays cumulative returns for StochLOB variants, supervised baselines, and a passive equal-weight reference.Source: Table 3 · p. 9, Figure 3 · p. 9
8 Conclusion
STOCHLOB keeps inference deterministic while using heavy-tailed or jump-like training corruption; the paper reports competitive Coinbase prediction and improved stress-window diagnostics. The accompanying appendices describe the Coinbase protocol, label and corruption calibration, and evidence that Gaussian fits do not lead.
8 Conclusion
- STOCHLOB remains competitive on standard Coinbase trend prediction, improves several realized stress-window diagnostics, and provides probabilities tested under a constrained Feishu portfolio rule.The posterior-precision interpretation of h_t is given in Appendix G.Source: §8 · p. 9
A.1 Coinbase Crypto Protocol and LOB Representation
- Coinbase data cover BTC, ETH, BNB, XRP, and USDT, with 60-step windows and horizons of 100, 200, 500, and 1000 seconds.Chronological splits keep each window’s context and future label inside one raw interval to avoid train/test leakage.Source: §A.1 · p. 14, Table 4 · p. 14
A.2 How αlab Is Selected
- Crypto label thresholds are calibrated using training data, while Feishu labels use training-return quantiles at 1/3 and 2/3, frozen for evaluation.The Coinbase configuration uses train-only calibration; Feishu’s reported experiments use quantile labeling.Source: §A.2 · p. 15
A.3 How the Alpha-Stable Tail Index Is Selected
- The pooled OFI tail estimate is ˆα = 1.62; crypto configurations use clipped symbol-specific α values from 1.2 to 1.9, while Feishu uses α = 1.5.The Feishu value is a transfer default, not tuned on the out-of-sample portfolio period.Source: §A.3 · p. 15, Table 7 · p. 16
A.4 Heavy-Tail Evidence
- The normal reference is not the leading distribution fit: it ranks 11th for BTC increments and 31st for BTC feature PC1; pooled absolute OFI has ˆα = 1.62.The OFI tail fit uses the top 5% Hill/Pareto fit.Source: §A.4 · p. 16, Figure 4 · p. 16, Figure 5 · p. 16
A.5 Feishu Data Details
This material specifies the Feishu feature set and the score-table estimator, its Monte Carlo properties, and shared model and optimization choices. It describes a 259-coordinate Feishu tensor and a score-table procedure based on corruption-scale weighting.
A.5 Feishu Data Details
- Feishu’s feature tensor has 259 coordinates per asset-day: 240 intraday OFI features and 19 daily OHLCV and technical variables.The OFI block is arranged over 24 trading-day slots and 10 book levels.Source: §A.5 · pp. 16–17, Table 8 · p. 17
B GSM Score Table
- The score-table value h_t(r) is estimated by self-normalized importance sampling over corruption variance and represents posterior expected corruption precision.The proposal is the corruption law p_t(W), and the estimated quantity is E_p_t[g2(W, r)] = h_t(r).Source: §B.1 · p. 18
B.1 Monte Carlo Justification
- For fixed r > 0, the Monte Carlo estimate has pointwise M^-1/2 error scaling; interpolation and clamping add finite-grid discretization error.The stated guarantees do not provide a finite-sample bound at r = 0 for clipped alpha-stable corruption.Source: §B.1 · pp. 18, 20
C.1 Shared Architecture
- Both variants share a BiGRU, temporal self-attention, attention pooling, and score head; their corruption law and loss differ, while inference uses the same deterministic path.The classifier trunk has about 0.53M trainable parameters.Source: §C.1 · p. 20, §C.2 · p. 20
C.2 Optimization
- Training uses AdamW with learning rate 10^-4, selects checkpoints by validation macro-F1 on unperturbed windows, and sets the diffusion auxiliary weight to 1.0.Coinbase runs use batch size 64 and at most 80 epochs; Feishu runs use batch size 256 and at most 30 epochs.Source: §C.2 · p. 20
C.3 Crypto Evaluation
The crypto evaluation uses common chronological windows and measures standard held-out metrics alongside realized stress regimes. Feishu evaluates exported probabilities in a separate out-of-sample portfolio period, while the pseudocode distinguishes score-assisted training from deterministic inference.
C.3 Crypto Evaluation
- Crypto baselines share chronological windows, normalization, and train-calibrated thresholds; BTC stress evaluation freezes the checkpoint and decision setup while partitioning test windows by observed input statistics.Stress, realized variance, and jump-residual scores define the regimes examined.Source: §C.3 · p. 21
C.4 Feishu Evaluation
- Feishu uses a two-year in-sample period and a one-year out-of-sample release period, which is excluded from threshold, normalization, checkpoint, and trading-threshold selection.Model probabilities are exported day by day to the common portfolio engine.Source: §C.4 · p. 21
D Training and Inference Pseudocode
- Training combines classification and score losses on corrupted inputs, whereas inference returns classifier probabilities from an unperturbed window without the corruption sampler or reverse diffusion.The score table and score head are also not used at inference.Source: D Training and Inference Pseudocode · p. 21
E Additional Crypto Results
Additional Coinbase results show mixed but competitive held-out performance beyond BTC; the appendix also details the Feishu portfolio test and gives a posterior-precision interpretation of the score target.
E Additional Crypto Results
- StochLOB (alpha-stable) wins the BNB short-horizon cell and is competitive on ETH, XRP, and USDT; jump-Poisson is frequently near the top.The broader standard-test pattern is mixed, with linear and attention baselines remaining strong on several cells.Source: E Additional Crypto Results · p. 22, Table 10 · p. 23
F.1 Models and Prediction Targets
- The Feishu transfer test uses the same three-class next-period trend target and treats classifier probabilities as alpha signals, not as a separate trading model.It tests probability usability under constrained portfolio rules rather than claiming a deployable trading system.Source: §F.1 · p. 22
F.2 Portfolio Construction
- The portfolio rule applies common A-share constraints, including T+1 selling, transaction costs, a 5% cash buffer, and a 10-name minimum-holdings target.Buy eligibility requires P(up) > 0.75 and an up prediction; full-sale eligibility requires P(down) > 0.85 and a down prediction.Source: §F.2 · p. 23
F.3 Out-of-Sample Portfolio Metrics
- Several evaluated architectures produced mostly flat predictions and no meaningful active portfolios, so those inactive runs were omitted from the Table 3 comparison.The portfolio engine is shared across models; Table 3 reports the main out-of-sample metrics and Figure 3 shows cumulative returns.Source: §F.3 · p. 24
G Posterior-Precision Interpretation of ht
- For isotropic Gaussian scale mixtures, h_t(r) is posterior expected corruption precision and decreases with residual magnitude when the scale is non-degenerate.Clipping preserves residual adaptation but imposes a positive precision floor; this mechanism does not itself imply improved macro-F1.Source: G Posterior-Precision Interpretation… · pp. 24, 27, 29
G.1 Mathematical Rationale for Future Work
Stress transfer depends on whether training corruption covers both shock magnitudes and directions. The section derives limits of isotropic corruption and outlines state-aware, signed-shock, and evaluation extensions.
G.1 Mathematical Rationale for Future Work
- Stress transfer requires controlling both a training-side second moment and the coverage constant 1 + χ2(ν∥qt); this is sufficient, not necessary, for transfer.For the implemented finite noise-scale grid, the weighted objective controls each per-scale loss up to (πtwt)−1.Source: §G.1 · p. 30
- Gaussian corruption is a weak proxy for heavy-tailed stress: its exponential decay makes ν²/qt non-integrable in the far tail.For regularly varying tails, the radial factor is finite when αq < 2αν and divergent when αq > 2αν; the critical case depends on the slowly varying term.Source: §G.1 · p. 30
- Isotropic heavy-tailed corruption can still miss stress concentrated in low-dimensional signed-flow directions, making the angular term numerically vacuous.The proposed design implication is to estimate realized stress geometry as well as its tail behavior.Source: §G.1 · pp. 30–31
- At d=1860, keeping the angular exponent near order one requires CV(λ) ≲ d^-1/2 ≈ 2.3%.A 20% spectral dispersion can multiply the coverage constant by about 1016 and its square-root transfer bound by about 108.Source: §G.1 · p. 31, Table 12 · p. 31
- State-dependent random covariance could concentrate corruption on the levels, assets, and temporal coordinates where stress is empirically concentrated.This extension replaces scalar variance with a positive-definite random covariance while retaining the posterior-score principle.Source: §G.1 · p. 31
- Empirical jump replay would estimate state-conditioned signed shocks and covariances, addressing both radial mismatch and angular penalty.The current model is the special case Jt = 0 and Σt = WtId.Source: §G.1 · p. 32
- Paired seed-level differences in evaluation metrics can quantify the marginal effect of score matching and compare temporal readouts.The proposed score-loss effect is ∆s = M(λs) − M(0).Source: §G.1 · p. 32
- For the Feishu extension, thresholds should be selected by expected net utility under transaction costs rather than fixed cutoffs independent of costs.The threshold vector replaces the continuous trade variable in the single-period mean–variance objective.Source: §G.1 · p. 32