Quant Memo
Core

Sampling and Class Balance in Tick-Level Models

A model predicting the next tick's direction faces a training set that is overwhelmingly "no meaningful move," and training naively on that imbalance produces a model that just learns to predict the majority class.

At the level of individual ticks or quotes, most events are uninteresting: the price doesn't move, or it moves by an amount too small to matter for a trading decision. If a model is trained to classify "up move," "down move," or "no move" and 95% of ticks fall in the last category, a model that always predicts "no move" already scores 95% accuracy while being completely useless for trading. This class imbalance means standard training, which minimizes overall error, will happily settle for ignoring the rare classes entirely, since they contribute so little to the total error either way.

Fixing this usually means changing how samples enter training rather than changing the model: undersampling the majority class so "no move" ticks don't dominate the training set, oversampling the rare classes, or switching to event-based sampling that only keeps ticks around meaningful price changes in the first place, discarding the quiet stretches before training even begins.

When one outcome dominates a tick-level dataset, standard training will optimize for ignoring the rare, tradeable outcomes — resampling the training set toward balance is usually necessary before a model can learn anything useful.

In a dataset of 100,000 ticks where only 4,000 show a meaningful directional move, training on all of them lets a model reach 96% accuracy by predicting "no move" every time; undersampling down to a roughly even split of moves and non-moves forces it to actually learn what precedes a move.

Related concepts

Practice in interviews

Further reading

  • de Prado, Advances in Financial Machine Learning (ch. 3)
ShareTwitterLinkedIn