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

Authors: Yuanyuan Gong; Hongzhi Ai; Zhi Gao; Mancang Wang
Journal: Mobile Information Systems
 (2022)

---

## Abstract

A difficult area of study is financial time series forecasting. The development of time series and FNN are introduced in this paper, which also conducts a thorough study of local financial time series prediction. The next step is to propose and build a local forecasting model based on FNN for financial time series. The pseudo-inverse of the matrix is updated using ridge regression in this study in order to update the network parameters. This 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. This 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 financial time series, the model put forth in this paper performs better. The performance of the financial 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 financial time series prediction.


---

## Body

## 1. 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 efficient 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]. The prediction of financial time series data is a difficult research topic because financial 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 difficulty in the field of big data analysis and management science, and it can offer significant theoretical foundation and robust data support for decision analysis and policy making. In the financial industry, particularly, time series analysis is frequently used in applications like wind energy forecasting, traffic flow forecasting, and water level forecasting. Better prediction outcomes can also be obtained by using econometrics, machine learning, and other techniques to predict financial time series data. Though more academics use NN (Neural Network) based [4–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. These 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. There 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]. The 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. The structure and parameters of the prediction network must therefore be able to be continuously changed throughout the prediction process. The 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. The following are the innovations of this paper.(1)
The 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. The classification accuracy of the model is increased, and the number of iterations is decreased, through the adaptive adjustment of learning rate. The 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. The prediction results of the various components are then integrated to produce the final prediction result. The 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.This article has five sections, each of which is organized differently in accordance with the needs of the research: The introductory section is the first section. This 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. The 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. The 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. The simulation of the model algorithm put forth in this paper is done in Section4, and the results are examined and discussed. The experiment demonstrates that the suggested model works. The conclusion is found in fifth section. The work done in this paper is summed up in this section, which also looks ahead.


## 2. 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]. The 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. Then, 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]. The 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]. The 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.This 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. The classification accuracy of the model is increased, and the number of iterations is decreased, through the adaptive adjustment of learning rate. This paper incorporates incremental learning and ridge regression into the training of FNNs due to the increasing amount of input data over time. The 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. This demonstrates the proposed model’s efficacy. This paper’s research has significant practical implications. It has significant practical value for resolving more real-world problems.


## 3. Methodology

### 3.1. 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. The goal of forecasting is then achieved by using the statistical properties of the model to explain the statistical laws of the data [21]. The 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 single-variable 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. The 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. The 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. The 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. The 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. They are complementary rather than separate. Two equivalent representations exist for time series. The 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. The 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. The 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.


### 3.2. Application of NN in Time Series Prediction

ANN (artificial neural network) [23] has good self-learning ability, adaptive ability, generalization ability, and nonlinear 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. The 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. The 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. Theoretically, 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. The structure of NN is shown in Figure 1.Figure 1
NN structure.A type of forward feedback NN is the Elman-NN prediction model. The 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. The receiving layer is special in that it has the ability to store the output value of the hidden layer unit from a previous run. This 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 time-varying 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. The 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.


### 3.3. Construction of Local Forecasting Model of Financial Time Series Based on FNN

The forecasting field has been influenced by linear statistical methods for a long time. The 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. There 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. The prediction model has the characteristics of online prediction and long-term learning and does not need repeated training. The training algorithm flow is shown in Figure2.Figure 2
Training algorithm flow.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. The 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 weightsW1, W2 are set as shown in the formula:(1)W1=E1,W2=T1.Among them,W1 is the connection right from the second layer to the third layer; W2 is the connection right from the third layer to the fourth layer. E1 and T1 are the fuzzy input and output values of the first input sample. During training, W1 and W2 can be expressed as follows:(2)W1=w11,w12,w13,…,w1nT,W2=w21,w22,w23,…,w2nT,where n is the number of nodes in the third layer; w1n is the connection weight matrix from all the second layer nodes to the third layer node n; w2n is the connection weight matrix from the third layer node n to all the nodes in the fourth layer. This paper will introduce a time-dependent strength function Φtn, which is defined as follows:(3)Φtn=1αe∫tntaρtdt+∫tntaθtdGt.Among them,α is the time intensity coefficient greater than 0; tn is the latest value in the data set; ta is a random value in the data set; ρt is the drift function; θt is the volatility function; Gt is a random process. ρt is defined as follows:(4)ρt=1c+t2Among them,c is the number of samples. The definition of θt is as follows:(5)θt=1N−1∑i=1Nxi−x¯2,where x¯ is the mean of the sample. Gt is a random process and satisfies the following conditions:(6)G0=0EGt=0t>0,Gt∼N0,σ2tσ>0.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. The 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. The 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. This paper chooses four evaluation indices to thoroughly and methodically assess the prediction model's prediction accuracy. Theil inequality coefficient, MAE, RMSE, and MAPE (mean absolute percentage error) are among them (mean absolute error). The calculation formula of each prediction performance evaluation index is as follows:(7)MAPE=1N∑i=1NAi−FiAi×100%,RMSE=1N×∑i=1NFi−Ai2,MAE=1N∑i=1NFi−Ai,Theil=1T∑t=1TYtpre−Yttrue2/1T∑t=1TYtpre2+1T∑t=1TYttrue2.Among them,Ai is the real value of the time series at time i; Fi 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. The 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.


## 3.1. 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. The goal of forecasting is then achieved by using the statistical properties of the model to explain the statistical laws of the data [21]. The 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 single-variable 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. The 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. The 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. The 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. The 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. They are complementary rather than separate. Two equivalent representations exist for time series. The 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. The 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. The 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.


## 3.2. Application of NN in Time Series Prediction

ANN (artificial neural network) [23] has good self-learning ability, adaptive ability, generalization ability, and nonlinear 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. The 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. The 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. Theoretically, 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. The structure of NN is shown in Figure 1.Figure 1
NN structure.A type of forward feedback NN is the Elman-NN prediction model. The 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. The receiving layer is special in that it has the ability to store the output value of the hidden layer unit from a previous run. This 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 time-varying 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. The 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.


## 3.3. Construction of Local Forecasting Model of Financial Time Series Based on FNN

The forecasting field has been influenced by linear statistical methods for a long time. The 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. There 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. The prediction model has the characteristics of online prediction and long-term learning and does not need repeated training. The training algorithm flow is shown in Figure2.Figure 2
Training algorithm flow.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. The 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 weightsW1, W2 are set as shown in the formula:(1)W1=E1,W2=T1.Among them,W1 is the connection right from the second layer to the third layer; W2 is the connection right from the third layer to the fourth layer. E1 and T1 are the fuzzy input and output values of the first input sample. During training, W1 and W2 can be expressed as follows:(2)W1=w11,w12,w13,…,w1nT,W2=w21,w22,w23,…,w2nT,where n is the number of nodes in the third layer; w1n is the connection weight matrix from all the second layer nodes to the third layer node n; w2n is the connection weight matrix from the third layer node n to all the nodes in the fourth layer. This paper will introduce a time-dependent strength function Φtn, which is defined as follows:(3)Φtn=1αe∫tntaρtdt+∫tntaθtdGt.Among them,α is the time intensity coefficient greater than 0; tn is the latest value in the data set; ta is a random value in the data set; ρt is the drift function; θt is the volatility function; Gt is a random process. ρt is defined as follows:(4)ρt=1c+t2Among them,c is the number of samples. The definition of θt is as follows:(5)θt=1N−1∑i=1Nxi−x¯2,where x¯ is the mean of the sample. Gt is a random process and satisfies the following conditions:(6)G0=0EGt=0t>0,Gt∼N0,σ2tσ>0.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. The 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. The 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. This paper chooses four evaluation indices to thoroughly and methodically assess the prediction model's prediction accuracy. Theil inequality coefficient, MAE, RMSE, and MAPE (mean absolute percentage error) are among them (mean absolute error). The calculation formula of each prediction performance evaluation index is as follows:(7)MAPE=1N∑i=1NAi−FiAi×100%,RMSE=1N×∑i=1NFi−Ai2,MAE=1N∑i=1NFi−Ai,Theil=1T∑t=1TYtpre−Yttrue2/1T∑t=1TYtpre2+1T∑t=1TYttrue2.Among them,Ai is the real value of the time series at time i; Fi 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. The 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.


## 4. Result Analysis and Discussion

The 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. Therefore, this chapter carries out experimental evaluation. The experimental data are all from Wind database, and the sample data is selected from January 1, 2012, to December 30, 2019. The sample data is divided into three parts: training set, verification set, and test set. The 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). The Shanghai Composite Index is shown in Figure 3.(8)Yt=logZtt=1,2,3,…,200.Figure 3
The Shanghai Composite Index.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. The specific prediction effect of the model is shown in Table1.Table 1
Specific prediction effect of the model.
AlgorithmTraining setTest setVerification setMAPETheilMAPETheilMAPETheilCNN0.01240.00960.01250.00840.00950.0069GRU0.00840.00620.00740.00520.00690.0051LSTM0.00840.00560.00850.00570.00610.0048BPNN0.00960.00810.00990.00660.00850.0078FNN0.00710.00480.00410.00510.00570.0039As can be seen from Table1, the average absolute error rate and Theil 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. This result confirms the importance of time series relationship in the prediction of time series data. Figure 4 shows the training trend of this model.Figure 4
Model training trend diagram.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. The results are shown in Table2.Table 2
Predict the index results of different models.
ErrorTraditional forecasting modelCNN-GRU modelARIMA-ESN modelPrediction model in this paperMAPE20.74119.93419.79419.368RMSE6.2566.1875.8645.648MAE4.7654.7144.5274.421Through 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. The accuracy of the test set in different training sets is shown in Figure5. The comparison between the output values of different models and the actual values is shown in Figure 6.Figure 5
Accuracy of test set of data set in different training sets.Figure 6
Comparison between output values of different models and actual values.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. Figure7 shows the fitting results of different models to spike data.Figure 7
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. The 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.


## 5. Conclusions

The development of time series and FNN are introduced in this paper, which also conducts a thorough study of local financial time series prediction. The 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. The classification accuracy of the model is enhanced, and the number of iterations is decreased, through adaptive learning rate adjustment. The findings demonstrate that the algorithm is capable of achieving high classification accuracy. This 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. The 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.



---

*Source: 3575130-2022-08-17.xml*