An optimized LSTM network for improving arbitrage spread forecasting using ant colony cross-searching in the K-fold hyperparameter space

PeerJ Comput Sci. 2024 Aug 9:10:e2215. doi: 10.7717/peerj-cs.2215. eCollection 2024.

Abstract

Arbitrage spread prediction can provide valuable insights into the identification of arbitrage signals and assessing associated risks in algorithmic trading. However, achieving precise forecasts by increasing model complexity remains a challenging task. Moreover, uncertainty in the development and maintenance of model often results in extremely unstable returns. To address these challenges, we propose a K-fold cross-search algorithm-optimized LSTM (KCS-LSTM) network for arbitrage spread prediction. The KCS heuristic algorithm incorporates an iterative updating mechanism of the search space with intervals as the basic unit into the traditional ant colony optimization. It optimized the hyperparameters of the LSTM model with a modified fitness function to automatically adapt to various data sets, thereby simplified and enhanced the efficiency of model development. The KCS-LSTM network was validated using real spread data of rebar and hot-rolled coil from the past three years. The results demonstrate that the proposed model outperforms several common models on sMAPE by improving up to 12.6% to 72.4%. The KCS-LSTM network is shown to be competitive in predicting arbitrage spreads compared to complex neural network models.

Keywords: Heuristic algorithm; Hyperparameter tuning; Intercommodity spread; LSTM network.

Grants and funding

This work was supported by the Henan University Science and Technology Innovation Team Support Plan (20IRTSTHN013) and Henan Province Key R&D and Promotion Special Project (212102210166). The funders had no role in study design, data collection and analysis, decision to publish, or preparation of the manuscript.