Why crypto market liquidity forecasting breaks down in practice
Crypto market liquidity forecasting breaks not at the model stage, but at the data stage. Market depth estimates arrive with a lag: by the time a signal is computed and delivered, quotes have already moved, and the thin order book on second-tier pairs has dispersed.
According to industry measurements by Kaiko, depth within a few percent of price on some instruments takes minutes to recover — and all that time the forecast remains valid on historical snapshots and unexecutable in practice.
The cost of this error is visible immediately. Trade slippage grows non-linearly with order size, and in market volatility the calculated entry price and the actual price differ so much that the trade loses its meaning.
A model trained on averaged daily aggregates physically cannot see the moment when the order book collapses in response to a news impulse: such a state simply does not exist in the training sample.
The second failure zone is the gap between forecast and execution.
The model and the order placement logic are built separately, there is no common metric between them, so execution failure is blamed on a "bad market" rather than on the fact that the forecast did not account for costs and signal delivery latency.
This is also where the share of canceled and re-placed orders grows — orders that themselves move the market against the position.
The third reason is the lack of feedback. Without a log of actual executions, it is impossible to understand exactly where quality is lost: in the features, in the computation latency, or in the rules for working with orders.
We break down how this is closed: from streaming data collection and timestamp synchronization to end-to-end verification of the forecast against actual execution.
What changes after implementing the model: measurable effects
The effect of implementation is measured not by a general quality metric but by four quantities visible in the trade report.
We measure them twice — on history with order book reconstruction and on the live stream — to separate the model's contribution from changed market conditions.
- Forecast accuracy over the trade horizon. A model on PyTorch relies on order book depth, the trade flow, and the imbalance between sides; the share of correct signals over the required horizon moves from random-guess level to 60–70% on a holdout sample.
- Reduced slippage and execution cost. Order size is calculated from the forecast of available liquidity, so entry "eats" the book less often: the deviation of execution price from the calculated price drops severalfold, and commissions and spread losses stop being the strategy's main cost.
- Fewer outages in order handling. The forecasting service keeps response time within the set budget, the order queue does not pile up, and a backup version takes over on degradation — the trading loop does not stop during retraining.
- Resilience during shock periods. On sharp moves the metric declines in a controlled manner: drift control switches the model into a cautious mode with a reduced position size instead of an avalanche-like growth of errors.
We verify each effect on historical windows, including shock periods, and on the live stream — with a version log and rollback capability.
Liquidity forecasting: approaches and their limitations
Liquidity is not a single quantity but a set: spread width, order book depth, the price's resilience to a trade of a certain size.
A one-minute forecast and a one-day forecast are different tasks, and their error metrics are not comparable, so the first thing we do is fix the forecast horizon and the decision made on its basis.
The main constraint is a regime change in volatility. A model tuned to a calm market produces confident but incorrect values on a sharp move, and this is more dangerous than a refusal: the system keeps trading on outdated logic.
That is why we compare options not by accuracy on history but by behavior at the boundary between regimes.
| Approach | When it fits | Where it breaks |
|---|---|---|
| Threshold rules on spread and volume | Calm regime, coarse signaling, fast launch needed | Do not transfer across regime changes, require manual re-tuning |
| Statistical models (ARIMA, GARCH) | Short horizon, liquid pairs, interpretability matters | Require series stationarity, miss non-linear shifts |
| Trainable models on tabular features | Lots of data and features, medium forecast horizon | Overfitting on rare events, feature drift between regimes |
| Sequence networks on order flow | Second-level horizon, full event stream available | Expensive maintenance, sensitivity to data latency |
In practice, a working loop usually combines two levels: fast statistical estimates for the short horizon and a trainable model for the medium one, with a regime-change detector and a conservative fallback forecast.
We break down how such a loop is assembled for a specific task and which checks screen out models that are unstable to regime changes.
Implementation stages: from data audit to a working model
The sequence of work is structured so that each step relies on the verified result of the previous one.
A liquidity forecasting model more often errs not because of its architecture but because of the quality of the history: gaps in the order book, different exchange time zones, market regime changes. That is why training does not begin until the data is brought to a comparable form.
- Data audit — we reconcile the depth of history by exchanges and pairs, looking for time gaps and gaps in order book snapshots. We mark the sections suitable for training and those that will have to be excluded.
- Task definition — we choose the forecast horizon and the target quantity: spread, order book depth, or the probability of a drawdown. The model type and the method of evaluating the result depend on it.
- Feature preparation — order imbalance, cancellation intensity, volatility and volume over windows. Each feature is computed only from past data, otherwise the future leaks into training.
- Training and selection — we compare several models not by a single metric but by stability in a calm market and during sharp moves.
- Model validation — a rolling window: we train on one segment, validate on the next, shift and repeat. This shows where overfitting to a specific market regime began.
- Deployment into production — the service delivers a forecast with real-time feature updates; the trigger threshold and rollback to the previous version are configured.
Each stage ends with a verifiable artifact: a data report, a feature set, metrics on holdout periods. We move to the next step only when the previous one has passed validation.
Data, features, and model operation regulations
After the model is handed over to the client, what remains is not a report but a reproducible loop: data, features, code, and the regulations by which the model lives on without our involvement.
Any training run is reproduced from the source snapshots with a single command — divergence occurs only where we deliberately changed parameters.
- Datasets. Raw order book and trade snapshots, hourly aggregates, a unified storage format. The dataset version is fixed by a checksum — retraining runs on exactly the same sample.
- Feature labeling. For each feature: source, computation window, missing-value handling, normalization. It is separately noted which features are time-shifted so that future values do not leak into training.
- Model code. Training and signal computation are separated, the random number generator seed is fixed, parameters are moved to a settings file — an edit does not require a rebuild.
- Computation schemes. The data flow from source to final signal and the dependency map between features.
- Monitoring regulations. The list of quality and feature-drift metrics, control horizons, thresholds at which the model is taken out of operation, and who makes that decision.
- Update regulations. Retraining frequency, validation window, the procedure for rolling back to the previous version on quality degradation.
- Model documentation. Assumptions, scope limits, and known weaknesses — they will not have to be hunted for in production.
Case study: how the model kept trade execution stable during shock days
The task came from a team that executed large orders on the spot market. The splitting logic was fixed: volume was cut into equal parts at equal intervals, and the state of the order book was not taken into account.
During calm hours this produced an acceptable result, but during shock periods the depth on the required side dropped severalfold within minutes — execution drifted to distant levels, and part of the volume remained unfilled until cancellation.
Features were assembled from order book history: depth across ten levels, spread, the imbalance of buy and sell volumes, trade intensity, the behavior of neighboring instruments.
The task was formulated as forecasting liquidity over the execution window horizon; the historical labeling of shock episodes was verified against public CoinGecko data so that the model would learn not only from internal logs.
The output is the probability that liquidity at the required level will survive until the end of the window, and a splitting recommendation.
Metrics before and after on comparable periods:
- share of trades at the worst price within available depth: 18% → 6%;
- share of failed orders during shock hours: 12% → 3%;
- slippage relative to the mid-spread halved.
The model flagged three shock episodes with a liquidity collapse in advance — from forty seconds to two minutes before the depth drop.
In two cases, execution was moved to passive mode in time and did not push the price, and in the third, the order was postponed until depth returned. False signals during calm hours numbered a few per hundreds of windows and did not interfere with normal operation.
What to do if historical data is scarce or incomplete?
A short instrument history is not a death sentence if you understand where the data ends and the assumptions begin. The problem is usually not the volume but the structure: gaps in trade records, breaks at the change of trading sessions, isolated outliers from feed failures.
On such series, a model easily learns the noise and shows a beautiful validation accuracy that it does not confirm on live data.
We start collecting historical data not from a single source but from several: candles and trade tapes from different venues overlap each other, and gaps are reconstructed from the intersection.
Where there is no overlap, we mark the section as unknown rather than filling it with an average: interpolation from neighboring points creates a fictitious smoothness on which the model stops distinguishing volatility spikes. Then we bring everything to a single frequency and verify that timestamps are synchronized.
With a small sample, transfer learning from more liquid instruments and a hard limit on the number of features work well — five stable ones are better than forty correlated ones.
Additionally, we use block generation of synthetic windows that preserves order and autocorrelation, and rolling validation over time: training on the past, validation on the next period without shuffling.
The quality of labeling here is more critical than the architecture. We define the target variable through observable market states — order book depth drawdown, spread widening, rising slippage — and fix the labeling rules in writing.
Disputed sections go to manual review by two labelers, and discrepancies are resolved rather than averaged.
We define honest boundaries in advance: the model outputs an interval and a probability rather than a point forecast, and we state under which market regimes it loses reliability.
If the instrument's history is insufficient for a stable estimate, this is recorded in the report before launch — a narrow scope of applicability is better than a failure at the moment the forecast is needed.
Concerns about data, horizon, and model stability
Clients' concerns are usually not about architecture but about practice: will the forecast hold up in a volatile market, how often to retrain the model, and won't it become a point of failure in a running trading loop.
We check model stability with a rolling window across consecutive periods, not a single holdout sample. We verify market data against independent sources, including CoinGecko: discrepancies in inputs are easily masked as a forecast error.
How stable is the forecast in an unstable market?
We validate the model on periods of sharp moves, not a single holdout sample: we look at quality in each window and degradation when the market shifts.
We maintain an ensemble with a confidence threshold — on a weak signal, the system gets an explicit refusal instead of a questionable number.
How often do you retrain, and what about data protection?
Rebuilds happen on schedule and on trigger: the input distribution has shifted or out-of-sample quality has dropped. Data lives in a separate loop — role-based rights, encryption at rest and in transit, anonymized datasets for experiments, an access log.
How is the forecast embedded into the trading system?
The forecast is delivered by a separate service with a versioned interface.
The trading loop receives the value together with the horizon and a confidence estimate and makes the decision itself — a forecast failure does not block execution, and rollback to the previous version happens without stopping trading.
Let's discuss the task: what's needed to start work
To come back with a timeline estimate and a work plan, a few inputs are enough — collecting them takes less time than the first conversation. The more concretely the task definition and target metric are formulated, the fewer assumptions we build into the estimate. Below is what is useful to send and which questions we will close together.
- Describe exactly what we are forecasting: order book depth, spread, the available execution volume for a large order, or liquidity outflow in specific pairs and on which exchanges. The feature set and the class of models depend on this.
- Specify the forecast horizon — minutes, hours, or days — and the decision that relies on it: quoting, splitting a large order, risk limits.
- Send the available data: trade and order book history, metrics by exchange and liquidity pool, aggregators, your own logs. Immediately flag known gaps, breaks, and market regime changes — this determines the scope of data preparation.
- Name the target quality metrics and the acceptable error in different market segments, as well as what we consider a false signal. Without an acceptance criterion, models cannot be compared, nor can the work result be fixed.
- Tell us about the infrastructure and constraints: where we compute, how fast the forecast is needed, what requirements exist for reproducibility and history storage, and who on the client side accepts the result.
- Outline priorities and expected timeline frames — the order of stages and what goes into the first version depend on this.
Next, we propose a pilot launch: a narrow loop on one market or instrument, training on historical data, validation on a holdout period, and comparison with the current approach. If quality is confirmed, we expand the set of markets and embed the model into the working loop. Describe the task — we will come back with a timeline estimate and a stage-by-stage work plan.







