Optimization of Local Prediction Algorithm of Financial Time Series Based on Fuzzy Neural Network

A dicult area of study is nancial time series forecasting. e development of time series and FNN are introduced in this paper, which also conducts a thorough study of local nancial time series prediction. e next step is to propose and build a local forecasting model based on FNN for nancial time series. e pseudo-inverse of the matrix is updated using ridge regression in this study in order to update the network parameters. is paper provides the corresponding incremental algorithm to update the network parameters as training input data or fuzzy rules increase, avoiding the need for parameter retraining.is paper employs MATLAB for simulation and comparative analysis in order to validate the viability and reliability of this approach. 96.31 percent is the predicted accuracy according to simulation results, which is 9.84 percent better than the predicted accuracy of the conventional NN algorithm. In terms of predicting nancial time series, the model put forth in this paper performs better. e performance of the nancial time series prediction model is further enhanced, making up for the shortcomings of the earlier research. Additionally, it contributes to related research in the area of nancial time series prediction.


Introduction
A time series is a collection of numerical data that is arranged chronologically. In order to fully explore all the information present in the data and achieve the goal of predicting how things will develop in the future, the time series analysis of this group of data was completed using mathematical statistics [1]. In the contemporary environment, when faced with a large amount of time series data, people seek out e cient techniques or methods to uncover the knowledge or information that is concealed within these time series data sets, build time-varying series models, and predict the future using a set of rules [2]. e prediction of nancial time series data is a di cult research topic because nancial time series data typically contain a lot of noise and clearly show nonlinear and nonstationary complex characteristics. By using a small sample size of historical observational data, time series prediction creates a model that can be used to control and forecast data by elucidating the statistical law governing the data. In both social interaction and academic study, time series prediction is crucial [3]. It is the area of research and di culty in the eld of big data analysis and management science, and it can o er signi cant theoretical foundation and robust data support for decision analysis and policy making. In the nancial industry, particularly, time series analysis is frequently used in applications like wind energy forecasting, tra c ow forecasting, and water level forecasting. Better prediction outcomes can also be obtained by using econometrics, machine learning, and other techniques to predict nancial time series data.
ough more academics use NN (Neural Network) based [4][5][6] time series analysis because it is better suited for nonlinear and parallel data prediction, the majority of NN used in time series prediction, such as MLP (Multilayer Perceptron) and RBF (Radial Basis Function) networks based on BP [7], are predicated on the idea that there is a linear or nonlinear relationship between historical data and future values. ese systems attempt to determine whether there is a linear or nonlinear relationship or to express the historical and future states using functions.
Forecasting is the study of the future development and operation law of things using qualitative and quantitative methods such as mathematics, statistics, economics, computer, and engineering technology on the foundation of mastering pertinent information. Additionally, to gauge, describe, and assess the various components' shifting trends, more and more Internet finance companies have been established as a result of the growth of online finance. In order to prevent losses brought on by loans to risky borrowers, these financial formulas forecast the credit of users based on the historical repayment time series of users. ere are numerous established technologies and techniques available today for the modelling and prediction of stationary time series, particularly for the study of linear models. While there is currently no perfect method to analyse and deal with such time series, which cannot produce the desired results, most time series in practical problems are not stable and linear [8]. e variables that influence how financial time series data change over the short, medium, and long term are complex and diverse. Many time series prediction systems using MLP or RBF network models train the network after a prediction period in order to adapt the network to the current situation [9]. Some time series systems, however, might exhibit different traits at various points in time.
e structure and parameters of the prediction network must therefore be able to be continuously changed throughout the prediction process. e local prediction of financial time series is thoroughly examined in this paper, and a local prediction model based on FNN (fuzzy neural network) is proposed and built. e following are the innovations of this paper.
(1) e FNN structure, learning methodology, and algorithm for creating, pruning, and aggregating regular nodes are the main topics of this paper. In a FNN, the initialization of fuzzy parameters is performed using a restricted Boltzmann machine, which minimises the impact of parameter randomness, and the network parameters are then learned using a learning rate and scaling factor. e classification accuracy of the model is increased, and the number of iterations is decreased, through the adaptive adjustment of learning rate. e outcomes demonstrate the algorithm's capability to produce accurate classification results.
(2) In order to build a prediction model of financial time series data based on different frequencies and fluctuations, the financial time series data is decomposed and reconstructed into trend terms, low-frequency terms, and high-frequency terms in this study using the integrated empirical mode decomposition and run-length judgement method. e prediction results of the various components are then integrated to produce the final prediction result. e conventional financial time series model and other nonlinear models are contrasted with the FNN-based financial time series prediction model. It is discovered that the FNN-based financial time series prediction model in this paper performs as expected and offers some advantages over competing models.
is article has five sections, each of which is organized differently in accordance with the needs of the research: e introductory section is the first section. is section provides an overview of the paper's history, thesis, and research significance as well as its originality and organizational design. A related section is the second one. e research status of financial time series and NN at home and abroad is briefly discussed in this section. And finally, the paper's ideas and research findings are described. e third section defines FNN and describes its fundamental structure and learning algorithm, with the discussed financial time series' related contents. On the basis of FNN, a local forecasting model for financial time series is suggested.
e simulation of the model algorithm put forth in this paper is done in Section 4, and the results are examined and discussed. e experiment demonstrates that the suggested model works.
e conclusion is found in fifth section. e work done in this paper is summed up in this section, which also looks ahead.

Related Work
As a research hotspot in academic circles, how to establish an effective prediction model to realize the effective prediction of time series is the core innovation of time series prediction research. At present, many scholars have discussed it.
Xu et al. applied BP neural network to time series forecasting of stocks and then compared it with the other three forecasting algorithms in [10]. e results show that the BP neural network model has a better fit for the stock time series prediction, and the prediction is more accurate. Yin et al. proposed a data-driven neural network prediction model [11] for the problem that traditional statistical models cannot accurately describe the complex nonlinear characteristics of real systems. Schnurr applied radial basis neural network to the prediction of exchange rate and obtained more accurate prediction of exchange rate [12]. Wanner et al. proposed a time series forecasting model based on fuzzy neural network.
en, based on the financial time series forecasting model combining fuzzy neural network and GARCH, a specific mixed model is given for the data of the Shanghai Stock Exchange Index [13]. Yao uses Elman-NN to predict the stock composite index forecasting [14].
e results show that the absolute average error and the least square error between the predicted value and the actual value are both smaller, which can better fit the actual value of the stock composite index series. Wiesinger et al. proposed the modelling concept of modularization and framing and introduced it into the research of time series forecasting [15]. Based on the construction of data preprocessing module, optimization module, and forecasting module, a series of hybrid forecasting frameworks are successfully proposed for time series forecasting research. Dyson proposed an improved Elman-NN model by introducing time weights and randomness factors for the Elman-NN model [16]. It improves the prediction accuracy of existing Elman-NN for time series data. Mo et al. introduced a time prediction system based on evolutionary fuzzy neural network [17,18]. e evolutionary fuzzy neural network proposed by Xu et al. is a fuzzy neural network model [19]. It uses a feedforward neural network to process the blurred data; then, the deblurred data is used as the output.
is paper proposes and develops a FNN-based local forecasting model for financial time series based on a thorough analysis of prior literature. In a FNN, the initialization of fuzzy parameters is performed using a restricted Boltzmann machine, which minimises the impact of parameter randomness, and the network parameters are then learned using a learning rate and scaling factor. e classification accuracy of the model is increased, and the number of iterations is decreased, through the adaptive adjustment of learning rate. is paper incorporates incremental learning and ridge regression into the training of FNNs due to the increasing amount of input data over time.
e study demonstrates that the FNN-based financial time series prediction model used in this paper performs at the expected level and offers some advantages over competing models.
is demonstrates the proposed model's efficacy. is paper's research has significant practical implications. It has significant practical value for resolving more real-world problems.

Financial Time Series Forecast.
To meet the demands of social and economic development and management, prediction is a social activity that emerges and develops. Forecasting has become a well-rounded discipline through constant development and advancement [20]. Classification and valuation are the usual methods for prediction. In other words, the prediction typically obtains the model through classification or valuation and then applies the model to the prediction of unknown variables. In order to improve social and economic benefits and decrease management risks, it is crucial to cross the boundary between natural and social sciences. Doing so can help people make informed decisions and provide guidance for their future behaviour. A collection of random variables arranged chronologically is known as a time series. Only small observation samples of time series are used as the data in practical problems, so the primary goal of time series analysis is to choose the most logical statistical model for the data that takes into account the characteristics of the observation data.
e goal of forecasting is then achieved by using the statistical properties of the model to explain the statistical laws of the data [21]. e development law of things can be understood and applied by studying time series, which can be very useful in our daily lives. Understanding the time series is crucial as a result.
Time series can be divided into univariate and multivariate time series depending on how many variables they contain. Multivariable time series are multidimensional series whose value changes over time, as opposed to singlevariable time series, which are one-dimensional series with changing values over time. In the course of evolution, many real time series do not have fixed and uncomfortable mean values. e sequences do, however, exhibit some homogeneity aside from regional variations. If we make the right adjustments to the process, we can stabilise it and create a model to represent the homogeneous nonstationary properties. At first glance, many time series appear to follow no rules, but a wealth of data demonstrates that a time series can frequently be produced by superimposing a number of different forms. Time series typically have a systematic part and a nonsystematic part. Among them, the trend, seasonal, and periodic components make up the systematic part, while the sudden change and random change components make up the nonsystematic part. e linear functional relationship between the data makes the traditional time series model easy to comprehend. Nevertheless, no theory has been developed to demonstrate that a given set of time series must satisfy linearity or extend to any kind of prediction function.
e main components of a time series are the period to which the phenomenon belongs and the variables that reflect the phenomenon's stage of development. Time series prediction involves predicting the sequence values of the subsequent time based on the sequence values of the current time and one or more previous times. Time series are created through a random process. e process of predicting future outcomes using an established mathematical model that is based on historical and current data to describe a random process is known as time series prediction [22]. As continuous observations in time series data are inherently different from other types of data in that they are not independent, the order in which these observation points occur must be taken into account when analysing time series data. Description, modelling, prediction, and control are the primary goals of time series analysis. ey are complementary rather than separate. Two equivalent representations exist for time series. e other is based on time series with white noise, while the first is based on the past values of time series. We believe that the time series' white noise results from the use of a linear prediction function to foretell its previous values. e five qualities of time series prediction are scientificity, timeliness, premise, approximation, and description. One of these is the scientific validity of time series prediction, which is based on a particular mathematical model and is predicated on the relationship between the past, present, and future. e timeliness of a time series prediction is the time that is predicted, the description of a time series prediction is the characteristics of things that are predicted, and the approximation of a time series prediction is the deviation from the prediction.

Application of NN in Time Series
Prediction. ANN (artificial neural network) [23] has good self-learning ability, adaptive ability, generalization ability, and nonlinear Mobile Information Systems mapping ability. According to the nonlinear functions of neurons, such as Sigmoid function, any nonlinear time series can be reconstructed by organizing these neurons. However, NN also has some shortcomings, such as long learning time, many structural parameters, complex topology, poor generalization ability of network, and being easy to fall into local minimum in training, etc. In addition, there are still some problems in the selection of initial values of parameters such as the number of hidden layers, the number of hidden neurons, and the learning rate. e most popular NN model is MLP based on BPNN. BPNN is a multilayer feedforward network that trains using error backpropagation. It is the NN model of feedforward NN that is most frequently used. Time series prediction using the BPNN model has the benefits of easy calculation and high fault tolerance. However, it only makes use of nonlinear mapping. To treat a dynamic modelling problem as a static modelling problem is to use static feedforward NN to identify dynamic systems. It cannot accurately reflect the associated dynamics of a system, which will inevitably result in a great deal of issues and have an impact on the performance of the model. Many academics have improved the learning algorithm to avoid the BPNN's inherent flaws. e algorithm is anticipated to benefit from fuzzy logic and ANN. In addition to having strong self-learning and adaptive capabilities, language information can also be used effectively. Furthermore, the network parameters have a distinct physical meaning, which aids in comprehending and analysing the actual system. RBF is a better network in a feedforward network because it is based on RBF. eoretically, it can approach any nonlinear function that can, in time series prediction, as closely as possible resemble the original time series data. Finding the trained time series data's best fitting plane in multidimensional time series space is equivalent to learning the original time series data. e structure of NN is shown in Figure 1.
A type of forward feedback NN is the Elman-NN prediction model. e input layer, fuzzy layer, fuzzy reasoning layer, and output layer are the four segments that make up a FNN. Elman-NN, in contrast to BPNN and RBFNN, has an additional layer of neurons in the receiving layer and a feedback function of input and output. e receiving layer is special in that it has the ability to store the output value of the hidden layer unit from a previous run. is ability can be used as a delay operator to give the model the ability to act as a dynamic memory, adapt to changing characteristics over time, and dynamically reflect related system characteristics. Elman-NN can better predict time series and perform timevarying characteristic adaptation because the neurons in the receiving layer can store the output state of the hidden layer, giving the network the ability to map dynamic characteristics. Fuzzy logic makes it simple for users to combine prior system knowledge with fuzzy rules; NN excels at adaptively learning network parameters and has a strong capacity for parallel processing and generalization. e fuzzy time series prediction model is appropriate for handling time series prediction issues with uncertainties and fuzzy language variables because it is based on fuzzy theory and fuzzy logic concepts. To effectively model fuzzy time series prediction models, the universe must be divided and fuzzy relations must be handled. Because of this, many researchers organically combine the idea of "abstract ability" and fuzzy logic's nonlinear processing capability with NNs's self-learning capability and ability to approximate any arbitrary function. In this way, the system provides the network weights with a distinct fuzzy logic meaning in addition to performing fuzzy logic reasoning. FNN thus combines the benefits of NN and fuzzy systems. Fuzzy logic and NN's self-learning capabilities allow it to deal with uncertain information.

Construction of Local Forecasting Model of Financial Time Series Based on FNN.
e forecasting field has been influenced by linear statistical methods for a long time. e essence of FNN is to endow the conventional model NN with fuzzy input information and fuzzy weights, so the neuron construction mode of FNN is closely linked with the learning algorithm of NN. It has good nonlinear prediction performance and practicability. It is a variable structure system with the ability to adapt to the environment and learn from the outside world.
ere are many kinds of connections between neurons, and the strength of connections between neurons has certain plasticity, which is equivalent to the change of synapse's ability to transmit information. It can be organized by learning and training to meet the requirements of different information processing. FNN, whether as an approximation or a pattern memory, needs to learn and optimize the weight coefficient. Learning algorithm is the key to optimize the weight coefficient of FNN. FNN is layered according to the steps of fuzzy logic, and then the training algorithm of NN is used to adjust the parameters. According to the principle of FNN model, this paper presents a time series prediction model with the characteristics of online prediction and long-term learning. e prediction model has the characteristics of online prediction and long-term learning and does not need repeated training. e training algorithm flow is shown in Figure 2.
In the prediction of time series data, only the original time series data is used as the input feature of the network for prediction, and the original time series features are not processed, such as feature extraction and feature selection for the original time series data. e system adjusts its parameters and creates all rule nodes during training. To initialize the network, the parameters should be set to initial values, then, the first training sample is used to create the first node, and the connection weights W 1 , W 2 are set as shown in the formula: (1) Among them, W 1 is the connection right from the second layer to the third layer; W 2 is the connection right from the third layer to the fourth layer. E(1) and T(1) are the fuzzy input and output values of the first input sample. During training, W 1 and W 2 can be expressed as follows: w 1 (3), . . . , w 1 (n) T ,

Mobile Information Systems
where n is the number of nodes in the third layer; w 1 (n) is the connection weight matrix from all the second layer nodes to the third layer node n; w 2 (n) is the connection weight matrix from the third layer node n to all the nodes in the fourth layer. is paper will introduce a time-dependent strength function Φ(t n ), which is defined as follows: Among them, α is the time intensity coefficient greater than 0; t n is the latest value in the data set; t a is a random value in the data set; ρ(t) is the drift function; θ(t) is the volatility function; G(t) is a random process. ρ(t) is defined as follows: Among them, c is the number of samples. e definition of θ(t) is as follows: where x is the mean of the sample. G(t) is a random process and satisfies the following conditions: Each data point in the time series makes a different contribution to the current predicted value; the closer a data point is to the current predicted value, the greater the contribution. As a result, each historical data set should be given a role based on the time that it occurred, meaning that different historical data points should have different weights. e following drawbacks of using a single predictor are frequently present: it is very challenging to construct a single high-precision predictor; some learning algorithms or networks do not always produce the best predictions; and there are no deterministic guidelines for choosing initial parameters when using NN prediction. Forecasting must be integrated for this reason. e integrated forecasting model fully takes into account the forecasting outcomes of various forecasters for the same issue, which can enhance parameter choice and increase forecast accuracy and stability. is paper chooses four evaluation indices to thoroughly and methodically assess the prediction model's prediction accuracy. eil inequality coefficient, MAE, RMSE, and MAPE (mean absolute percentage error) are among them (mean absolute error). e calculation formula of each prediction performance evaluation index is as follows: Among them, A i is the real value of the time series at time i; F i is the predicted value of the time series at time i; N is the length of the time series. 0 ≤ Theil ≤ 1. When Theil � 0, the predicted value and the actual value are completely fitted, and the model has the strongest predictive ability; when Theil � 1, the model has the worst predictive ability.
Aggregation is the combination of a few regular nodes belonging to a "class" into one regular node. Pruning is the removal of nodes that are no longer needed after the system has completed a certain number of steps. According to Euclidean distance or fuzzy distance, these nodes are said to be in the same "class" in this context, meaning that they can each be represented by a single node and are close to one another in multidimensional space. e final feature set is chosen based on the ordering of the features. It is determined during the selection process whether each feature that will be added to the feature set will have an impact on network error that is greater than the predetermined threshold. If so, it is included in the feature set; otherwise, it is added to the end of the feature list.

Result Analysis and Discussion
e performance evaluation of time series prediction is one of the important links in the research and application of time series prediction methods. By evaluating the performance of the established prediction model, we can ensure its applicability and effectiveness and verify the significance and value of the research. erefore, this chapter carries out experimental evaluation. e experimental data are all from Wind database, and the sample data is selected from January 1, 2012, to December 30, 2019. e sample data is divided into three parts: training set, verification set, and test set. e training set is used to train NN parameters, the test set is used to adjust NN structure, and the test set is used to test the prediction ability and generalization ability of the network model. In order to improve the prediction effect, the original data are processed, as shown in formula (8). e Shanghai Composite Index is shown in Figure 3.
Firstly, the input and output data of the training set are clustered, then different primary prediction models and secondary prediction models are established for each type of input and output, and then the integrated model is built according to the above integration methods. For the test set data, first judge its category, and then calculate and integrate the output of the base predictor according to the built model. e specific prediction effect of the model is shown in Table 1.
As can be seen from Table 1, the average absolute error rate and eil inequality coefficient of the network sum in this paper are smaller than those of other networks in forecasting Shanghai Composite Index, both in training set and in verification set. is result confirms the importance of time series relationship in the prediction of time series data. Figure 4 shows the training trend of this model.
In this paper, the parameter selection of the model is only the number of membership functions, the type of membership functions, and the maximum number of iterations, which is simple and easy to operate. By calculating the error index of the network, it is compared with the errors predicted by other networks. e results are shown in Table 2.
rough this experiment, compared with other networks, this network can extract more useful features for network prediction from the set of alternative features. Moreover, the financial time series prediction model    proposed in this paper has better performance in time series data prediction. e accuracy of the test set in different training sets is shown in Figure 5. e comparison between the output values of different models and the actual values is shown in Figure 6.
FNN model combines the logical reasoning ability of fuzzy system with the adaptive ability of NN and has good nonlinear prediction ability. In order to verify its superior ability, the experiment was carried out again. Figure 7 shows the fitting results of different models to spike data.
It can be seen that this network can obviously improve the prediction accuracy. Its performance is better than the comparison method, but there are still some peak data that cannot be predicted well. e main reason is that only the original time series data features are used, but some user features such as user's gender, city, and consumption are not used.

Conclusions
e development of time series and FNN are introduced in this paper, which also conducts a thorough study of local financial time series prediction. e next step is to propose and build a local forecasting model based on FNN for financial time series. When learning network parameters in a FNN, the learning rate with scaling factor is used after initializing the fuzzy parameters with a restricted Boltzmann machine, which lessens the impact of parameter randomness. e classification accuracy of the model is enhanced, and the number of iterations is decreased, through adaptive learning rate adjustment. e findings demonstrate that the algorithm is capable of achieving high classification accuracy. is paper uses MATLAB to conduct a comparative analysis in order to further confirm the viability and dependability of this method. 96.31 percent is the predicted accuracy according to simulation results, which is 9.84 percent better than the predicted accuracy of the conventional NN algorithm. e quantity of fuzzy membership functions, the pruning and aggregation of rules, and other training parameters, all have a significant impact on how the network behaves and how well predictions are made. In this study, the FNN-based financial time series forecasting model has performed as expected and has some advantages over competing models. Many of the problems with the time series prediction research that is currently done have been successfully resolved in this paper. Although it adds to the body of knowledge in the field of predicting financial time series, there are still a number of limitations that warrant further investigation in subsequent work. Additionally, when applied to forecasting financial time series, the nonlinear method should perform well when mixed with a few conventional models to create a mixed model.

Data Availability
e data used to support the findings of this study are available from the corresponding author upon request.