Abstract
The stock market is a financial marketplace that facilitates the purchasing and selling of shares linked with corporations listed on public exchanges. Additionally, it provides insight into the business environment in general and the performance of corporations, which allows it to indicate a nation's economic well-being. There is a direct relationship between a growing stock market and increased economic growth. Investing in the financial market is intended to boost returns; however, the market's future behavior is difficult to predict due to its complexity and the numerous events that influence it. Businesses and investors constantly try to increase profits and reduce losses, while simultaneously continuously pursuing precise techniques for evaluating stock prices. Researchers in machine learning have shown that Extreme Learning Machines can better identify obstacles and forecast market trends. This study employs historical trading data from the Nikkei 225 index to optimize the efficacy of ELM in forecasting long-term market patterns. In addition, feature selection methods are used to identify the exact combination of technical indicators that enhance the accuracy of predicting the Nikkei 225 index. This study demonstrates some optimization approaches including genetic algorithms, Grasshopper Optimization Algorithms, and War Strategy Optimization. The research proposes a hybrid model integrating the ELM with the WSO to enhance its performance. The testing method revealed that the chosen model had the greatest performance coefficient of determination value, which was 0.992. 5-fold cross-validation was employed to ensure the model's robustness and generalizability, yielding consistent performance results. The Friedman Chi-Square statistical test was conducted, indicating significant performance differences between the proposed model and other techniques. The study's findings indicate that the proposed model surpassed the other models in terms of accuracy and effectiveness.
Keywords
Introduction
The stock market is a publicly accessible marketplace where corporations may offer their shares for sale to generate profits. The market operates as a complex network that facilitates important commercial transactions on a global scale, operating at a variable speed known as the stock value.1,2 Researchers from several fields are doing studies on the prediction of stock market trends. Several financial experts have made efforts to tackle the challenge of predicting the fluctuations in the stock market, but their effectiveness has been inconsistent. 3 The researchers have tried various tactics, algorithms, and attribute combinations in conducting their experiments in stock market prediction. Investors can trade their shares via the stock market with a fixed price and gain the difference in prices between buying and selling transactions. 4 Now, considering the fact that the volatility in the stock market has reached a high level and market movements occur in a pretty unpredictable way, the majority of enthusiasts are on to explore an apt approach or method that can understandably forecast these movements and reflect high returns. It would be quite unscientific and simplistic to ignore the fact that apparent undulations in the stock market are due to natural factors like political pressures and world events. Given the changing face of global uncertainties and transformations at large, a mere understanding of the variables which may cause these changes is not enough. It is, therefore of essence to devise a system which is able to predict these patterns effectively. 5 Stock market analysis is often divided into two main approaches: technical analysis and historical analysis. Technical analysis utilizes historical market data, such as open, high, low, and close prices, as well as volume, to forecast future movements in stock prices. A significant proportion of academic research focuses on technical analysis, which uses technical indicators to determine the direction of stock price movements and identify turning points in time series.6,7 Prediction models utilize a range of technical indicators, including RSI, OBV, EMA, MFI, SMA, ATR, MACD, AD, Williams, and Stochastic. An investigation is conducted to determine the predictive value of different input qualities in forecasting future stock market movements. It is feasible to anticipate and benefit from forthcoming events without taking risks, even though the future is inherently uncertain and unpredictable.
This study endeavors to construct a model that will empower investors to predict future events with more precision. Developing predictive models using machine learning algorithms is a highly popular and extensively utilized approach. Artificial intelligence (AI) and ML have the potential to significantly enhance the precision of stock market predictions.8,9 Investors can get significant insights into market fluctuations and use this information to make well-informed investing decisions. Traditional regressions are increasingly being challenged by the effectiveness of artificial neural networks (ANNs) as ML models.
Several data analysis factors that may be utilized to evaluate the general suitability of an ANN include accuracy, performance, fault tolerance, volume, scalability, latency, and convergence. 10 An important advantage of ANNs is their capacity for rapid data processing due to their highly parallel implementation. The ELM network model, which is a feed-forward ANN is characterized by its complete connectivity between neurons. An ELM is an emergent supervised technique that has been shown to solve a variety of real-world issues with high accuracy and quick prediction speed. As demonstrated by The minimal norm of weights, simple implementation, and quick prediction speed are provided by the theorems and their proof. Applications and theories of ELM have been thoroughly studied over the last ten years. Three goals were outlined in the initial ELM design in terms of learning efficiency: high learning accuracy, minimal human inventiveness, and quick learning speed. Several additions have been made to the basic ELM model to improve its efficiency and suitability for particular uses.
The process of identifying the best potential solution for a given problem is known as optimization. Over the past few decades, as problems have become more complicated, it has become increasingly clear that new optimization strategies are needed. The optimizations used are Genetic Algorithm (GA), Grasshopper Optimization Algorithm (GOA), and War Strategy Optimization (WSO).
The primary factor for the effectiveness of the GA algorithm may be primarily ascribed to its stochastic components. Selection, reproduction, and mutation all exhibit stochastic tendencies, which allow genetic algorithms to better evade local optima in comparison to quantitative optimization methods. This approach is very appropriate for handling practical issues that include uncertain search spaces. Presently, the GA is used in several industries. 11 The GOA is a newly proposed approach to swarm intelligence optimization by Saremi et al. 12 It derives its guidance from the natural behavior of grasshopper swarms. Compared to many methodologies, this approach has shown intriguing outcomes in addressing continuous optimization difficulties. Another optimization used in this paper is WSO which outperformed the other algorithms. Ayyarao et al. introduced the WSO algorithm in 2022 through the simulation of a war strategy. 13 The WSO algorithm draws inspiration from the offensive and defensive strategies employed in ancient combat. The optimization challenge is resolved by modifying the soldier's location on the battlefield. An army, in the context of the WSO algorithm, refers to a collection of viable solutions that are considered throughout the search process.
Various models were utilized in this project to manage a substantial volume of data. The present literature and the key contribution and novelty of the study are described in the same section. Section 2 presents the examination of the data gathered from the Nikkei 225 index, encompassing the timeframe from June 2013 to the start of June 2022. This section also includes feature selection and extraction using Spearman correlation. The third portion of the framework outlines the proposed model, including the optimization methods and assessment criteria. The fourth section presents the statistical values and findings derived from the data analysis and comparison. The research findings are succinctly outlined in the fifth part.
Literature review
ML architectures such as Multilayer Perceptron MLP, SVM, RBFN, and others have demonstrated significant advantages in predicting financial time-series data. Guo et al. 14 proposed a stock price forecasting method based on SVR to predict five data points of high-frequency SSE data. The effectiveness of the suggested adaptive SVR model is proven to surpass that of conventional SVR and BPNN. Ecer et al. 15 propose a hybrid model that combines MLP and PSO to forecast the price of the Borsa Istanbul 100 index. The study demonstrates that this model achieves higher accuracy and faster processing time compared to both the standard MLP model and the Genetic Algorithm-based MLP model. Wang et al. 16 have recently introduced a forecasting model for stock indexes that utilizes an Elman network. According to reports, the use of Elman with a direct input-output connection has been shown to enhance accuracy while simultaneously lowering network complexity and computing cost. In a recent study, Wu et al. 17 introduced a trading recommendation system that utilizes Synergetic LSTM-GA. Their empirical results from analyzing five Taiwan equities demonstrated that the LSTMLI-GA framework outperformed other models in terms of profit margin. Wu et al. 18 developed a hybrid predictor framework for day-ahead stock price prediction by combining Convolutional Neural Network (CNN) and Long Short-Term Memory (LSTM) models. The authors said that the suggested integrated framework demonstrates superior performance and less accuracy loss compared to individual models when applied to 10 equities from the USA and Taiwan markets. Bas et al. 19 proposed a framework that uses a deep recurrent neural network with PSO-based forecasting for stock index prices.
Das et al., 20 and Yu et al., 21 presented several hybrid ELM frameworks that improve the ELM's input weights by utilizing various techniques inspired by nature. These frameworks have demonstrated superior performance compared to basic ELM models. Das et al. 20 stated that combining the firefly method with an evolutionary framework using OSELM can produce the desired outcome for predicting stock indices. Nayak and Misra 22 introduced an improved ELM framework that makes use of CRO to make better predictions about stock volatility. Models using hybrid optimization, similar to the outlined above, are available in the literature. The specifics of the analyzed publications on ML-based models for predicting time-series related to finances are presented in Table 1.
Overview of the literature on time-series related to finances forecasting ELM- and ML-based predictors.
Overview of the literature on time-series related to finances forecasting ELM- and ML-based predictors.
Jiang et al. 28 combined ELM with the search method to establish a two-stage model for predicting the stock market. To address the issue of data feature recognition, Yang et al. 29 suggested an ELM-based recognition framework. To create a hybrid prediction model, Tang et al. 30 merged ELM with differential evolution algorithms, encouraging prediction outcomes were reported.
This search demonstrates substantial advancements in stock market prediction through the utilization of machine learning techniques. By utilizing ELM, the research provides enhanced precision in predicting outcomes and aims to boost the accuracy of stock market forecasts.
In addition, the study enhances the ELM by using optimization methods such as GA, GOA, and WSO. The article introduces the WSO algorithm as a technique for forecasting stock market movements. Inspiration for the WSO algorithm comes from the attack plan and the defensive strategy that was used in ancient battles. When it comes to the WSO algorithm, there are four different update procedures for the soldier position.
Technical indications are essential in this investigation. The research employs many indicators like RSI, MFI, SMA, ATR, MACD, EMA, OBV, AD, Williams, and Stochastick. These indicators facilitate the prediction of stock price fluctuations. Each of these technical indicators possesses distinct uses and advantages.
These indicators assist in the analysis of historical market information to predict future fluctuations in stock prices. Each of these technical indicators possesses different uses and advantages. RSI is used to quantify the rate of change and variation of price movements, while EMA provides a higher significance to the most recent data points, resulting in a more prompt and smooth trend analysis. MACD, however, provides insights about changes in the intensity, trajectory, and length of a trend in the price of a stock.
The study offers a comprehensive dataset for the Nikkei 225 index, spanning from 2013 to 2022.
Utilizing a diverse set of evaluation measures allows for a comprehensive examination of the performance of the prediction model.
In summary, this research makes substantial progress in the field of stock market prediction by combining ELM and WSO to offer precise and dependable stock market forecasts for investors and financial analysts.
Experimental process
Dataset description
The collected dataset would consist of transaction volume and OHLC prices for a given period. Data was required between 2013 and 2022. A rigorous process of cleaning ensured the quality and consistency of the forecasting models. The multi-step approach in data cleaning was devised to maintain the integrity of the dataset and ensure potential issues that might arise from inaccurate or missing information were avoided. It was a major task to secure data by carefully examining anomalies, extreme values, or other forms of abnormalities that would vitiate findings of validity. The data passed through a number of processes that ensured it was clean and ready to be inspected. These included strategies for reducing gradient mistakes and promoting consistent training results, such as scaling and normalization. The dataset was split into two subsets; 80% of the data was used for training, and the remaining 20% were left for testing.
A daily prediction horizon is used to capture the short-run fluctuation and dynamics in this study. The day-ahead forecasting should correspond with the specific model design and the nature of data for correct mapping of the behavior of financial markets on a daily basis. Changes in a day's reflections allow the model to respond quickly, accurately, and intelligently to the constantly changing financial conditions, critical for short-run analysis. Moreover, it discusses how the model adapts to forecasting periods, increasing its usability. While the main focus is on daily forecasting, the proposed architecture for the model seem to consider longer-term forecasts like those of a week, month, or year. Each of these long-term periods may require variant model adjustments, including parameter tuning and recalibration of input features, for representing unique trends and cyclic patterns related to longer forecasting intervals. Future investigations in such adjustments are a potential avenue of research into the performance of models across different time horizons, with a view to developing strategies that make the accuracy of predictions consistent across different periods.
Nikkei 225 index
The Nikkei Stock Average (Nikkei225) is the major Japanese stock market benchmark globally. It has 225 Tokyo Stock Exchange First Section stocks. The “Dow” technique and Japanese-specific trading patterns provide consistency in this modified price index. Sector balance and market liquidity are often examined in the 225 component stocks. The index calculates highly liquid equities to retain their long-term continuity and depicts industry structure changes.
Candlestick
Technical analysis uses candlesticks as its foundation, and in this article, each candlestick represents price data for a single trading day. Candlesticks, which may also be built with shorter or longer intervals, provide price data for a single trading day. By applying specific mapping rules, each candlestick displays the four key prices of the day on its pattern structure: the price fluctuations above and below the body, referred to as “wicks,” are “shadows” (also known as the highest and lowest prices the stock has traded at during the period represented) and as shown in Figure 1 it represents the area between the open and close. The low difficulty in obtaining data and the effectiveness of candlesticks in expressing trend signals make it easy for almost all researchers to get daily price data of equities.31–33 Candlesticks have gained prominence in the past decade. Many investors analyze candlestick information because it may effectively illustrate trading patterns over short time periods due to its richness of information. Sophisticated investors frequently confirm the correlation between candlesticks and stock movements in empirical analysis, and frequently forecast stock movements based on the candlestick series. The primary purpose of a candlestick pattern is to identify trends by referring to a specific sequence of candlesticks on a candlestick chart. According to Chen and Tsai, 34 candlestick patterns are the result of the patterning and repetition of human behavior and responses throughout history. The candlestick pattern condenses this information and presents it as either a solitary candlestick or a set of candlesticks with different lengths. However, the task of deriving candlestick patterns from historical data is still a challenging endeavor. Candlestick pattern mining should be differentiated from the statistical analysis of high-frequency combinations of candlestick patterns. In addition, it is necessary to consider additional elements such as correlated patterns, interference, pattern alteration, and chronological sequence. As the quantity of candlesticks comprising a candlestick pattern grows, the quantity of potential pattern configurations grows exponentially, rendering it unfeasible to rely solely on a sequential comparison. Furthermore, candlestick patterns derived from past data do not perfectly correspond to every new series. Over time, stock prices will consistently exhibit novel patterns that have not before been observed. One further issue that has been resolved is the process of applying the current knowledge of the link between candlestick patterns and trends to the most recent candlestick sequence.

An example of daily candlestick chart.
The technical index is an essential statistic used in technical analysis to determine the direction of the stock market based on stock data. Furthermore, investors commonly employ it. Although technical indicators are often used to measure the short-term volatility of stock prices, they may also be useful in identifying optimal entry and exit times for medium and long-term investments. 35 The selection of technical analysis indicators for medium and long-term stock forecasting is originally made based on Table 2.
Initial selected technical idicators.
Initial selected technical idicators.
Data analysis using metrics.
Before discussing the primary inquiry of localizing correlations, we will examine the Spearman
36
adjustment for attenuation. In this short diversion, we evaluate whether Spearman's correction results in the identification of hidden connections among tasks in common designs. The evaluation guides are effective because the data generated in simulations aligns well with the assumptions in Spearman's adjustment. If Spearman's correction is unable to identify the specific correlations in practical designs, it is possible that these correlations cannot be determined. Spearman's derivation is based on the process of breaking down the observed variation into two components: the genuine variation and the noise caused by measurement errors. When the reliabilities are poor, the correlations may be given more importance or emphasis to compensate for this. The disattenuated correlation, designated
Through the utilization of correlation analysis and examining the connection across tasks, it becomes evident that, as depicted in Figure 2, the input characteristics encompassed eight specific items: open, high, low, volume, SMA, EMA, AD, and OBV.

Spearman correlation test results for the variables.
Framework for the proposed model
From 2013 to 2022, a thorough analysis is conducted to forecast the stock price of the Nikkei 225 using a specific methodology.
Data administration consists of an initial phase and two components: 80% training and 20% testing. The process involves utilizing MinMaxScaler for data normalization and applying the specified formula.

The framework for the WSO-ELM model.
In the first step, the using of the historical and technical indicators is shown. By utilizing the Spearman correlation, it is analyzed that the final inpit are, open, high, low, volume, SMAM EMA, OBV, and AD. The output is considered to be the close price. The second step shows the data splitting into 80% and 20% for training and testing, respectively. The third step indicates utilization of ML models. The model considered to be used is ELM. By applying the optimization algorithms, this model is enhanced. The evaluation metrics are also used to measure the efficiency of the models. The proposed model is WSO-ELM showing the least error and the highest accuracy in predicting the stock market. The pseudo-code for the proposed model is illustrated in Figure 4.

Overall stages of the development of the proposed model.
In essence, ELM is a two-layer neural network, with training occurring in the second layer and the first layer being fixed and random. Lately, ELM has been applied to feature selection, clustering, regression, and classification. ELM training is ensured by hardware implementation and parallel computing methods. Many fields, including computer vision and biomedical engineering, have made extensive use of ELM. Globally, a large number of academics are focused on developing an efficient learning algorithm that allows neural networks to be trained by modifying their hidden layers. Based on the intuitive belief in biological learning and the generalization performance theories of neural networks, which hold that weights connecting inputs to hidden nodes are randomly assigned and never updated because of the randomly generated hidden nodes, ELM demonstrates the importance of hidden neurons but does not require tuning in many applications.
Let
A class of algorithms known as genetic algorithms, or GAs, are designed to tackle problems that are not amenable to deterministic or analytical solutions. The fundamental concept is to continuously come up with several ways to solve an issue while merging, altering, and assessing them. With this method, the initial issue can be resolved, and a desired behavior can be reached fairly rapidly. Although the method produces a set of “good enough” answers, it may not always yield the overall optimal solution. This is advantageous in the financial sector because analysts need a good answer quickly rather than taking their time to discover the best answer overall, particularly because a previously discovered ideal solution is unlikely to continue to be the greatest one when future advancements in the specific market space. A class of adaptive search and optimization techniques known as GAs was created by Holland. 37 One of their advantages is that they can evaluate loss functions related to predictor parameters without making any assumptions about the continuity or differentiability of the loss function. The field of financial analytics has seen a considerable increase in interest, particularly in recent decades. A GA begins with a population of randomly generated solution candidates, referred to as chromosomes, which are assessed according to an objective function. Typically, binary digit vectors are used to represent these contenders.
After that, promising candidates—represented by solutions with comparatively higher performance—are joined via a binary recombination process known as crossover. Finally, to prevent the loss of genetic variety and prevent local optima, random mutations are introduced. The process of creating successive generations is the same, and they are assessed based on the objective function until a specific criterion is met. One evident feature that impacts the efficacy of a genetic algorithm is the initial accessibility of candidates and the consequent diversity of potential internal recombination options. Nevertheless, the amount of processing power required to process the generations naturally depends on the number of chromosomes created. While a small starting number of contending chromosomes merely necessitates modest computing, it also reduces the size of the “gene pool” that is accessible, decreasing the likelihood of favorable or desirable outcomes. On the other hand, there is a clear increase in computing demand when producing a large beginning population. This is because there are more chromosomes that need to be analyzed, merged, and altered. But it does offer a sufficiently broad foundation that it is significantly more likely to obtain good results. The GENITOR selection approach is used to decide which solution candidates are permitted to take part in the crossover and potentially undergo mutation. This method entails assigning a performance rating to each individual and then swapping out underperforming individuals with identical versions of the top performers. The widely utilized single-point crossover method is also employed, involving choosing a breakpoint at a specific location in each candidate's binary representation at random and matching candidates who made it through the selection process. Every vector is divided into two subvectors using this breakpoint. Two new candidates are produced when the two subvectors to the right of the breakpoint are switched between the two vectors. Ultimately, mutation happens when a certain element inside a given vector is chosen at random. The element changes from being a one to a zero and vice versa. This happens relatively infrequently in order to preserve potential regions of the search space. Candidates who are increasingly more qualified to address the issue at hand are produced by this method of selection and recombination after a sufficient number of iterations. Since there isn't one in the algorithm itself, one must be added in order to cause the evolution to end when it is satisfied. Due to time and computational constraints, this is typically the maximum number of iterations. A parallel implementation of a GA will be shown, which makes better use of the available computational resources and hence produces results faster, as these are the limiting elements to increasing the quality of the results and enlarging the feasible search space. However, when dealing with large-scale problems, The task might need significant computational resources and time, particularly when dealing with large datasets and lengthy training processes.
Grasshopper optimization algorithm
Recently, Mirjalili et al. created the swarm intelligence algorithm known as GOA. 12 An optimal placement challenge for ONUs in a FiWi network has been solved using this nature-inspired paradigm. When implementing grasshopper interactions in nature, GOA takes into account their position. The method uses a long step size and random search to explore every conceivable direction. This can be compared to the sudden, long-range movements of mature grasshoppers. To conduct a local search for exploitation, the diagonal search must be done slowly and in modest steps. The larval grasshoppers’ sluggish speed and little steps complete this part of the algorithm. Another crucial aspect of grasshopper swarming is their search for food sources, which signals the algorithm's goal is being achieved. Every grasshopper in GOA stands for a population solution. The three forces determine each grasshopper's location within the swarm. Three forces that affect it: wind advection, gravity, and social interactions with other grasshoppers. GOA only takes into account social interaction, specifically attraction and repulsion. At the beginning, the grasshoppers are at odds with each other. The target during optimization is thought to be the grasshopper that is the fittest—that is, the one with the highest objective score. A grasshopper may estimate its future position by taking into account its present location, the location of the target, and the positions of all other grasshoppers. There is an adaptable parameter in this algorithm. This value strikes a balance between exploring and using the full swarm that surrounds the target. It helps to lessen the forces of attraction and repulsion between grasshoppers in a proportional way to the number of repeats. As the number of iterations increases, the search area that includes the target becomes smaller. During the dialog, the ideal solution to the problem is determined by identifying the grasshopper's location with the lowest cost function value. The halting criteria in GOA include using the maximum number of repetitions and the specified parameter values. The swarms are generated at random. The grasshoppers first have a repulsive force toward one another. The search space can be explored thanks to this force. After increasing for a specific unit of distance, the power of attraction steadily diminishes. To find global optima, this phase facilitates local search towards the target and allows for exploitation. The grasshopper's final position, which corresponds to the cost function's least value, is what is referred to as the optimal position. As shown in Figure 5, the lifecycle of the grasshopper is completely presented.

The lifecycle of the grasshopper.
The following describes the specifics and pertinent formulae. The three forces determine each grasshopper's location within the swarm. The wind advection, the gravitational pull on it, and its social interactions with other grasshoppers. Each grasshopper's final configuration of the three impacted forces is as follows:
In equation (11),
In the following, Figure 6 gives a general view of the flowchart for the GOA and also the visualization of this algorithm.

The visualization of the GOA.
Modeling the WSO
The battle plan has three primary groups: the King (K), Commander (C), and Soldiers. In the field of battle, both the commander and the king hold the position of leader, directing the movements of the warriors. Each soldier has an equal probability of becoming Commander or King throughout each era, based on the battling power (cost function amount). There is also a chance that the Commander or King would face challenging battles from the rival army (Local Optimal). These opposing troops possess the strength to ensnare the Leaders. In addition to being directed by the Commander's or King's circumstances, troops will be monitored about their collective motion plans to avert such an occurrence.
Attack tactic
This article has modeled two war policies. Each soldier updates his status in the first strategy according to the Commander's and King's circumstances. The assault model renewal method is illustrated in Figure 7. The monarch decides to launch a massive attack when a favorable circumstance presents itself. Thus, the soldier with the most assault or cost capability is regarded as the king. Every soldier will be the same weight and rank at the start of the conflict. They do advance in rank if they carry out the strategy well. It is crucial to remember that, as the conflict wears on, the troops’ weight and rank will probably be updated by how well the technique works. The conditions of the troops, Commander, and King get closer when the battle is won because they achieve the objective [equation (15)].

Mechanism of renewing the attack model.
Here,
The circles around the soldier in Figure 7 represent the local positions of
Renewing the circumstances of each individual is correlated with the commander's position, the king's circumstances, and the troops’ rank. Soldiers are ranked according to how successful they have historically been in the conflict, which takes precedence over the
While the weight and ranking are renewed, the foundation for the second plan of scenario renewal is the Commander, the King, and a soldier selected at random [equation (19)].
The weak soldier with the lowest cost function value over each epoch is found. This work has evaluated several replacement strategies. The simplest is to replace the ineffective soldier with a random soldier using the following formula [equation (20)]:
The optimizer that is being given achieves a satisfactory equilibrium between the exploration and exploitation phases.
Depending on their rating, each soldier (outcome) has a unique weight.
As long as the soldier improves their cost value over the renewing stage, their weight has been renewed for each soldier. As a result, the weight renewal has to do with the particle situation, which is connected to the Commander and King's condition.
The weights will vary in a nonlinear way. The weight fluctuation is significant across the early epochs. Its fluctuation during the recent epochs, however, has been minimal. A faster merging to the global optimum is the result.
There are two phases in the scenario renewal process. It does enhance the ability to explore for the worldwide ideal outcome.
The provided optimizer is straightforward in that it requires fewer and fewer computations.
The concepts of exploitation and exploration are fundamental ideas that apply to all metaheuristic optimizers. To enhance the effectiveness of the optimizer, it is necessary to strike a balance between these two phases. In the suggested optimizer, the act of exploiting has been symbolized by the assault technique, whereas the process of exploring has been shown by the defensive tactic. Additionally, there are other significant aspects that beyond these two steps impact the efficacy of the optimizer. The following factors are illustrated below:
The ‘rand’ parameter: This variable can receive random values ranging from zero to one. The ‘rand’ function determines the soldier's movements, whether they are exploratory or exploration-oriented. The ‘ The individual search motion in the direction of
The weight designated to each combatant has been adaptive and has fluctuated throughout each epoch. Soldiers with a low-cost function value can accommodate a low-weight value, whereas soldiers with a high-cost function value can accommodate a high-weight value.
Figure 8 displays the process diagram of the WSO.

The flowchart for WSO.
The study utilized many performance indicators, such as coefficient of determination, mean absolute error, mean absolute percentage error, and root mean square error. The following are the mathematical formulae for these measures:
This work aims to determine and evaluate the most efficient hybrid algorithm for forecasting stock prices. To achieve this objective, scientists have devised prediction models and carried out assessments on a variety of complex factors that influence trends in the stock market. The main goal is to provide important information to analysts and investors so they may make educated investment decisions. Table 3 and Figures 9 and 10 offer a comprehensive analysis of each model's effectiveness as well as a detailed assessment of its performance.

The training results of the models were given as evaluation criteria.

The testing results of the models were given as evaluation criteria.
WSO-ELM model performance metrics for five cross-validation.
To do a comprehensive assessment of the data analysis, three regularly used metrics were chosen and used. The metrics that were being examined included RMSE, MAE, MAPE and coefficient of determination. Because these measurements can accurately and consistently evaluate the effectiveness of a certain analysis, they are highly valued. Two sets of conditions were used for the experiment: one included the use of an optimizer, and the other did not. This was carried out to obtain a more exact and comprehensive analysis of the model's performance under different conditions.
Precisely estimating stock values is a difficult but essential task for investors in the field of financial forecasting. Numerous models and techniques have been developed to address this difficulty. The ELM is one of them that has become well-known for its effectiveness and simplicity. However, by using optimization approaches, the ELM model's performance may be greatly enhanced. This paper explores the ELM model's performance both with and without optimizers, demonstrating the WSO-ELM model's efficiency in stock price forecasting.
At first, the ELM model was evaluated without any optimization. The model produced promising results, with a testing accuracy of 0.983 for
Optimization techniques were utilized to improve the performance of the ELM model. The GA is a technology that is highly successful at improving difficult problems by imitating the process of natural selection. The
Despite the great improvement demonstrated by the GA-ELM model, more progress was pursued by including the GOA. The GOA-ELM model demonstrated superior performance compared to the GA-ELM model, suggesting that the selection of an optimization approach can significantly influence the performance of the model. The
The WSO-ELM algorithm outperformed all models. The WSO-ELM model obtained excellent results by training and testing the dataset with scores of 0.998 and 0.992, respectively. These results are testimony to how the model can capture the data variability quite substantially and make good predictions.
Low values of MAPE in the WSO-ELM model draw out small percentage deviations between actual and forecasted values, therefore proving that, with regard to accuracy, this model has been proven. The WSO-ELM model is a very powerful tool in regression analysis and stock price forecasting due to its tremendous accuracy and reliability.
The WSO-ELM model provides a serious basis on which informed investment decisions can be made since, it is capable of optimizing trend prediction and reducing forecast errors based on price fluctuation. This model uses historical datasets and technical indicators to provide a reliable forecast on stock values and then adapts to dynamic market conditions, therefore enabling investors in their respective perspectives.
Whereas, during model evaluation, the performance and accuracy of the WSO-ELM model for the different folds in cross-validation of the dataset are represented through Table 4, which presents 5-fold cross-validation. In this, regarding
Assessment of the training time for hybrid models with optimizers and ELM models.
A day-ahead horizon was quite enough for the development of daily market shifts and short-term pattern capturing of the Nikkei 225 index. In this approach, a daily prediction is focused on provides a very detailed perspective of how the stock market reacts to immediate economic indicators and other short-term factors; this is of great value in applications where timely information is important. Configuration and parameters were optimized for daily forecasting. It is very accurate in tracking day-to-day fluctuation, typical of normal stock market behavior. Presnted model embeds recent activities in the market into its daily prediction capability and, therefore, is very responsive to short-term volatilities, making it particularly suitable for near-term decision-making. In addition, it can demonstrate great potential in adapting to longer horizons, such as the weekly, monthly, and yearly forecasts. Extended forecasting can most likely involve different metrics for model evaluation and perhaps different modeling techniques in general, given the cumulative nature of trends over time. The core components of this model-normalization of data, selection of features, and optimization techniques-are expected to remain valid, though. Future work could involve testing model performance with a range of periods for time series forecasting to extend applicability across a wider range of investment strategies and time-sensitive analyses.
Table 5 displays the training times of ELM, and its optimized variants by genetic algorithm, Grasshopper optimization, and WSO. In the case of these models, the standard ELM requires the least training time, approximately 21.82 s. Nevertheless, the implementation of optimization techniques was necessary due to the relatively low accuracy and efficiency of the model, despite its ability to be computed relatively quickly in comparison to other models. The GA-ELM is the most time-consuming of the optimized models in terms of training time, with an average of 109.36 s. GOA-ELM, on the other hand, finished with a training time of 97.69 s. Among the optimized models, WSO-ELM is the fastest, with an average training time of 84.51 s. This demonstrates a significant reduction in training time compared to GA-ELM and GOA-ELM. Despite a slight increase in training time compared to the ELM, the WSO-ELM achieved superior accuracy and overall model performance, thereby establishing itself as the most effective model. This demonstrates a trade-off between predictive accuracy and computational efficiency. While the unoptimized ELM is relatively rapid, its lack of predictive power restricts it significantly. Subsequently, the optimized models exhibit enhanced forecasting capabilities at the expense of an extended training period, whereas WSO-ELM achieves an optimal equilibrium between predictive efficacy and time efficiency. Due to this, WSO-ELM is the most practical option for real-world applications that necessitate increased accuracy and reduced processing time.
Performance comparison of WSO-ELM with benchmark models across training and testing sets.
The Friedman Chi-Square test is a non-parametric statistical test that is designed to identify disparities among multiple related groups. It ranks the data within each group and then compares the sum of these ranks across groups to find significant differences. 38 The proposed model has been implemented with dependable performance efficiency and accuracy through the application of this test in this article. The Friedman Chi-Square test results for four models ELM, GA-ELM, GOA-ELM, and WSO-ELM are illustrated in Figure 11. The ELM model has the highest value of 783.51756, which suggests that it performs the least consistently and is ranked lowest. This indicates that its results are significantly different from those of the optimized models. In contrast, the GA-ELM model exhibits significantly improved performance; however, it still has significant gaps when compared to more intricate optimization techniques, as demonstrated by a Chi-Square of 482.62763. In comparison to ELM and GA-ELM, GOA-ELM has a value of 241.35363, which further mitigates ranking inconsistencies through its superior overall performance and enhanced optimization capabilities. Lastly, the lowest Chi-Square value, 68.57611, for WSO-ELM suggests that this model is superior to the others in terms of precision and uniformity of results. Consequently, this analysis concludes that WSOELM is the most effective model in the study and performs the best in terms of computational efficiency and accuracy.

Statistical test results of the models.
Overall, the WSO-ELM model is a significant improvement in predicting stock prices, since it combines the reliable ELM algorithm with the efficient WSO optimizer. The model distinguishes itself from others due to its remarkable attributes of accuracy, precision, and adaptability. Investors looking to make lucrative stock market transactions are strongly recommended to investigate the WSO-ELM model. This model not only enhances prediction accuracy but also effectively captures market dynamics. By utilizing this approach, investors may make educated judgments, which will increase their prospects for profitable investments.
The effectiveness of the WSO-ELM model was validated through a comparison with several benchmark models commonly used in financial forecasting, including RF, XGBoost, RBF, GRU, LSTM, and ELM. As shown in Table 6, the WSO-ELM model consistently outperformed the alternatives in both training and testing phases, with higher
The WSO-ELM model performance metrics across different stock indices.
In this study, the performance of the WSO-ELM model was assessed on multiple financial indices, including Nikkei 225, S&P 500, CSI 300, and DAX. This broader evaluation allowed for a comparison across different market conditions, reflecting variations in volatility and trading volumes. As shown in Table 7, the WSO-ELM model achieved high
The WSO-ELM model performance metrics across different stock indices.
Predicting stock movements in the ever-changing world of financial markets requires a thorough grasp of a wide range of economic elements. Analyzing indicators that show the general health of economies, industries, and particular enterprises is essential for successful stock prediction. One important factor influencing a company's stock performance is its financial standing. Understanding financial statements is essential for predicting the future success of a company's shares in the market.
The goal of this study is to help researchers and investors better grasp potential methods for stock market prediction. Given the complexity and multitude of variables involved in stock value prediction, developing robust and effective prediction models can be challenging. Accurate prediction-making requires an understanding of the market's non-linear and unexpected characteristics. The general stages and achievements of this research are:
Data normalization guarantees that various variables or features are scaled similarly. When the variables have different magnitudes or units, this is significant. Comparing and interpreting the various features’ contributions to the analysis as a whole is made simpler by normalization. For this reason, the data normalization method has been used in the presentation of this work, which has improved the performance of the proposed model. This study evaluated the efficacy of the ELM model with different optimization models such as GA, GOA and WSO. The results indicated a substantial impact on the model's performance improvement with the optimizing of its hyper-parameters, and the use of optimization methods has a major impact on prediction and final output. Cross-validation was implemented to guarantee the model's robustness and generalizability. A model that is reliable and exhibits consistent performance when other test sets are executed is produced by 5-fold cross-validation. It guarantees that the model will not be overfitted on any specific dataset, but it will generalize to any unseen data with comparable accuracy. The statistical significance of the differences between these models was also assessed using the Friedman Chi-Square test. This test demonstrated the WSO-ELM model's superiority over other optimization methods, emphasizing that the proposed model provided superior predictive accuracy.
It is recognized that the proposed hybrid model (ELM with WSO) exhibits a high degree of predictive accuracy in stock price forecasting, which illustrates its potential to improve the decision-making process for investors and analysts. Nevertheless, it is acknowledged that the interpretability of the model may be compromised by the inherent complexity of integrating multiple algorithms. This lack of interpretability may present a challenge in financial forecasting, where model transparency is essential, as stakeholders must comprehend the reasoning behind the predictions to make more informed decisions.
In financial markets, where the repercussions of decisions are substantial, the trade-off between maintaining model transparency and achieving high accuracy is a critical variable to consider when designing forecasting models. While the hybrid model improves performance, its complexity can hinder the ability to explain the individual contributions of each component, making it more difficult for practitioners to trust or adopt the model in real-world applications.
To resolve this issue, future research could investigate methods to simplify the model or improve its interpretability, such as the use of surrogate models, attention mechanisms, or feature importance methods, to offer a more comprehensive understanding of the model's decision-making process. Furthermore, alternative model architectures that strike a balance between transparency and accuracy could be examined. The proposed model continues to be a valuable tool for predicting stock prices, despite these considerations. The insights obtained from this study can be used to inform future work that aims to achieve a balance between accuracy and interpretability in financial forecasting models.
Footnotes
Declaration of conflicting interests
The author declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.
Funding
The author received no financial support for the research, authorship, and/or publication of this article.
