Mid-price Prediction Based on Machine Learning Methods with Technical and Quantitative Indicators

Adamantios Ntakaris, Juho Kanniainen, Moncef Gabbouj, Alexandros IosifidisarXiv 2019 · DOI

TL;DR

This paper tackles the challenge of predicting short-term stock mid-price movements in high-frequency trading (HFT) environments. By evaluating a massive pool of over 270 hand-crafted technical and quantitative features using a wrapper-based feature selection framework, the authors show that you don't need massive feature sets to get optimal results. In fact, a carefully selected group of just a few advanced features—including a novel online adaptive logistic regression indicator introduced in this work—can match or outperform complex, high-dimensional models.

What Problem Does This Paper Address?

In high-frequency trading, predicting the direction of a stock's mid-price (the average of the best bid and ask price) within milliseconds is vital for market makers managing inventory and traders looking for an edge.

Figure 1: The concept of mid-price prediction can be described as follows: at a given time instance t, the state of the stock is encoded in a vector-based representation calculated using a multi-dimensional time series information from a short-term time window of length T. Given this representation, the direction of the mid-price is predicted at a horizon of ∆t.

While machine learning has become a standard tool for this task, most existing literature relies on a very limited, arbitrary selection of features without explaining why those features were chosen. Financial time-series data is notoriously noisy and non-stationary, meaning that throwing more features at a classifier often introduces more noise than signal. This paper systematically addresses this gap by creating an extensive pool of 273 features across different trading methodologies and determining the absolute best combinations using rigorous feature-sorting techniques.

Methods

The authors developed a comprehensive pipeline to extract, sort, and classify financial features:

  1. Feature Pool Generation: They compiled 273 hand-crafted features divided into three main buckets:
  2. Limit Order Book (LOB) Features: Basic raw data, price/volume differences, and intensities.
  3. Technical Indicators: Classic and advanced charting tools (e.g., RSI, Bollinger Bands, MACD) augmented with digital filters (like the Savitzky-Golay filter).
  4. Quantitative Indicators: Statistical features tracking autocorrelation, partial correlation, and cointegration.
  5. Novel Feature (Adaptive Logistic Regression): The standout addition is a new quantitative feature designed for online learning. It models the local behavior of LOB levels using a logistic function where the learning rate is adaptively updated via a Hessian matrix.
  6. Wrapper Feature Selection: To find the most predictive features, they used a wrapper method that incrementally adds features based on five distinct sorting criteria derived from Entropy, Least-Mean-Squares (LMS), and Linear Discriminant Analysis (LDA).
Figure 2: The process of feature sorting and classification is based on the wrapper method. From left to right: 1) Raw data is converted to LOB data via supeclustering, 2) the feature extraction process follows (i.e., three feature sets are extracted), 3) then every feature set is normalized based on z-score in a rolling window basis (see Section 6 for details), 4) Wrapper method: there are two main blocks in this process - the first block refers to the sorting (i.e., five different sorting criteria based on entropy, LMS1, LMS2, LDA1, and LDA2) of the feature sets independently (i.e., LOB features, technical indicators, and quantitative indicators are sorted separately) and all together (i.e., the three feature sets are merged and sorted all together) and the second block refers to the incremental classification (i.e., we increase the dimension of every sorting list during classification by one feature in every loop and average the final f1 scores per sorting list) based on three classifiers (i.e., LMS, LDA, and RBFN).

For the final classification task, they benchmarked three models: LMS, LDA, and a non-linear Radial Basis Function Network (RBFN).

Datasets

The experiments were conducted using the FI-2010 dataset, a widely recognized benchmark containing high-frequency limit order book data from the Nasdaq Nordic exchange. The dataset tracks five distinct stocks and encompasses over 4.5 million individual message-book events. The authors utilized an anchored cross-validation format to prevent look-ahead bias, ensuring that the rolling z-score normalization of the training data remained entirely untouched by future information.

Key Insights and Ideas

  • Less is More: One of the most striking findings is that classification performance quickly plateaus. For several model combinations, adding more than 5 highly informative features actually degrades or stabilizes performance rather than improving it.
  • The Power of Online Learning Features: The newly proposed Adaptive Logistic Regression feature was consistently ranked as the number-one most informative feature across four out of the five feature selection metrics. This demonstrates that features capable of adapting to real-time market shifts carry significantly more predictive power than static historical indicators.
  • Methodological Synergy: Technical analysis (charting patterns) and quantitative analysis (statistical modeling) are often viewed as competing schools of thought. This paper proves they are complementary; combining a few advanced features from both pools yields the highest F1-macro scores.

Key Results

  • Early Performance Plateaus: Models like LMS2-LMS and LDA2-RBFN reached their peak F1-macro scores (~0.44 to 0.46) using only approximately 5 top features.
  • Prediction Horizons: The framework evaluated mid-price movements at horizons of 10, 20, and 30 future events. Across the board, the combination of technical and quantitative features consistently outperformed baselines that relied solely on standard LOB features. For instance, at a 20-event horizon, the total feature pool achieved an F1 score of 0.462, compared to just 0.400 when restricting the model to standard LOB features.

Limitations and Future Work

While the results are promising, the authors note a few areas for expansion:

  • Asset Diversity: The current study is strictly limited to equity data from Nasdaq Nordic. The authors point out that this framework needs to be validated on other highly liquid asset classes, such as foreign exchange (FX) rates and cryptocurrency (Bitcoin) time series.
  • Classifier Complexity: The study intentionally focused on simpler linear and RBFN classifiers to isolate the impact of feature selection. The authors acknowledge that integrating these optimized, low-dimensional feature subsets into deep learning architectures—like Convolutional Neural Networks (CNNs) and Recurrent Neural Networks (RNNs)—is a natural and promising next step.

Summary updated

Abstract

Stock price prediction is a challenging task, but machine learning methods have recently been used successfully for this purpose. In this paper, we extract over 270 hand-crafted features (factors) inspired by technical and quantitative analysis and tested their validity on short-term mid-price movement prediction. We focus on a wrapper feature selection method using entropy, least-mean squares, and linear discriminant analysis. We also build a new quantitative feature based on adaptive logistic regression for online learning, which is constantly selected first among the majority of the proposed feature selection methods. This study examines the best combination of features using high frequency limit order book data from Nasdaq Nordic. Our results suggest that sorting methods and classifiers can be used in such a way that one can reach the best performance with a combination of only very few advanced hand-crafted features.
BibTeX
@misc{ntakaris2019mid,
  author = {Adamantios Ntakaris and Juho Kanniainen and Moncef Gabbouj and Alexandros Iosifidis},
  title = {{Mid-price Prediction Based on Machine Learning Methods with Technical and Quantitative Indicators}},
  year = {2019},
  eprint = {1907.09452},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1907.09452},
}

Loading related content...

Figure