Machine Learning  ·  Trading Systems  ·  Execution Risk

ML works
where market state
is hidden.

The practical edge is not asking machine learning to predict every price move. It is using ML to detect when the market has shifted into a state where normal trading logic becomes unsafe.

Market State Adverse Selection Volatility Clustering Liquidity Stress HFT Risk Overlay
Wrong question
Predict price
Too broad, noisy, and weak after costs
Right question
Detect state
Stress, burst, chop, whipsaw, toxic flow
Desk value
Change posture
Widen, reduce, hedge, pause, throttle

Machine learning in trading fails when it is sold as a magic price predictor.

It becomes useful when the trading problem has structure: hidden states, nonlinear interactions, data-heavy microstructure, persistent behaviour, and a clear execution action.

"ML is not a better trader. ML is a better state observer."

The model must change an execution decision.

01
Good ML problem
The state is hidden, the relationship is nonlinear, the data is heavy, the behaviour repeats or persists, and the output changes execution.
Examples: liquidity stress, adverse selection, volatility burst, whipsaw state, toxic passive-fill windows.
02
Weak ML problem
The evidence is weak, the sample is small, the relationship is unstable, the result is not actionable, or the model only works after selecting the best backtest.
Desk test: does the output change quote size, spread, hedge timing, participation rate, or inventory limits?

1. Latent market states.

A market state is not directly visible. You do not observe “stress,” “chop,” “fragility,” or “toxic regime” in raw data. You infer it.

That makes state detection one of the cleanest use cases for machine learning.

"The value is not prediction for its own sake. The value is knowing whether normal trading logic should still be active."

2. Nonlinear market behaviour.

Many trading rules fail because they are too linear. The same signal can mean opposite things depending on the state.

A
High volume
Can mean trend continuation. It can also mean exhaustion. The difference depends on range, close location, wick behaviour, liquidity, and flow persistence.
B
Wide range
Can mean breakout. It can also mean a stop-run reversal. A single indicator is not enough; the condition stack matters.
C
High imbalance
Can indicate informed flow. It can also indicate temporary crowding. ML helps when flow, book state, volatility, and refill behaviour must be read together.
Better framing: not indicator → trade. Instead: state + flow + volatility + liquidity + time context → risk probability.

3. Data-heavy adverse selection.

For a market maker, the real question is simple: if I provide liquidity now, am I earning spread or being picked off?

This is not a charting problem. It is a microstructure problem. The edge is in the interaction between book state, trade flow, quote behaviour, and short-horizon price movement.

LOB
Order book state
Depth, imbalance, microprice, refill speed, queue pressure, quote instability.
TRD
Trade flow
Aggressor flow, sweep size, trade intensity, one-sided pressure, short-horizon continuation.
ACT
Desk action
Widen quote, reduce size, cancel passive order, skew inventory, hedge faster, or lower inventory limits.

"The output should not be buy or sell. The output should be: this is a toxic passive-fill window."

4. In HFT, ML should usually sit outside the critical order path.

A serious HFT desk may reject a black-box model inside the latency-sensitive order loop. But it may accept a monitored ML overlay that changes risk parameters around that path.

Practical rule: ML should control posture before the order path, not become an unmonitored bottleneck inside the order path.

5. Persistent and clustered behaviour.

Volatility clusters. Liquidity stress clusters. Momentum and chop cluster. Slippage often clusters around specific states.

The useful question is not simply whether risk is high. The useful question is whether stress will disappear quickly or persist for the next 5–30 minutes.

Weak
Volatility is high
This is obvious and usually not enough for a desk decision.
Strong
Volatility is high, liquidity is fragile, and whipsaw risk is rising
This can change quote width, passive size, hedge urgency, and execution timing.

Three traps that destroy trading ML.

01
Weak statistical evidence
Many indicators, horizons, instruments, and models can create false alpha if the best backtest is selected after many trials.
Trader’s test: would this still look good if every failed experiment were counted?
02
Non-stationarity
Participants, fees, tick sizes, liquidity providers, volatility regimes, funding dynamics, and option dealer positioning change over time.
Risk: the feature still exists, but the relationship stops working or reverses.
03
No execution action
A 60% probability is not useful unless it changes quote size, spread, hedge timing, participation rate, or risk limits.
Rule: if the output cannot change execution, it is a research chart, not a trading system.

The model is ready only when you know when not to trust it.

Machine learning earns its place in trading when it protects the desk from applying the right strategy in the wrong state. The strongest use case is not predict the next price. It is know when your normal edge is no longer operating under normal conditions.

Alphashots.AI
Execution ML & Market Microstructure Intelligence