Improving long short-term memory (LSTM) networks for arbitrage spread forecasting: integrating cuckoo and zebra algorithms in chaotic mapping space for enhanced accuracy

View article
PeerJ Computer Science

Main article text

 

Introduction

  • 1)

    We replaced the Lévy flights in the cuckoo algorithm with a “zebra” pattern search strategy that incorporates the zebra algorithm’s adaptive search step mechanism and probabilistic strategy selection. This enhances the algorithm’s global exploration, local exploitation, convergence speed, and optimization efficiency while reducing the risk of getting stuck in local optima.

  • 2)

    We propose an innovative ICS-LSTM network model optimized using the ICS for hyperparameter tuning. This model enables adaptive training with diverse financial time series data, specifically enhancing the accuracy of arbitrage spread predictions.

Data analysis

Materials and Methods

ICS algorithm

where xtj and xtk are two solutions chosen randomly by random permutations, H is the Heaviside function that turns a discontinuous signal into a continuous function, thus facilitating analysis and processing. ϵ is a random number drawn from a uniform distribution, s is the step size, and is the dot product operator. By generating a random matrix and comparing it to the parameter pa, if the random number is greater than pa, the corresponding position will return True (indicating retention), otherwise, it returns False indicating abandonment. On the other hand, global exploratory random wandering is achieved by Lévy flights, which are random wandering in random directions with step sizes derived from Lévy distributions. These Lévy flights are performed by animals and insects and are characterized by a series of straight flights followed by an abrupt 90-degree turn. The specific formulas are shown in Eqs. (3) and (4), where α > 0 is the step size scaling factor which is related to the size of the problem of interest, in most cases we can use α = 1. 1s1+λ is a power operation on s used to scale the step size. This determines the direction of the step and the size of the base. λΓ(λ)sin(πλ2)π determines the direction of the step and the size of the base. λ is a shape parameter (also known as the stability index or order) of the Lévy distribution that controls the hopping behavior of the Lévy flight. This parameter affects the thickness of the tail of the Lévy distribution, i.e., how often large jump steps occur.

ICS-LSTM

Structure of ICS-LSTM

Steps of the ICS

Results and discussion

Test function

Data processing

Metrics

where yi is the predicted output value of the ith observation of the model, ˆyi is the expected value, and n denotes the number of samples. If the value of MAE, MSE, and MAPE is smaller, the smaller the deviation between the predicted value and the original value. Also the closer the coefficient of determination R2 is to 1, the better the model fits. In addition to the aforementioned indicators, one traditional assessment indicator has been employed, as defined in Eq. (14).

where zt={1,if(yt+1yt)(ˆyt+1yt)>00,if(yt+1yt)(ˆyt+1yt)<0; symbol accuracy focuses on the correctness of the trend direction, which is more important in arbitrage scenarios than precise numerical predictions.

Model implementation

Experimental results and analysis

Conclusions

Supplemental Information

CEC 2019 test suite.

DOI: 10.7717/peerj-cs.2552/supp-2

Flowchart of the ICS-LSTM.

DOI: 10.7717/peerj-cs.2552/supp-3

Code for Improved Cuckoo Algorithm Optimised LSTMs.

DOI: 10.7717/peerj-cs.2552/supp-4

Optimization process for each parameter.

DOI: 10.7717/peerj-cs.2552/supp-5

Population initialization methods.

DOI: 10.7717/peerj-cs.2552/supp-6

Data: optimization process for each parameter.

DOI: 10.7717/peerj-cs.2552/supp-7

Source and Shanghai Futures Exchange spread data for rebar and HRC.

DOI: 10.7717/peerj-cs.2552/supp-8

Additional Information and Declarations

Competing Interests

Mingfu Zhu and Panke Qin were employed by Hebi National Optoelectronics Technology Co.

Author Contributions

Mingfu Zhu analyzed the data, authored or reviewed drafts of the article, and approved the final draft.

Yaxing Liu conceived and designed the experiments, performed the experiments, analyzed the data, performed the computation work, prepared figures and/or tables, authored or reviewed drafts of the article, and approved the final draft.

Panke Qin analyzed the data, authored or reviewed drafts of the article, and approved the final draft.

Yongjie Ding analyzed the data, authored or reviewed drafts of the article, and approved the final draft.

Zhongqi Cai analyzed the data, authored or reviewed drafts of the article, and approved the final draft.

Zhenlun Gao analyzed the data, authored or reviewed drafts of the article, and approved the final draft.

Bo Ye analyzed the data, authored or reviewed drafts of the article, and approved the final draft.

Haoran Qi analyzed the data, authored or reviewed drafts of the article, and approved the final draft.

Shenjie Cheng analyzed the data, authored or reviewed drafts of the article, and approved the final draft.

Zeliang Zeng analyzed the data, authored or reviewed drafts of the article, and approved the final draft.

Data Availability

The following information was supplied regarding data availability:

The original code and data are available in the Supplemental Files.

Funding

This work was supported by Henan Provincial Key R&D Special Project “Key Technology and Industrialisation of Intelligent Fusion of Multi-Source Heterogeneous Sensors Based on New Generation Communication Technology” (No. 231111210500), Henan University Science and Technology Innovation Team Support Plan (No. 20IRTSTHN013) and Henan Province Key R&D and Promotion Special Project (No. 212102210166). The funders had no role in study design, data collection and analysis, decision to publish, or preparation of the manuscript.

502 Visitors 484 Views 11 Downloads

MIT

Your institution may have Open Access funds available for qualifying authors. See if you qualify

Publish for free

Comment on Articles or Preprints and we'll waive your author fee
Learn more

Five new journals in Chemistry

Free to publish • Peer-reviewed • From PeerJ
Find out more