1 Introduction

The PAP assumes a crucial function in assessing the fiscal well-being of enterprises and enabling well-informed decision-making (Gupta and Kumar 2023; Tan et al. 2022; Li and Sun 2020). The precise prediction of profits offers significant insights into the financial performance of a company (He et al. 2023a), workflow scheduling (Xie et al. 2023), pricing policy (Wu et al. 2022), task offloading scheme (Wang et al. 2023a), intergenerational income mobility (Huang et al. 2021), reverse auctions (Li et al. 2021), facilitating strategic planning and the allocation of resources (Jiang et al. 2022a; Livieris et al. 2022). In recent times, there has been an increasing inclination towards utilizing machine learning methodologies to augment the precision of various phenomena prediction (Singh et al. 2022; Zheng et al. 2022; Zhang et al. 2022, 2023a; Zhao et al. 2023). This paper focuses on enhancing the deep LSTM (Qian et al. 2022) by incorporating CHOA to predict financial profits using accounting information.

Deep learning and optimization algorithms have a wide range of applications across various domains, including oil distribution (Xu et al. 2022a), detection (Zhou and Zhang 2022), recognition (Zhang et al. 2023b), recommendation (Li et al. 2023a), credit rating (Li and Sun 2021), large scale problem (Cao et al. 2020), next-generation data center network (Cao et al. 2019), time-variant hybrid design (Wang et al. 2023b), and routing network design (Gong and Rezaeipanah 2023).

There are various types of optimization techniques, including generalized algorithm (Zhou et al. 2021), bounded algorithms (Peng et al. 2023), multi-agent alorithms (Wang et al. 2023c; Li et al. 2020), distributed optimization algorithms (Ma et al. 2023a), adaptive techniques (Jiang and Li 2022; Jiang et al. 2022b), multihop optimization (Deng et al. 2023), dynamic aoptimization (Cheng et al. 2017), multi label (Lu, et al. 2023; Liu et al. 2023), and multi-modal algorithms (Lu et al. 2023), each suited to different types of optimization problems.

The CHOA is a metaheuristic algorithm inspired by the intelligent behavior of chimpanzees (Khishe and Mosavi 2020a). CHOA utilizes a global search strategy to explore the solution space and find optimal solutions efficiently. On the other hand, deep LSTMs are a type of recurrent neural network (RNN) capable of modeling complex temporal dependencies, making them suitable for analyzing sequential financial data (Hochreiter and Schmidhuber 1997). By combining the global search capabilities of CHOA with the sequential modeling abilities of deep LSTMs, we aim to improve profit prediction accuracy by considering both the global and temporal aspects of financial data.

The CHOA offers several advantages compared to other optimization algorithms. CHOA effectively balances exploration and exploitation, combining the global search capability with the local search ability of gradient descent (Bo et al. 2023). It maintains a diverse population, preventing premature convergence and thoroughly exploring the problem space (Liu et al. 2022a). CHOA’s adaptive mechanisms dynamically adjust parameters based on population performance, enhancing its adaptability to changing landscapes. Known for its robustness, CHOA can handle complex and non-linear problems without relying on specific mathematical models or assumptions (Khishe et al. 2021). Additionally, CHOA is easily parallelizable, allowing efficient use of computational resources (Gong et al. 2022). However, it is essential to consider that an algorithm’s effectiveness depends on the specific problem at hand, and it’s advisable to experiment with different algorithms for evaluation in particular domains (Singh and Sharma 2023).

However, CHOA may suffer from local minimum stagnation, where the algorithm gets trapped in suboptimal solutions. To address this issue, we propose a novel updating technique called the APR technique, which enhances CHOA’s ability to escape local minima and converges to better solutions. The integration of APR into CHOA leads to a new hybrid algorithm, APRCHOA, which offers improved optimization performance in the context of profit prediction.

Furthermore, this work develops five deep LSTM-based optimization algorithms, namely deep LSTM, LSTM-MPA, LSTM-CHOA, LSTM-ARGA, LSTM-ARWOA, and deep LSTM-APRCHOA. These algorithms provide alternative approaches for optimizing the performance of deep LSTM models in profit prediction tasks.

In this paper, we present a detailed investigation of the proposed algorithms and evaluate their performance using real-world financial accounting data. The results highlight the efficacy of the deep LSTM-APRCHOA model in profit prediction and contribute to advancing the field of financial forecasting. Ultimately, the findings of this study offer valuable insights for financial analysts, decision-makers, and researchers seeking accurate profit prediction techniques.

The paper’s main contributions can be summarized as follows:

  • The APRCHOA approach is proposed as a means of improving the capacity for adaptation and convergence rate of the conventional method.

  • The APRCHOA employs the concepts of non-linearity and uncertainty inherent in the CHOA to locate a chimpanzee that is distant from the population. This approach yields a solution with superior fitness compared to the current attacker, which is the optimal search agent.

  • The present study focuses on the design and validation of a deep learning (DL) framework that can effectively teach efficient trading strategies using the APRCHOA.

  • This study proposes a modification to the conventional deep LSTM model to overcome the limitations of gradient descent learning algorithms, namely the issues of local minima and poor convergence rate. The APRCHOA method is utilized in conjunction with five benchmark optimization techniques to achieve this goal.

The subsequent sections of the document are organized in the following manner: Sect. 2 outlines the most relevant and significant literature on the topic. Section 3 presents the pertinent concepts, including the deep LSTM structure and the CHOA conceptual framework. The hybrid advised methodology is presented in Sect. 4. Section 5 subsequently outlines the experimental method, the dataset employed, and the resulting outcomes. Section 6 provides a summary and conclusion of the research findings.

2 Related works

The paper cited as a reference (Kumar et al. 2021) provides a comprehensive survey of artificial intelligence methodologies utilized for predicting stock market prices. The authors place significant emphasis on the importance of mathematical indicators in this particular procedure. However, the issue of selecting the most suitable technical indicators appropriately remains unresolved. According to some scholars, statistical methods are deemed inadequate and yield suboptimal outcomes in contrast to artificial intelligence (AI) models, as statistical models are treated as linear systems in statistical approaches (Atsalakis and Valavanis 2009). Moreover, as indicated in reference (Atsalakis and Valavanis 2009), the prediction of financial time series is comparatively more challenging compared to that of other types of time series due to their distinctive characteristics. Consequently, the utilization of conventional statistical techniques within the realm of economics yields unproductive outcomes.

Reference (Bebarta et al. 2012) describes the development of the initial neural network technology for market forecasting, utilizing IBM’s everyday costs as the primary dataset. As the investigation was merely in its preliminary stages, the anticipated results were not obtained. The study highlighted the difficulties faced, such as the problem of overfitting and the cognitive network’s limited complexity resulting from the utilization of a small number of parameters and a single hidden layer. Future research endeavors may include the incorporation of a more significant number of characteristics into the machine learning neural network, exploration of alternative forecasting horizons, and assessment of model profitability.

Furthermore, it has been highlighted in references (Rundo et al. 2019; Sismanoglu et al. 2019) that DL is a subject that requires further investigation. The review on computational intelligence conducted by the authors of reference (Zhang et al. 2023a) from 2009 to 2015 showed that neural networks with artificial intelligence were commonly employed. Subsequently, building upon the previous endeavor, the aforementioned survey (Rundo et al. 2019) furnished an analysis of computational intelligence techniques used in financial forecasting literature spanning the years 2016 to 2021. The authors exhibited a variety of hybrid systems alongside those that incorporated fuzzy logic, deep learning, and neural networks with artificial intelligence.

The utilization of artificial neural networks has been widely acknowledged in References (Gandhmal and Kumar 2019) and (Nti et al. 2020). These references have highlighted the superior performance of artificial neural networks over fuzzy, support vector machines and decision trees. This superiority is attributed to the higher generalization potential of artificial neural networks. Furthermore, it was determined by the reference cited as (Ismail Fawaz et al. 2019) that the utilization of deep learning methodologies for time series classification could potentially achieve performance levels that are considered to be at the forefront of the field.

Technical analysis is a standard method for detecting points of reversal, predicting patterns, and executing investments within a relatively brief time frame, as noted in reference (Zhang et al. 2020). Hence, it is imperative to take into account the duration of the model training procedure. A significant proportion of preceding literature utilized daily candles as a basis for analysis, with a minimum evaluation period of one day. The review conducted by reference (Sheng et al. 2023) revealed that a mere five out of the eighty-one technical analysis-oriented papers incorporated intraday candles in their analysis. This observation suggests a possibility of divergence in forthcoming endeavors.

Deep learning architectures necessitate a significantly larger quantity of daily candles in terms of training data. The annual incidence of cases, initially recorded at 267, exhibits a significant increase to 28,836. This observation is made in the context of intraday data training, where a 5-min window and nine hours of trade are duly considered. In an assessment of DL methods for forecasting financial time series, Reference (Alsharef et al. 2021) found that RNNs had received the most attention from academics.

The authors’ analysis was not limited to the gathering of entry qualities, as they also integrated data from fundamental evaluation, news, management of value, market response, and technical indicators. The research aimed to offer a comprehensive depiction and assessment of the techniques employed, as well as the requirements for performance and platforms chosen.

The utilization of sentiment analysis in the financial sector has demonstrated varying levels of efficacy in recent times, owing to the progress made in the processing of natural language and the profusion of news outlets (Garcia-Mendez et al. 2022). Numerous research endeavors that integrate historical pricing data with contemporary information to generate forecasts have yielded results that surpass models that exclusively take into account open, high, low, close, and volume (OHLCV) metrics (Mann 2022).

As per the citation provided in reference (Li and Bastos 2020), trading techniques were not conventionally employed in the literature. Furthermore, the evaluation of profitability was not conducted, which aligns with the assertion made in reference (Wang et al. 2022) that a significant portion of research fails to demonstrate profitability, resulting in the emergence of incompatible models over time. Hence, it can be inferred that the challenges mentioned above have played a significant role in the reference cited as (Li and Bastos 2020). This particular reference has incorporated the final two stages of trading design and revenue assessment into the traditional methodology utilized for financial forecasting.

The possibility exists to cite reference (Ozer and Sakar 2022), which conducted an analysis of 85 papers and determined that merely 31 of them employed a method for trading to substantiate the necessity of this novel methodology. The implementation of a completely autonomous system is essential for precise financial validation, as stated by reference (Soleymani and Paquet 2020), which highlights the restricted correlation between the metrics employed in machine learning algorithms and financial measures.

Various deterministic frameworks have been put forth in recent years to address multiple optimization issues. Deterministic models, however, require knowledge of the optimization problem’s characteristics as well as some information regarding the gradient or sub-gradient. Recent years have seen a rise in the use of nature-inspired techniques as one of the possibilities in optimization assignments (Qian et al. 2023). In this field, some well-known Nature-inspired techniques are prairie dog optimization algorithm (Ezugwu et al. 2022), robust comprehensive grey wolf optimizer (Najibzadeh et al. 2023), dwarf mongoose optimization algorithm (Agushaka et al. 2022), gazelle optimization algorithm (Agushaka et al. 2023), firefly algorithm (Zare et al. 2023), adaptive hybrid dandelion optimizer (Hu et al. 2023), marine predators algorithm (Shen et al. 2023; Li et al. 2023b), and fuzzy whale optimization algorithm (Saffari et al. 2023).

In light of the No-Free-Lunch (NFL) theorem (Wolpert and Macready 1997), it is essential to acknowledge the limitations of Nature-inspired techniques as the most effective method for solving all optimization problems. Hence, diligent researchers have endeavored to cultivate innovative designs inspired by the wonders of nature in order to tackle a multitude of optimization problems (Jarraya and Bouri 2012). The ChOA is a novel tool that draws inspiration from the intelligence and sexual motivation exhibited by agents during group hunting activities. According to the findings presented in reference (Khishe and Mosavi 2020a), this algorithm demonstrates promising outcomes in terms of competitiveness when compared to other Nature-inspired techniques. Following its introduction in 2020, the ChOA algorithm has been extensively utilized by researchers across three distinct categories of research. These categories are outlined below.

In the first category, the ChOA has made attempts to address various optimization and engineering challenges. These studies include fuzzy clustering (Valdez et al. 2021), marine mammal classification (Saffari et al. 2022), streamflow time series prediction (Ahmed et al. 2021), underwater image detection and recognition (Tian et al. 2023), Parkinson’s disease and cleft lip diagnosis (Chen et al. 2022a), micro-target classification (Kamalipour et al. 2022), economic load dispatching (Deb et al. 2021), solar photovoltaic model parameter identification (Bo et al. 2022), real-time COVID-19 diagnosis (Hu et al. 2021), and sonar database classification (Khishe and Mosavi 2020b). While acknowledging the merits of these research works, it is essential to note that recommending new models or using new techniques to address well-known problems may not be a promising avenue for further investigation.

In the second group, the ChOA is employed alongside different optimization techniques to enhance their effectiveness. Notable examples include the integration of sine and cosine with the ChOA (Kaur et al. 2021), hybrid ChOA and hunger games search algorithms (Yang et al. 2022), the development of a hybrid randomly vector functional link/chimp optimization framework (Zayed et al. 2021), hierarchical ChOA (He et al. 2023b), and the introduction of the spotted Hyena-based ChOA (Dhiman 2021). The hybrid algorithms that have been proposed undoubtedly exhibit enhanced accuracy in a majority of cases. However, it is important to acknowledge that these hybrid methods are accompanied by a significant drawback—their notable complexity. This high level of complexity renders these models less suitable, particularly when confronted with multidimensional problems.

In the third category, diligent studies have endeavored to enhance the efficiency of the ChOA by meticulously defining or carefully adjusting certain operators. The EChOA was implemented, incorporating the highly detrimental polynomial mutation and Spearman’s rank correlation value of the chimpanzees with the lowest social status for population initialization (Jia et al. 2021). Additionally, FuzzyChOA was employed, leveraging fuzzy systems to fine-tune the ChOA’s control parameters, ultimately resulting in the development of a precise classifier (Saffari et al. 2020). Several research works have been conducted to explore the potential for improving ChOA, including dynamic levy flight ChOA (Kaidi et al. 2021), binary ChOA (Wang et al. 2021), weighted ChOA (Khishe et al. 2021), Niching ChOA (Gong et al. 2022), robust universal learning ChOA (Liu et al. 2022a), weighted opposition-based ChOA (Bo et al. 2023), multi-objective ChOA (Khishe et al. 2023a), greedy learning for ChOA (Khishe 2023), and digitized ChOA (Khishe et al. 2023b).

Hence, the potential for enhancing both accuracy and convergence speed is evident. In this study, our primary focus lies in the enhancement of the ChOA’s performance rather than engaging in extensive discussions regarding its core advantages.

3 Background

This section presents the relevant terminology, which encompasses deep LSTM and CHOA.

3.1 Deep long short-term memory

Several researchers have turned to the RNN structure known as deep LSTM to understand and predict sequences. To initiate the LSTM network process, the first step involves the utilization of the forget gate, denoted as \(fg(t)\), which is represented by Eq. (1) (Hochreiter and Schmidhuber 1997):

$$fg(t) = \sigma (\alpha_{fg} x(t) + \beta_{fg} h(t - 1) + \delta_{fg} )$$
(1)

The configurable weight matrices and the bias vector can be referred to as \(\alpha_{fg}\), \(\beta_{fg}\), and \(\delta_{fg}\).

The input gate, denoted as i(t), is determined by the sigmoid function. In addition, a hyperbolic tangent (tanh) layer is employed to generate a possible update vector, denoted as C(t). Equations (2) and (3) provide a detailed explanation of the computation for i(t) and C(t) (Hochreiter and Schmidhuber 1997):

$$i(t) = \sigma (\beta_{i} h(t - 1) + \alpha_{i} x(t) + \delta_{i} )$$
(2)
$$c(t) = \tanh (\beta_{c} h(t - 1) + \alpha_{c} x(t) + \delta_{c} )$$
(3)

The symbols \(\alpha_{i}\), \(\beta_{i}\), and \(\delta_{i}\) denote a set of trainable parameters linked to the input gate, whereas \(\alpha_{c}\), \(\beta_{c}\), and \(\delta_{c}\) pertain to a set of trainable parameters.

After the determination is made concerning the data that is eliminated and preserved, the cell state, denoted as C(t), which is subjected to an update process, can be calculated using Eq. (4) (Hochreiter and Schmidhuber 1997):

$$c(t) = i(t) \circ c(t) + fg(t) \circ c(t - 1)$$
(4)

The symbol \(\circ\) used here denotes element-wise multiplicity. On the other hand, the output is achieved by performing a multiplication operation between o(t) and the tangent hyperbolic production. The procedure is exemplified by the subsequent equations (Hochreiter and Schmidhuber 1997):

$$o(t) = \sigma (\alpha_{o} x(t) + \beta_{o} h(t - 1) + \delta_{o} )$$
(5)
$$h(t) = o(t) \circ \tanh (c(t))$$
(6)

3.2 Chimp optimization algorithm

The CHOA is an algorithm for optimization that draws inspiration from the behavioral patterns of chimpanzees and their natural environment. Equations (7) to (9) represent the critical mathematical phrases utilized in the CHOA algorithm (Khishe and Mosavi 2020a):

$${{\varvec{\uppsi}}}_{chimp} (z + 1) = {{\varvec{\uppsi}}}_{{{\text{prey}}}} (z) - {{\varvec{\upbeta}}} \cdot \left| {{{\varvec{\upnu}}} \cdot {{\varvec{\uppsi}}}_{{{\text{prey}}}} (z) - {{\varvec{\Gamma}}} \cdot {{\varvec{\uppsi}}}_{chimp} (z)} \right|$$
(7)
$${{\varvec{\upbeta}}} = 2 \cdot {{\varvec{\upxi}}} \cdot {\mathbf{rand}}_{1} - {{\varvec{\upxi}}}$$
(8)
$${{\varvec{\upnu}}} = 2 \times {\mathbf{rand}}_{2}$$
(9)

Here, z represents the number of iterations, \({{\varvec{\uppsi}}}_{{{\text{prey}}}}\) denotes the best solution discovered thus far, \({{\varvec{\uppsi}}}_{chimp}\) refers to the optimal location of the chimpanzee, and \({{\varvec{\upbeta}}}\), \({{\varvec{\upnu}}}\), and \({{\varvec{\Gamma}}}\) correspond to chaotic coefficient vectors. The vector \({{\varvec{\upxi}}}\) gradually decreases from 2.5 to 0 in a non-linear fashion throughout the iterations. The values rand1 and rand2 are randomly selected from the range [0,1], and detailed information about these mappings can be found in Khishe and Mosavi 2020a.

In order to achieve a precise simulation of chimpanzee behavior, CHOA will select and maintain the top four chimpanzees based on Eqs. (10) and (11) (Khishe and Mosavi 2020a):

$${{\varvec{\uppsi}}}(z + 1) = \frac{1}{4} \times ({{\varvec{\uppsi}}}_{1} + {{\varvec{\uppsi}}}_{2} + {{\varvec{\uppsi}}}_{3} + {{\varvec{\uppsi}}}_{4} )$$
(10)

where

$$\begin{gathered} {{\varvec{\uppsi}}}_{1} = {{\varvec{\uppsi}}}_{Ataker} - {{\varvec{\upbeta}}}_{1} .\left| {{{\varvec{\upnu}}}_{1} {{\varvec{\uppsi}}}_{Attac\ker } - {{\varvec{\Gamma}}}_{1} {{\varvec{\uppsi}}}} \right| \, \hfill \\ {{\varvec{\uppsi}}}_{2} = {{\varvec{\uppsi}}}_{Barrier} - {{\varvec{\upbeta}}}_{2} .\left| {{{\varvec{\upnu}}}_{2} {{\varvec{\uppsi}}}_{Barrier} - {{\varvec{\Gamma}}}_{2} {{\varvec{\uppsi}}}} \right| \, \hfill \\ {{\varvec{\uppsi}}}_{3} = {{\varvec{\uppsi}}}_{Chaser} - {{\varvec{\upbeta}}}_{3} .\left| {{{\varvec{\upnu}}}_{3} {{\varvec{\uppsi}}}_{Chaser} - {{\varvec{\Gamma}}}_{3} {{\varvec{\uppsi}}}} \right| \hfill \\ {{\varvec{\uppsi}}}_{4} = {{\varvec{\uppsi}}}_{Driver} - {{\varvec{\upbeta}}}_{4} .\left| {{{\varvec{\upnu}}}_{4} {{\varvec{\uppsi}}}_{Driver} - {{\varvec{\Gamma}}}_{4} {{\varvec{\uppsi}}}} \right| \hfill \\ \end{gathered}$$
(11)

The utilization of chaotic values, as denoted in Eq. (12), serves the purpose of emulating the social incentive activity that is commonly observed in conventional CHOA.

$${{\varvec{\uppsi}}}_{{chimp}} (z + 1) = \left\{ {\begin{array}{ll} {\text{Eq}}.\,(10)&\quad rand_{m} < 0.5 \\ \Gamma &\quad rand_{m} \ge 0.5 \end{array} } \right.$$
(12)

where \(rand_{m}\) represents a probability value within the range of (0, 1).

4 Proposed methodology

This section provides an overview of the dataset, preprocessing techniques, and proposed methodology for predicting profits in financial accounting information systems using deep LSTM. The problem statement is also defined, and APRCHOA will be responsible for the model’s hyperparameters optimization.

4.1 Adaptive pair reinforced chimp optimization algorithm

This section offers a comprehensive elucidation of APRCHOA. APRCHOA incorporates two additional techniques to the pre-existing algorithm. Initially, the primary method was developed, drawing inspiration from the adaptive balancing of particle swarm optimization (PSO) and its propensity to vary with the progression of iterations (Liu et al. 2020). Subsequently, the dual weights method was incorporated into the primary method. Weight 1 enhances the method’s ability to perform a global search during the initial phase. In contrast, weight 2 enhances the method’s ability to perform a local search and optimize the algorithm during the latter stage. Subsequently, the procedure is provided with a stochastic alternative approach to improve the convergence rate and quality of the algorithm’s solution.

4.1.1 Stochastic alternative technique

In the stochastic alternative procedure, the value of the position vector on the nth dimension of the current individual is replaced with that of the ideal individual. The algorithm, in its initial form, may possess satisfactory location vectors in specific dimensions while lacking sufficient position vectors in other dimensions throughout the search procedure. On the contrary, the location vectors exhibit remarkable prominence in the optimal individual dimension. Thus, we propose an alternative stochastic approach to reduce the probability of this situation. Given that not all location vectors within an individual are unfavorable, it is advisable to employ this approach solely between the m and the conclusion of the evaluation and with a specified probability such that M represents the initial value between them. Empirical experimentation has led to the determination that the optimal outcome is achieved by assigning a value of 0 to the variable m. In determining the feasibility of implementing the stochastic alternative method at a worldwide level, Cauchy’s random variable is compared to the present assessment count as a fraction of the overall assessment count (Mazzolo et al. 2014).

4.1.2 Adaptive pair reinforcement technique

The parameter of weight holds significant importance in algorithms that are inspired by natural phenomena. Several studies have modified adaptive weighting to improve the algorithm’s performance. APRCHOA endeavors to enhance the algorithm’s capacity to conduct both local and global searches by incorporating twofold adjustable weightings. When dealing with multi-peak systems, the conventional CHOA algorithm tends to converge to a local optimum rapidly. The incorporation of weight λ1 was intended to augment the effectiveness of the global search, while the subsequent inclusion of weight λ2 was aimed at improving the efficacy of the local search. The mathematical expressions for λ1 and λ2 are represented by Eq. (13) and Eq. (14), respectively.

$$\lambda_{1} = \left( {1 - \frac{\varphi }{\max (\varphi )}} \right)^{{1 - \tan \left( {\left( {r - \frac{1}{2}} \right) \times \pi \times \frac{\theta }{\max (\varphi )}} \right)}}$$
(13)
$$\lambda_{2} = \left( {2 - \frac{2\varphi }{{\max (\varphi )}}\,} \right)^{{1 - \tan \left( {\left( {r - \frac{1}{2}} \right) \times \pi \times \frac{\theta }{\max (\varphi )}} \right)}}$$
(14)

The alteration of the local optimum degree of the algorithm results in a modification of the \(\theta\) value. It is noteworthy that \(\theta\) is automatically included, while the position of the chimpanzees remains unaltered. However, \(\theta\) is halved upon updating to regulate its magnitude. The introduction of the Cauchy Stochastic values and the incorporation of parameter s result in non-linear variations of λ1 and λ2 as the algorithm tackles the local optimum, as opposed to a linear decline. \(\varphi\) represents the present quantity of assessments. \(\varphi\) is incremented by one for every evaluation. The maximum number of assessments that can be executed is denoted by max(), with a value of 300,000 in the given test. The intervals for λ1 and λ2 are [0,1] and [0.5,1], correspondingly. The equation denoted as Eq. (11) has been modified to Eq. (15) through the inclusion of the variable λ1 in the initial stage of the algorithm:

$$\begin{gathered} {\mathbf{p}}_{1} = \lambda_{1} {\mathbf{p}}_{A} - {\mathbf{a}}_{1} \cdot \left| {{\mathbf{c}}_{1} {\mathbf{p}}_{A} - {\mathbf{m}}_{1} {\mathbf{x}}} \right| \, \hfill \\ {\mathbf{p}}_{2} = \lambda_{1} {\mathbf{p}}_{B} - {\mathbf{a}}_{2} \cdot \left| {{\mathbf{c}}_{2} {\mathbf{p}}_{B} - {\mathbf{m}}_{2} {\mathbf{x}}} \right| \hfill \\ {\mathbf{p}}_{3} = \lambda_{1} {\mathbf{p}}_{C} - {\mathbf{a}}_{3} \cdot \left| {{\mathbf{c}}_{3} {\mathbf{p}}_{C} - {\mathbf{m}}_{3} {\mathbf{p}}} \right| \hfill \\ {\mathbf{p}}_{4} = \lambda_{1} {\mathbf{p}}_{D} - {\mathbf{a}}_{4} \cdot \left| {{\mathbf{c}}_{4} {\mathbf{p}}_{D} - {\mathbf{m}}_{4} {\mathbf{p}}} \right| \hfill \\ \end{gathered}$$
(15)

The conversion of Eq. (11) to Eq. (16) is achieved by the inclusion of λ2 in the subsequent time frame of the method, as demonstrated below:

$$\begin{gathered} {\mathbf{p}}_{1} = \lambda_{2} {\mathbf{p}}_{A} - {\mathbf{a}}_{1} \cdot \left| {{\mathbf{c}}_{1} {\mathbf{p}}_{A} - {\mathbf{m}}_{1} {\mathbf{x}}} \right| \, \hfill \\ {\mathbf{p}}_{2} = \lambda_{2} {\mathbf{p}}_{B} - {\mathbf{a}}_{2} \cdot \left| {{\mathbf{c}}_{2} {\mathbf{p}}_{B} - {\mathbf{m}}_{2} {\mathbf{x}}} \right| \hfill \\ {\mathbf{p}}_{3} = \lambda_{2} {\mathbf{p}}_{C} - {\mathbf{a}}_{3} \cdot \left| {{\mathbf{c}}_{3} {\mathbf{p}}_{C} - {\mathbf{m}}_{3} {\mathbf{p}}} \right| \hfill \\ {\mathbf{p}}_{4} = \lambda_{2} {\mathbf{p}}_{D} - {\mathbf{a}}_{4} \cdot \left| {{\mathbf{c}}_{4} {\mathbf{p}}_{D} - {\mathbf{m}}_{4} {\mathbf{p}}} \right| \hfill \\ \end{gathered}$$
(16)

The pseudocode for APRCHOA is presented in Algorithm 1. Figure 1 depicts the process diagram of the proposed methodology.

Algorithm
figure a

APRCHOA

Fig. 1
figure 1

Block diagram of the proposed methodology

4.2 Dataset

A viable approach to constructing a dataset for forecasting profits entails utilizing a pre-existing dataset that has been employed for stock prediction purposes. The dataset is made available on Kaggle.Footnote 1 The dataset pertaining to the Chinese stock market is comprised not only of OHLC costs and volume data but also of a range of financial statistics that are updated on a daily basis. These financial statistics include but are not limited to the PB, PE, and PS ratios, as well as profitability indicators. The temporal scope encompasses the period spanning from January 4, 2005, to May 11, 2022. The financial ratios (FRs), which include the PE ratio and market capitalization, along with other fundamental data, are made available on a daily basis. It is necessary to collect comprehensive information and data on all publicly traded liquid stocks listed on the Shenzhen Stock Exchange and the Shanghai Stock Exchange, which amounts to a total of 4714 stocks, over a sufficient period.

4.3 Identification of the problem

The data that is provided as input for the deep LSTM network at each time step is represented by a three-dimensional vector (Xu et al. 2022b). This vector includes information about the batch size, the number of time steps, and cells. Figure 2 illustrates the visualization of the feature extraction process pertaining to financial accounting profit within the deep LSTM model. Figures 2(a) and (b) depict the data processing procedures employed in the deep LSTM model and the resulting simulation demonstrations of financial accounting profit at various time intervals, respectively. The input gate processes the vector information and forget gate at each time step. Selective features are kept and transferred to the cell of the subsequent moment that has a causal connection to the predicted value. The forget gate’s primary purpose is to eliminate aspects that are irrelevant during this process.

Fig. 2
figure 2

a Data processing steps in the deep LSTM, b the representation of financial accounting profit at various time points

In the context of a particular profit time series, the temporal resolution can be manually determined to encompass historical data and remains consistent throughout the training phase of the neural network. The set of vectors input at the initial time point (T = 1) encompasses the data necessary for the initial computation of profit. During this temporal period, the chosen time interval does not encompass any signals that may induce alterations in the predicted values in the future. During the training phase, it is possible that the deep LSTM model may exhibit insensitivity towards the vector signal or have already extracted features from the financial accounting profit data that are comparatively stable. As the temporal variable progresses towards T = n, sudden and significant alterations can occur within the designated time interval. The training process facilitates the deep LSTM model in effectively capturing fluctuations in profit information and establishing intricate regression relationships by integrating them with the model’s output. As a result, the increasing duration between the input and output leads to greater difficulty in establishing an appropriate connection.

The deep LSTM model’s network topology is governed by hyperparameters, which also have a substantial impact on the outcomes of simulations (Wang and Gong 2018). The batch size refers to the quantity of samples that are concurrently trained by the deep LSTM network (Schmeiser 1982). The time steps determine the duration of historical data utilized for making predictions. In the context of a given time step value, the subsequent values are contingent upon the preceding n values. As the prediction process advances, the values mentioned above traverse the temporal axis within a sliding window of size n until they reach the termination point of the dataset. The cells within the concealed layer of the deep LSTM network are indicative of the network’s level of intricacy and its ability to acquire knowledge. These hyperparameters influence the simulation results in the task of financial accounting profit prediction to vary degrees.

Sensitivity analysis is employed to evaluate the impact of modifying the hyperparameters on the outcomes of the simulation (Christopher Frey and Patil 2002). Lead time is a term utilized to denote the duration that has transpired between the anticipated point in time and the current moment. The sensitivity to simulation results with various lead times is assessed by modifying the numerical value for every hyperparameter within a specified range. During each iteration, a particular collection of hyperparameters is selected, and their values are changed within the content that has been established. The assessment of the impact of hyperparameter modifications on the outcomes of the simulation is conducted by utilizing the assessment index for the deep LSTM-generated profit value as the target.

This study proposes a novel approach to profit forecasting by combining the APRCHOA method with the deep LSTM model. The objective is to determine the most suitable deep LSTM network architecture for various anticipated periods. Consequently, the proposed model is referred to as the deep LSTM-APRCHOA model. In simulation and forecasting, the APRCHOA approach optimizes the time steps, batch size, and cells. Each chimpanzee’s location in the algorithm represents a three-dimensional variable representing the batch size, time steps, and number of cells in the deep LSTM model, respectively. Each chimpanzee’s positional data is initially initialized at random inside a predetermined range of values.

Each chimpanzee possesses an individual deep LSTM model, and the process of generating profits is simulated. The collected data is partitioned into two distinct sets: the calibration set and the validation set. The calibration set is employed to train the deep LSTM model, while the validation set is utilized to assess the accuracy of the simulation. The utilization of the NSEF serves as the metric for evaluating the fitness value of each chimpanzee’s simulation outcomes on the validation dataset (McCuen et al. 2006). Throughout each iteration, the positional data of the chimpanzees is continually updated to identify the highest possible fitness value. Figure 3 depicts the architectural design of the deep LSTM-APRCHOA model.

Fig. 3
figure 3

The structure of the deep LSTM-APRCHOA

5 Experimentation and discussion

In terms of model setting and parameterization, Python is chosen as the programming language, and the data preprocessing and management libraries used are Pandas, NumPy, and PySwarms. The deep learning platform Google TensorFlow is used.

A normalizing procedure is then carried out. Information from the initial range is rescaled using the normalization technique to a range between 0 and 1 (Quackenbush 2002). The ultimate profit projection is then calculated using an inverse data-scaled procedure applied to the network’s output. The following is the normalizing equation.

$$x^{\prime} = \, \left( {x - \mu } \right)/\sigma$$
(17)

The variables x’ and x are employed to represent the calculated results and the data sample correspondingly. In the context of statistical analysis, the symbols μ and σ represent the mean and standard deviation of the sample data, respectively.

The range of search parameter settings and the APRCHOA algorithm parameters have been established. The population size of chimpanzees and the upper limit of iterations are designated as 30 and 200, correspondingly (She et al. 2022). Optimization ranges for the hyperparameters are defined as follows, depending on the properties of the financial accounting profit time series data: batch size [24, 128], time steps (He et al. 2023a; Huang et al. 2021), and the number of cells [32, 256].

The developed models, including deep LSTM-CHOA, deep LSTM-ARGA, deep LSTM-MPA, deep LSTM-ARWOA, and conventional deep LSTM, are employed to optimize the model of profit predictions. Table 1 presents the predetermined value and setup settings for the aforementioned prediction models.

Table 1 The initial values and setup parameters for the mentioned prediction models

In this research, various models were assessed using statistical error measures, namely RMSE (Yuan and Yang 2022), NSEF (Ni et al. 2021), and bias (Ma et al. 2023b). These metrics can be defined as follows:

$$NSEF = 1 - \frac{{\sum\limits_{J = 1}^{N} {(\xi_{0} - \xi_{c} )^{2} } }}{{\sum\limits_{J = 1}^{N} {(\xi_{0} - \overline{\xi }_{c} )^{2} } }}$$
(18)
$$RMSE = \sqrt {\sum\limits_{J = 1}^{N} {\frac{{(\xi_{0} - \xi_{c} )^{2} }}{N}} }$$
(19)
$$bias = \frac{{\sum\limits_{J = 1}^{N} {(\xi_{0} - \xi_{c} )} }}{{\sum\limits_{J = 1}^{N} {(\xi_{0} )} }}$$
(20)

where \(\xi_{0}\) and \(\xi_{c}\) stand for the observed profit values and the simulated profit values, respectively; \(\overline{\xi }_{c}\) signifies the mean observed profit values; and N stands for the number of data points.

The NSEF evaluates the model’s ability to predict variables beyond the mean and quantifies the proportion of the beginning variance that is accounted for by the model. Measurements can fall anywhere from 1 (perfect fit) to − 1 (negative infinity), with closer to 1 indicating more reliable forecasts.

The RMSE is a metric that is particularly responsive to extreme errors, thereby providing a reliable measure of the precision of prediction outcomes. A decrease in the RMSE values corresponds to an improvement in the accuracy of predictions (Chen et al. 2022b).

The bias metric quantifies the degree of accuracy pertaining to the overall water balance observed in the simulation outcomes, with a scale that spans from − 100 to 100%. A value in close proximity to zero signifies a higher degree of precision in the predictions.

To evaluate the performance of various benchmarks, lead times of 1, 3, 6, 9, and 12 h were established for comparison purposes. Performance evaluation indicators were calculated and compared simultaneously for all benchmarks.

5.1 Investigation of hyperparameters’ effects

Three groups of hyperparameters were selected for analysis, with uniform changes made to the time steps within the integer range of 4–8, batch size within the range of 24–128, and cells within the range of 32–256. Figure 4 demonstrates the influence of modifications in hyperparameters on the outcomes across various lead times.

Fig. 4
figure 4

The impact of hyperparameter modifications on the outcomes with various lead durations

At a lead time of 1 h, NSEF varied within the range of [0.9,1) with changes in hyperparameters. The number of cells had a significant influence on the results, with increased cell values leading to higher and stabilized NSEF after reaching a certain threshold. On the other hand, a scarcity of cells led to a notable decline in accuracy.

The impacts of varying time steps and batch size exhibited a degree of irregularity, yet they ultimately converged toward a local optimum. With the increase in lead time to six hours, the NSEF demonstrated a broader range. The cells exhibited a consistent positive correlation with the NSEF, while the influence of time step and batch size became increasingly noticeable.

The NSEF’s range increased to [0.5, 0.75] with a 12-h lead time. The hyperparameters significantly influenced the outcomes of the simulation, and the utilization of inappropriate combinations had a negative impact on the accuracy of the simulation. In general, the lead time affected how hyperparameters affected simulation outcomes. The selection of optimal hyperparameters resulted in simulations with higher precision for short-term predictions. However, for longer lead times, deep LSTM networks had more stringent requirements, which necessitated the use of appropriate hyperparameters.

5.2 The optimization of deep LSTM-APRCHOA

The research employed a sample of 30 chimpanzees as variables, wherein each chimpanzee was characterized as a three-dimensional variable representing the hyperparameters. In the algorithm, the initial positions of chimpanzees were randomly assigned within the interval of (0, 5). For each prediction timestep, the LSTM network’s hyperparameters were optimized using the validation set’s projected NSEF of the profit process as the fitness value.

Table 2 presents the outcomes of the deep LSTM-APRCHOA method throughout the iterative process. As an illustration, the profit process prediction at a future time point of 1 h was examined. The deep LSTM model was utilized, featuring a hidden layer, and the training process was iterated for a total of 200 iterations. As the total number of iterations increased, there was a tendency for the hyperparameter values of the deep LSTM network to approach optimality. In this instance, it was determined that the most favorable hyperparameter configuration consisted of 68 hidden layer neurons, a batch size of 64, and 6 time steps. The utilization of this particular combination yielded the highest level of precision in forecasting, whereby the initial six data points were employed to anticipate the subsequent data point.

Table 2 Deep LSTM-APRCHOA results in the course of iterations

The results of the hyperparameter optimization were shown in Table 3 and compared to the 1-h lead time for a variety of lead times (1, 3, 6, 9, and 12 h). The deep LSTM-APRCHOA model exhibited exceptional performance as a whole in modeling the profit process. The accuracy of the predictions showed a negative correlation with the duration of the prediction period. The peak level of prediction accuracy was attained after 1 h, demonstrating an NSEF value of 0.9851. At the 12-h mark, the normalized standard error of forecast (NSEF) decreased to a value of 0.7547.

Table 3 The outcomes of the hyperparameter optimization process for various lead times

When comparing the optimal combinations of hyperparameters for various lead times, it was consistently observed that the optimal batch size remained close to 64. The optimum batch size was found to be dependent on the magnitude of data processing in the deep LSTM simulation. A reduced batch size may lead to an inadequate number of samples for the deep LSTM model to effectively learn data patterns, thereby potentially increasing the computational complexity. A batch size of 64 was determined to be appropriate for tasks involving profit prediction.

When there were around six time steps, the experiment’s best prediction accuracy was attained for all lead times. The findings indicate that the deep LSTM model exhibited superior performance when the input process prediction took into account a length of 6 in the data sequence.

The number of cells deemed most appropriate rose from 68 cells when considering a lead time of 1 h to 117 cells when considering a lead time of 12 h. The level of complexity of the deep LSTM network and its capacity to capture data features can be inferred from the number of cells it possesses. Insufficient cellular presence may give rise to a cognitive limitation in acquiring intricate patterns, whereas an excessive number of cells may lead to the problem of overfitting. As the duration of lead time increased, the model necessitated a greater number of cells in order to attain improved predictive outcomes. In general, the Deep LSTM-APRCHOA model exhibited efficacy in forecasting profits, and the APRCHOA algorithm was employed to identify the most favorable hyperparameter configurations, leading to enhanced predictive precision.

5.3 The evaluation of the deep LSTM-APRCHOA in financial profit prediction

In the study, the deep LSTM-APRCHOA model was compared with five other models in terms of financial profit prediction performance. The evaluation was conducted for lead times ranging from 1 to 12 h, and the results were illustrated in Fig. 5.

Fig. 5
figure 5

The comparison between various benchmark models

The LSTM model exhibited a decrease in the NSEF from 0.9100 when considering a lead time equals one hour, to 0.6711 when considering a lead time equals 12 h. In a similar vein, the LSTM-CHOA model exhibited a decrease in the NSEF from 0.9312 to 0.5821 with the progression of lead time. The LSTM-APRCHOA model exhibited a marginal performance improvement compared to the LSTM-CHOA model. However, it is noteworthy that both models demonstrated superior simulation accuracy in all instances when compared to the LSTM model. The LSTM model, although lacking the specialized structure of deep LSTM-CHOA, is a relatively straightforward artificial neural network model. This limitation hinders its effectiveness in handling financial profit time series data, even when optimized using the CHOA algorithm.

Both the deep LSTM-ARWOA and deep LSTM-APRCHOA models exhibited favorable simulation outcomes. The deep LSTM-APRCHOA model demonstrated superior performance compared to the deep LSTM-based models across various lead times. Deep LSTM-APRCHOA models’ evaluation indices performed better during the validation phase than deep LSTM-based models. The predictive accuracy of both models exhibited a decrease as the lead time increased; however, the deep LSTM-APRCHOA model consistently demonstrated superior performance. In the case of lead times shorter than 6 h, the deep LSTM-APRCHOA model exhibited superior performance in terms of higher NSEF and lower RMSE and bias, when compared to other deep LSTM-based models. Even though the lead time surpassed 6 h, the deep LSTM-APRCHOA model consistently maintained an NSEF value above 0.7. Additionally, the RMSE and bias values remained below 59% and 19% respectively.

The primary distinction between LSTM-APRCHOA and LSTM lies in the incorporation of the hyperparameter optimization algorithm. LSTM neural networks possess robust data learning capabilities; however, the utilization of inappropriate hyperparameter combinations can impede their learning efficacy. The utilization of an algorithm-optimized neural network enhances its capacity to effectively adjust to intricate variations in financial profit processes while concurrently exhibiting a reduced occurrence of outliers. The deep LSTM-APRCHOA model exhibited superior predictive capabilities in forecasting profits when compared to alternative models. Tables 4, 5, 6, 7 display the outcomes of the six comparison models, each corresponding to varying lead times of 1, 6, 9, and 12 h, respectively.

Fig. 6
figure 6

The polar plot of results. a NSEF, b RMSE, and c bias

Fig. 7
figure 7

The 3D representation of the results

To validate the improvements over the baselines, the researchers employed the Wilcoxon signed-rank test, a non-parametric statistical hypothesis test. The purpose of this analysis is to evaluate the presence of a statistically significant distinction among the paired observations. The test yields a p-value, which is utilized to ascertain the statistical significance of the observed disparities. The p-value derived from the Wilcoxon signed-rank test provides insight into the likelihood of encountering a difference as remarkable as, or even more remarkable than, the one observed in the data under the assumption that the null hypothesis holds true.

In this entry, the author briefly presents a bullet point without any additional context or information. When the p-value falls below the predetermined significance level, typically represented as α (e.g., 0.05), the null hypothesis is deemed invalid and subsequently rejected. The findings of this analysis indicate a notable and statistically significant distinction between the paired findings.

In this entry, the author briefly presents a bullet point without any additional context or information. When the p-value is found to be greater than or equal to the predetermined significance level, denoted as α, it indicates that there is insufficient evidence to reject the null hypothesis. Upon careful examination of the available evidence, it is apparent that there is insufficient data to definitively establish the presence of a statistically significant distinction between the paired findings.

In essence, the p-value associated with the Wilcoxon signed-rank test serves as a crucial tool in ascertaining the statistical significance of the observed disparities between paired samples. Its primary function is to discern whether these differences are indeed noteworthy or merely a result of fortuitous occurrences. In the realm of statistical analysis, it is widely understood that a smaller p-value serves as compelling evidence against the null hypothesis. In contrast, a more significant p-value indicates that the null hypothesis cannot be reasonably rejected. It should be noted that N/A signifies “not applicable”, which means that the control model (in this case, LSTM-APRCHOA) cannot be compared to itself.

Table 4 provides evidence that the LSTM-APRCHOA model exhibits superior performance compared to all other models when considering a lead time of 1 h. The achieved bias of 0.5176% is indicative of a minimal systematic deviation from the observed values. Furthermore, it is worth noting that the RMSE value of 9.3572 exhibits the most favorable outcome compared to all other models, suggesting a greater level of precision in forecasting the target variable. Furthermore, the LSTM-APRCHOA model achieves the highest NSEF score of 0.9801, suggesting a superior performance in accurately representing the variability present in the observed data.

Table 4 The comparison between LSTM-APRCHOA and various utilized models (lead time: 1 h)

Table 5 reveals that all models’ performance tends to deteriorate as the lead time approaches 6 h. Nevertheless, LSTM-APRCHOA continues to demonstrate its superiority in comparison to alternative models. The model demonstrates a comparatively low bias of 9.1880%, which is inferior to the biases observed in all alternative models. The RMSE value of 41.8170 is the second lowest, suggesting a relatively high level of accuracy in the predictions. Additionally, the NSEF score of 0.8970 is the highest, indicating a good level of efficiency in capturing the variability of the observed data.

Table 5 The comparison between LSTM-APRCHOA and various utilized models (lead time: 6 h)

Table 6 showcases the sustained effectiveness of LSTM-APRCHOA when the lead time has been increased to 9 h. The achieved bias of 15.1332% is the lowest among all models. The RMSE value of 43.6611 is the second lowest among the evaluated values, indicating that the predictions are reasonably accurate. In addition, it is worth noting that the NSEF score of 0.8155 represents the highest value, suggesting a strong correspondence between the predicted and observed variability in the data.

Table 6 The comparison between LSTM-APRCHOA and various utilized models (lead time: 9 h)

Finally, the findings for a lead time of 12 h are displayed in Table 7. While LSTM-APRCHOA remains competitive in terms of performance, it exhibits a marginal rise in bias when compared to specific other models. However, even though LSTM-APRCHOA shows a bias of 25.9669%, it remains one of the models that demonstrates the least amount of systematic deviation. The RMSE value of 73.6595 is the second lowest among the models, suggesting that the predictions are reasonably accurate. Additionally, the NSEF score of 0.7375 is relatively high compared to the scores obtained by other models. In order to get a thorough understanding of the distinctions between the models, the comprehensive depiction of the outcomes is provided through polar and 3D plots, as illustrated in Fig. 6 and Fig. 7, respectively.

Table 7 The comparison between LSTM-APRCHOA and various utilized models (lead time:12 h)

In the validation set, specifically at a lead time of 1 h, the NSEF values obtained for various models, namely LSTM, LSTM-MPA, LSTM-CHOA, LSTM-ARGA, LSTM-ARWOA, and deep LSTM-APRCHOA, were 0.9100, 0.9312, 0.9350, 0.9650, 0.9722, and 0.9801, respectively. The performance of all models was satisfactory as a result of the limited duration of the prediction period. Nevertheless, when considering a lead time of 12 h, the NSEF values exhibited a decline, specifically to 0.6811, 0.6423, 0.6485, 0.6731, 0.7022, and 0.7375, respectively. As the duration of lead time increased, the accuracy of the simulation decreased to varying degrees across all models. However, the deep LSTM-APRCHOA model consistently exhibited superior predictive performance, maintaining high levels of accuracy and outperforming the other models.

The findings of the study validate the efficacy of the LSTM-based deep LSTM-APRCHOA model, as proposed in this research, in accurately forecasting financial accounting profit across diverse scenarios. The process of simulating profits in financial accounting prediction is intricate and encompasses various influential parameters. The limitations of conventional models frequently fail to adequately capture the complexities inherent in this particular process, thereby resulting in diminished accuracy in predictions. Consequently, there has been a growing utilization of artificial intelligence techniques, particularly deep learning, to simulate profit processes in the realm of financial accounting prediction.

In general, LSTM-APRCHOA consistently exhibits robust performance across various lead times. The model consistently demonstrates low biases, indicating a minimal presence of systematic errors. Furthermore, it exhibits competitive or superior RMSE and NSEF values when compared to other models. The findings suggest that the LSTM-APRCHOA model effectively captures the temporal trends and dependencies present in the data, thereby facilitating accurate and effective estimations of the desired variable.

This study aimed to analyze the influence of deep LSTM hyperparameters on simulation outcomes across various lead times. The empirical evidence suggests that the responsiveness of simulation outcomes varies depending on the duration of the lead time. In general, modifications to hyperparameters exhibit a discernible influence on the accuracy of predictions. Enhancing simulation accuracy can be effectively achieved by selecting an appropriate hyperparameter. Hence, the utilization of optimization techniques, such as APRCHOA, in conjunction with LSTM, demonstrates a superior selection.

Various models were utilized to forecast financial accounting profit on an hourly basis. The deep LSTM-APRCHOA method, as proposed, exhibited outstanding results in simulating the profit process. It demonstrated better evaluation metrics and maintained higher precision as the lead time was raised. The performance of the Deep LSTM model is observed to be satisfactory when used for lead times of up to 6 h. However, a notable decline in prediction accuracy is observed when the lead time surpasses this threshold. The LSTM and LSTM-MPA models commonly demonstrate limited simulation accuracy when utilized for profit prediction. When comparing the deep LSTM-APRCHOA model with optimized hyperparameters to the LSTM model, it is observed that the former exhibits superior intelligence.

The data pertaining to profit prediction in financial accounting, as observed in this study, displayed characteristics commonly associated with time series analysis. Furthermore, the optimization of three hyperparameters was conducted using the APRCHOA algorithm. These hyperparameters include the batch size, with an approximate value of 60, the time steps, with an approximate value of six, and the number of cells, increasing from 64 to 128, corresponding to the lead times. The process of selecting hyperparameters is intricately linked to the lead time, as it aims to ensure that the neural network effectively learns the input data without succumbing to overfitting during the training phase. The obtained findings can be utilized as a point of reference for constructing models in comparable circumstances. When confronted with an accounting dataset that is unfamiliar, the deep LSTM-APRCHOA model would be a more suitable option for determining the most optimal parameter combination and attaining superior prediction performance.

Nevertheless, it is crucial to acknowledge that although LSTM-APRCHOA demonstrates favorable performance in this investigation, additional scrutiny and assessment may be necessary to determine its applicability and resilience in diverse datasets and application domains. In addition, it is crucial to take into account other variables, such as the complexity of computation and training duration, when determining the optimal model for real-world implementations.

6 Conclusion

This research paper focuses on the essential objective of precisely forecasting accounting profit in the context of financial analysis and decision-making within business operations. The primary objective of our study was to improve the performance of the CHOA by incorporating deep LSTM models that are specifically designed for predicting financial accounting profits. In order to address the issue of CHOA’s vulnerability to local minima, a new updating technique known as APR was introduced. Through the integration of APR into the CHOA, we have successfully devised the APRCHOA algorithm. This algorithm has exhibited notable improvements in its ability to predict financial profits in various tasks. The hybrid approach, known as APRCHOA, utilized the global search capabilities of CHOA and the sequential modeling abilities of deep LSTMs to adequately capture the global and temporal aspects of financial data, thereby enhancing prediction accuracy. In addition to the conventional prediction models, our research team has developed five deep LSTM-based models, namely the conventional deep LSTM, deep LSTM-CHOA, deep LSTM-ARGA, deep LSTM-MPA, and deep LSTM-ARWOA. The models were specifically designed to assess their efficacy thoroughly. In order to evaluate the effectiveness of the developed models, we employed established statistical error metrics, namely RMSE, NSEF, and bias. By conducting a comprehensive assessment, we compared the performance of the models on a validation set with lead times of 1, 6, 9, and 12 h.

The findings of the study demonstrate that the deep LSTM-APRCHOA model exhibits superior performance in predicting financial profit compared to other models. The model showed a notable NSEF value of 0.9801, surpassing all other models examined. This exemplifies the efficacy of the suggested methodology in capturing the inherent patterns and dynamics of financial data, resulting in highly accurate predictions. This study makes a valuable contribution to the field of financial analysis and decision-making through the introduction of a unique hybrid approach that integrates APRCHOA and deep LSTMs for the purpose of predicting accounting profit. The findings underscore the enhanced efficacy of deep LSTM-APRCHOA relative to alternative models, underscoring its potential as a valuable instrument for financial prediction and strategic decision-making in corporate contexts.

Subsequent investigations may delve into the extent to which the proposed methodology can be applied to diverse financial datasets, assessing its applicability and reliability. Additionally, there is potential for expanding the scope of this approach to other domains that necessitate precise predictive modeling. Furthermore, it is crucial to take into account the computational complexity and scalability factors of the models in order to ascertain their practical viability in real-world situations.