High-Frequency Direction Forecasting of the Futures Market Using a Machine-Learning-Based Method

Shangkun Deng, Yingke Zhu, Xiaoru Huang, Shuangyang Duan, Zhe FuFuture Internet 2022

TL;DR

This paper introduces a novel machine learning approach for predicting the direction of rebar futures prices at a high frequency. By combining XGBoost for prediction, SMOTE for handling imbalanced data, and NSGA-II for optimizing trading strategies, the method achieves superior accuracy and profitability compared to existing benchmarks, offering a promising tool for traders and market participants.

What Problem Does This Paper Address?

Forecasting price movements in financial markets, especially at high frequencies, is a notoriously challenging task. The rebar futures market in China is particularly significant due to its high trading volume and its role in the steel industry. Existing traditional econometric methods often struggle with the nonlinear characteristics of financial time series. While machine learning approaches like ANNs, SVMs, and Random Forests have shown promise, there's a need for more robust methods that can handle data imbalances and optimize trading strategies effectively. Specifically, the problem of imbalanced class distribution in high-frequency data can lead to poor performance for minority classes, and simply predicting direction doesn't guarantee profitable trading due to the need for optimized trading rules that consider both profit and risk.

Methods

The paper proposes a hybrid approach integrating three key techniques:

  • XGBoost (eXtreme Gradient Boosting): This is the core machine learning algorithm used for multiclassification of price movement direction. XGBoost is chosen for its high accuracy, speed, and ability to handle complex datasets, building upon gradient boosting principles with regularization to prevent overfitting.
  • SMOTE (Synthetic Minority Oversampling Technique): To address the issue of imbalanced data, where certain price movement categories are underrepresented, SMOTE is employed. It generates synthetic samples for minority classes, creating a more balanced training dataset to improve the classifier's performance on these underrepresented categories.
  • NSGA-II (Non-dominated Sorting Genetic Algorithm-II): This multiobjective optimization algorithm is used to optimize the parameters of a pre-designed trading rule. Unlike previous approaches that might focus solely on profit, NSGA-II considers both the maximization of accumulated return and the minimization of maximum drawdown (a measure of risk), aiming to find Pareto optimal solutions for a more balanced trading strategy.
  • LIME (Local Interpretable Model-agnostic Explanations): To enhance the interpretability of the XGBoost model, LIME is used to explain how specific features contribute to the prediction of price movement direction.

Datasets

The study utilizes 5-minute historical trading data of rebar futures from the Shanghai Futures Exchange, collected from January 4, 2016, to December 31, 2020. This data is transformed into 1-hour intervals and normalized. The dataset is divided into four consecutive experimental datasets, each consisting of a training and a testing period. The specific date ranges and sample sizes for these datasets are detailed in Table 1. No new benchmarks were introduced; rather, existing passive strategies (Buy-and-Hold, Short-and-Hold) and various machine learning models were used for comparison.

Key Insights and Ideas

  • The Power of Hybridization: The core insight is that combining specialized techniques—XGBoost for prediction, SMOTE for data balancing, and NSGA-II for strategy optimization—yields significantly better results than using any single method.
  • Data Imbalance is a Real Hurdle: The paper strongly demonstrates that class imbalance in financial data negatively impacts prediction accuracy, and SMOTE is an effective solution.
  • Risk-Aware Trading is Crucial: Simply predicting price direction isn't enough for profitable trading. Optimizing trading rules to balance profit (accumulated return) and risk (maximum drawdown) using NSGA-II is key to achieving superior trading performance.
  • Interpretability Matters: Using LIME to understand feature importance helps build trust and provides actionable insights for market participants, going beyond a "black box" prediction.
  • Feature Importance Reveals Market Dynamics: The analysis of feature importance highlights that return and trading volume change rates are consistently the most influential factors for predicting rebar futures price direction, with lagged trading volume being particularly significant.

Key Results

  • Superior Hit Ratio: The proposed XGBoost-SMOTE-NSGA-II method achieved the best average hit ratio of 53.98%, outperforming all benchmark methods, including XGBoost, RF, SVM, and ANN.
  • Exceptional Accumulated Return: The model generated an average accumulated return of 34.9% over the four testing periods and a total one-year return of 1.395, significantly outperforming all benchmark strategies, including passive ones like Buy-and-Hold.
  • Improved Risk Management: The proposed method achieved a maximum drawdown of 0.135, which was considerably lower than most machine learning benchmarks, indicating better stability.
  • Best Return-Risk Ratio: The Sharpe ratio for the proposed method was an impressive 3.6574, far exceeding all other methods, demonstrating a superior balance of profitability and risk.
  • Feature Significance: Return and trading volume change rates were identified as the most important features for prediction, with lagged trading volume showing consistent influence.

Limitations and Future Work

  • Limited Time Horizon: The study used historical data from ten periods to predict five periods ahead. Future work could explore different time frames and prediction horizons.
  • Ignoring Market Sentiment: The current model relies solely on historical price data. Future research could incorporate investor sentiment and behavioral factors to further improve prediction accuracy.
  • Exploring Other Algorithms: While XGBoost performed well, the authors suggest exploring other advanced machine learning algorithms for multiclassification, such as CatBoost and LightGBM.
  • Alternative Imbalance Handling: The paper mentions exploring other methods for handling imbalanced data, such as Generative Adversarial Networks (GANs) and improved SMOTE variants.
  • Broader Data Scope: Investigating the impact of different data frequencies and potentially incorporating other relevant market data could be beneficial.

Summary updated

BibTeX
@article{deng2022high,
  author = {Shangkun Deng and Yingke Zhu and Xiaoru Huang and Shuangyang Duan and Zhe Fu},
  title = {{High-Frequency Direction Forecasting of the Futures Market Using a Machine-Learning-Based Method}},
  journal = {Future Internet},
  year = {2022},
  doi = {10.3390/fi14060180},
}
Figure