A Forecasting Model Based on Multi-Valued Neutrosophic Sets and Two-Factor, Third-Order Fuzzy Fluctuation Logical Relationships

: Making predictions according to historical values has long been regarded as common practice by many researchers. However, forecasting solely based on historical values could lead to inevitable over-complexity and uncertainty due to the uncertainties inside, and the random inﬂuence outside, of the data. Consequently, ﬁnding the inherent rules and patterns of a time series by eliminating disturbances without losing important details has long been a research hotspot. In this paper, we propose a novel forecasting model based on multi-valued neutrosophic sets to ﬁnd ﬂuctuation rules and patterns of a time series. The contributions of the proposed model are: (1) using a multi-valued neutrosophic set (MVNS) to describe the ﬂuctuation patterns of a time series, the model could represent the ﬂuctuation trend of up, equal, and down with degrees of truth, indeterminacy, and falsity which signiﬁcantly preserve details of the historical values; (2) measuring the similarities of different ﬂuctuation patterns by the Hamming distance could avoid the confusion caused by incomplete information from limited samples; and (3) introducing another related time series as a secondary factor to avoid warp and deviation in inferring inherent rules of historical values, which could lead to more comprehensive rules for further forecasting. To evaluate the performance of the model, we explored the Taiwan Stock Exchange Capitalization Weighted Stock Index (TAIEX) as the major factor we forecast, and the Dow Jones Index as the secondary factor to facilitate the predicting of the TAIEX. To show the universality of the model, we applied the proposed model to forecast the Shanghai Stock Exchange Composite Index (SHSECI) as well.


Introduction
Financial forecasting problems are one of the most complex problems in the modern economic environment.It is well known that there is a statistical long-range dependency between the current values and historical values in different times of certain time series [1].With this understanding, as well as the development of statistics and probability, former researchers designed exponential smoothing (ES), autoregressive and moving average (ARMA), autoregressive integrated moving average (ARIMA), and seasonal ARIMA to forecast time series [2,3].However, because the historical values contain considerable amounts of noise and randomness, a model solely based on real historical values could not fully convey the inherent rules.
To find the general rules of time series, Song and Chissom [4] introduced fuzzy set theory into time series and proposed the concepts of fuzzy time series (FTS).They used historical data and max-min composition operations to establish a fuzzy time series model to predict the enrollment at the University of Alabama [5].To conceive a more general and representative method of prediction, a vast number of fuzzy time series models combined with autoregressive (AR) models and moving average (MA) models [6,7] based on fuzzy lagged variables of time series were proposed which helped the refinement of prediction with large degree.Those models can successfully convey the general rules of the time series; however, the composition operation is complicated and sometimes the designed algorithms could not fully represent the inherent problems.Later, Chen [8] improved the model by using simplified arithmetic operations.After that, the model is extended to a high-order FTS model to reflect more details of history to improve the prediction performance of university enrollment [9].On this basis, more researchers proposed novel models by combining high-order FTS with other algorithms to improve the performance.For example, Chen and Chung [10] combined genetic algorithms with fuzzy time series.Aladag et al. [11] and Chen [12] presented a high-order fuzzy time series forecasting model based on adaptive expectations and artificial neural networks, etc. Zhang et al. [13,14] proposed a visibility graph prediction model with the revision of fuzzy logic to improve the precision of the forecasting result.These models always need other facilitating methods to help with the improvement in accuracy.
In fact, the fluctuations of different stock markets have a certain correlation.Therefore, some researchers began to introduce other time series into their forecasting model to improve their forecasting performance.For example, Chen and Hwang [15] presented a two-factor fuzzy time series forecasting model.Later, Lee et al. [16] and Guan et al. [17] presented a two-factor high-order fuzzy time series model.Wang and Chen [18] presented a comprehensive method based on automatic clustering techniques and two-factor high-order fuzzy time series.Singh et al. [19] proposed a model based on two-factor high-order fuzzy time series and artificial neural networks, etc. Obviously, the consideration of other time series improved the performance of the traditional forecasting model.However, more datasets involved more complex and inconsistent information to be described.Thus, some new theories are needed to express the information in this context.
With the increasing need to depict imprecise and inconsistent information, intuitionistic fuzzy set (IFS) [6] theory is among the effective extensions of fuzzy set theory to deal with the vagueness and randomness within the data.To solve the decision-making problems even more effectively and successfully, Smarandache [20] proposed neutrosophic sets (NSs) from the philosophical thinking which consisted of three degrees of truth, indeterminacy, and falsity.Up to this point, the various extensions of NSs have been studied by many researchers to solve multi-criteria decision-making (MCDM) problems [21][22][23][24][25][26][27][28][29][30][31][32][33][34][35][36][37][38].For example, Wang et al. [21,22] and Garg [32] defined single-valued neutrosophic sets (SVNSs) and interval neutrosophic sets (INSs) which are characterized by three real numbers and intervals, respectively.Ye [23] proposed the similarity measures between INSs which are used between each alternative and the ideal alternative to rank the alternatives.Garg [33] also proposed a linguistic single-valued neutrosophic set (LSVNS) to present a decision-making approach.Researchers also found SVNS theory could incorporate with measure theory and be adopted in many real-life situations with great randomness and uncertainty, such as pattern recognition and medical diagnosis by entropy measures [29], similarity measures [34][35][36] and biparametric distance measures [37].However, due to the ambiguity and intricacy of some real-life situations, the truth-membership degree, indeterminacy-membership degree, and falsity membership degree may be represented by several possible values.These above extensions cannot properly solve the problems.Under these circumstances, Wang [25] introduced multi-valued neutrosophic sets (MVNSs) to express the information and improve the operations and comparison methods of MVNSs.MVNSs are characterized by truth-membership, indeterminacy-membership, and false-membership functions that have a set of crisp values in the range [0, 1].In recent years, MVNSs have been applied to complex practical problems.For example, Ji [28] applied MVNSs to describe information on personnel selection.Furthermore, some scholars have applied SVNSs to the financial field to solve the problem of stock Symmetry 2018, 10, 245 3 of 18 market prediction [38].With the consideration of the complexity and uncertainty in the financial field, in this paper, we explore the utility of MVNSs in our proposed method.
In this paper, we propose a novel forecasting model based on MVNSs and two-factor third-order fuzzy logical relationships to forecast the stock market.The major contributions are: (1) using a MVNS to describe the fluctuation pattern of time series, the model could represent the fluctuation of up, equal, and down with degrees of truth, indeterminacy, and falsity introduced by the MVNS, which significantly preserved details of the historical values; (2) measuring the similarities of different fluctuation patterns of different time series by the Hamming distance could avoid the confusion caused by incomplete information from samples; and (3) due to the existence of likeness among similar types of historical values, in this model, we introduce another related time series as a secondary factor to avoid warp and deviation in inferring inherent rules of historical values, which could lead to more comprehensive rules for further forecasting.To illustrate the steps, first, we convert the historical training data of the main factor and the secondary factor, respectively, from the original time series to fluctuation time series by comparing with each data and that of the previous day.Then, we fuzzify the historical training data to form two-factor third-order fuzzy logical relationships based on MVNSs.Next, MVNSs, which represent the two-factor fuzzy logical relationships, can show the possibility of three trends.Finally, the Hamming distance measurement is used to find the most suitable logical rules to predict its future through the previously obtained multi-valued neutrosophic logical relationship and historical data.
The remainder of this paper is organized as follows: in the next section, we review and define some concepts of fuzzy-fluctuation time series and MVNSs.In the third section, a novel approach for forecasting is described based on MVNS theory and hamming distance.In the fourth section, the experimental results of the proposed method are compared with the existing methods and we also use the proposed model to forecast the Taiwan Stock Exchange Capitalization Weighted Stock Index (TAIEX) from 1998 to 2006 and the Shanghai Stock Exchange Composite Index (SHSECI) from 2004 to 2015.The conclusions are discussed in Section 5.

Preliminaries
In this part, the general definitions of a fuzzy fluctuation time series in the model based on MVNSs are outlined.Definition 1.Let L = l 1 , l 2 , . . ., l g be a linguistic set in the universe of discourse U; it can be defined by its membership function, µ L : U → [0,1], where µ L (u i ) denotes the grade of membership of u i , U = {u 1 , u 2 , . . .u i . . . ,u l }.
The fluctuation trends of a stock market can be expressed by a linguistic set L = {l 1 , l 2 , l 3 , l 4 , l 5 } = {down, slightly down, equal, slightly up, up}.The element l i and its subscript i is strictly monotonically increasing [28], so the function can be defined as follows: f : Definition 2. Let F(t)(t = 1, 2, . . .T) be a time series of real numbers, where T is the number of the time series.G(t) is defined as a fluctuation time series, where G(t) = F(t) − F(t − 1).Each element of G(t) can be represented by a fuzzy set S(t)(t = 2, 3, . . .T) as defined in Definition 1. Then we call time series G(t) to be fuzzified into a fuzzy-fluctuation time series (FFTS) S(t).Definition 3. Let S(t) (t = n + 1, n + 2, . . ., T, n ≥ 1) be a FFTS.If S(t) is determined by S(t − 1), S(t − 2), . . .S(t − n), then the fuzzy-fluctuation logical relationship is represented by: S(t − 1), S(t − 2), . . ., S(t − n) → S(t). (1) In the same way, let S(t) (t = n + 1, n + 2, . . ., T, n ≥ 1) be a two-factor FFTS.If the next status of S(t) is caused by the current status of S 1 (t) and S 2 (t), the two-factor nth-order fuzzy-fluctuation is represented by: and it is called the two-factor nth-order fuzzy-fluctuation logical relationship (FFLR) of the fuzzy-fluctuation time series, where S i (t − n), . . ., S i (t − 2), S i (t − 1)(i = 1, 2) is called the left-hand side (LHS) and S(t) is called the right-hand side (RHS) of the FFLR, and S i (k) Definition 4. Let X be a space of objects with a generic element in X denoted by x.A neutrosophic set A in X is characterized by a truth-membership function T A (x), an indeterminacy-membership function I A (x), and a falsity-membership function F A (x).If a neutrosophic set A consists of T A (x), I A (x), F A (x), they can be defined by their membership function, while T A (x), I A (x), F A (x) are subsets of [0, 1], and A can be represented by [18]: 3) be the truth-membership, indeterminacy-membership and falsity-membership of a neutrosophic set A(t), respectively.
The LHS of an nth-order FFLR S(t − n), . . ., S(t − 2), S(t − 1) can be generated by: where w i,j = 1 if S(t − j) = i and 0, otherwise, c i,k represents the corresponding relationship between element l i (l i ∈ L) and the kth membership of a neutrosophic set A(t).Thus, the LHS of a nth-order FFLR S(t − n), . . ., S(t − 2), S(t − 1) can be converted into a neutrosophic set N 1 Definition 6.For S(t) (t = n + 1, n + 2, . . ., T, n ≥ 1) be a FFTS and A(t) be the LHS of a multi-valued neutrosophic logical relationship (MNLR), the FFLRs with the corresponding A(t) can be grouped into a fuzzy-fluctuation logical relationship group (FFLRG) by putting all their RHSs together as on the RHS of the FFLRG.Then, count the RHSs according to their linguistic values.The RHS of the FFLRG can also be converted into a neutrosophic set according to Definition 5.

A Novel Forecasting Model Based on Multi
where l T A , l I A , l F A respectively represent the number of elements in T A , I A , F A .

A Novel Forecasting Model Based on Multi-Valued Neutrosophic Logical Relationships
In this section, we present a novel fuzzy forecasting method based on multi-valued neutrosophic logical relationships and the Hamming distance.The data from January to October in one year are used as the training time series and the data from November to December are used as the testing dataset.The proposed model is now presented as follows and the basic steps of that areshown in Figure 1.In this section, we present a novel fuzzy forecasting method based on multi-valued neutrosophic logical relationships and the Hamming distance.The data from January to October in one year are used as the training time series and the data from November to December are used as the testing dataset.The proposed model is now presented as follows and the basic steps of that areshown in Figure 1.
, +∞), similarly,  2 () can also be divided into five parts,  1 and  2 are, respectively, defined as the whole mean of Step 1: Construct FFTS from the training data of two historical factors.For each element F i (t)(t = 2, 3, . . .T, i = 1, 2) in the historical time series of the two factors, its fluctuation trend is defined by 3, . . .T) which can be fuzzified into a linguistic set {down, equal, up} depending on its range and orientation of the fluctuations.Thus, in the same way, we can also divide it into five ranges, such as {down, slightly down, equal, slightly up, up}, , +∞ , similarly, G 2 (t) can also be divided into five parts, l 1 and l 2 are, respectively, defined as the whole mean of all elements in the fluctuation time series G 1 (t)(t = 2, 3, . . .T) and G 2 (t)(t = 2, 3, . . .T).
Step 2: Determine the two-factor fuzzy fluctuation time series according to Definition 3.Each Si(t)(t > n) can be represented by its previous n days' fuzzy fluctuation numbers, which can be used to establish nth-order FFLRs.
Step 3: According to Definition 4 and Definition 5, we use the MVNS A(t) to express the LHS of each FFLR.Each u i defined in step 1 represents a different magnitude of increase or decrease, so the MVNSs can be obtained by assigning weights to different states.Then, we can generate the RHSs B A(t) for different LHSs, respectively, which are described in Definition 6.Thus, FFLRs of the historical training dataset can convert to MNLRs.
The nth-order fuzzy-fluctuation trends of each point F(i) in the test dataset can be represented by a MVNS A(i).For each A(i), compare A(i) with A(t), respectively, and find the most similar one by using the Hamming distance method described in Definition 7.
Step 4: Choose the corresponding B A(t) as the forecasting rule to forecast the fluctuation value G (i + 1) of the next point according to Definition 8. Finally, obtain the forecasting value by

Forecasting the Taiwan Stock Exchange Capitalization Weighted Stock Index
In this section, we take TAIEX2004 as an example to illustrate the process of forecasting the TAIEX with the proposed method.The TAIEX2004 and the Dow Jones from January to October are respectively used as the training time series of two factors and the data from November to December are used as the testing dataset [39,40].
Step 1: First, we used the historical training data in TAIEX2004 and Dow Jones2004 to calculate the fluctuation trend.The whole mean of the fluctuation numbers of the two training datasets can be calculated to define the intervals.Then, the fluctuation time series of the two factors can be converted into FFTS, respectively.For example, the whole means of the historical dataset of TAIEX2004 and Dow Jones from January to October are 67 and 54.That is to say, l 1 = 67 and l 2 = 54.For example, F1  A1 and A2, respectively).
Step 2: Considering the impact of the previous three days' historical data on future forecasting, we choose the previous three days to establish FFLRs.The third-order FFLRs for the two-factor fuzzy fluctuation time series forecasting model are established based on the FFTS from 2 January 2004 to 30 October 2004, as shown in Tables A1 and A2.
Step 3: To convert the LHSs of the FFLRs in Tables A1 and A2 to MVNSs.Due to the different degree of expression for each S i (t), we assumed that the each pre-defined S i (t) in step 1 corresponds to the different neutrosophic sets, such as {0, 0, 1}, {0, 0.5, 0.5}, {0, 1, 0}, {0.5, 0.5, 0}, and {1, 0, 0}.Then, we group the RHSs of the FFLRs and convert the FFLR to MNLR according to Definitions 5-7.For example, the LHS of FFLR 2,4,4→4 and 2,4,3→3 can be represented by a MVNS {(0.33,0.17),(0.5,0.67), (0.17,0.17)}.Then, the Hamming distance can be used to obtain the most suitable MVNSs.The detailed grouping and converting processes are shown in Figure 2. Step 4: Based on the MNLRs obtained in Step 3, we forecast the test dataset from 1 November to 31 December 2004.For example, from Table 1 the forecasting value of the TAIEX on 1 November 2004 is calculated as follows.
Step 4: Based on the MNLRs obtained in Step 3, we forecast the test dataset from 1 November to 31 December 2004.For example, from Table 1 the forecasting value of the TAIEX on 1 November 2004 is calculated as follows.
The MVNSs on 1 November 2004 is {(0.17,0.33),(0.83,0.67), (0,0)}, then we can find the best rule {(0.17,0.33),(0.83,0.67), (0,0)}→(0,1,0) to forecast its future according to Table A3.Respectively, we calculate the expected number of the MNLR according to Definition 8, the expected value: The fluctuation from current value to next value can be obtained for forecasting by defuzzifying the fluctuation fuzzy number, shown as follows: Finally, the forecasted value can be obtained by the current value and the fluctuation value: The results of the forecasting model are shown in Table 1 and Figure  Step 4: Based on the MNLRs obtained in Step 3, we forecast the test dataset from 1 November to 31 December 2004.For example, from Table 1 the forecasting value of the TAIEX on 1 November 2004 is calculated as follows.
The results of the forecasting model are shown in Table 1 and Figure 3.To confirm the performance of the proposed method, we compare the difference between the forecasted values and the actual values.The performance can be evaluated using the mean squared error (MSE), root of the mean squared error (RMSE), mean absolute error (MAE), mean percentage error (MPE), etc.These indicators are defined by Equations ( 8)-( 11): where n denotes the number of values to be forecasted, and forecast(t) and actual(t) denote the predicted value and actual value at time t, respectively.From Table Let the order of n be 1, 3, 5, 7, 9, from Table 2; we can see that third-order forecasting model is relatively accurate compared to the others.To prove the validity of the proposed method, the TAIEX from 1998 to 2006 is employed to forecast in the same way.The forecasting results and errors are shown in Figure 4 and Table 3.In Table 4, we can verify the model availability by comparing with the RMSEs of different methods for forecasting the TAIEX2004.The advantages of the proposed method are that it does not need to determine the boundary of discourse and the interaction of two factors.The method proposed is simple and suitable for practical application.[41] 73.57Chen and Kao's method [42] 58.17 Cheng et al.'s method [43] 54.24 Chen et al.'s method [44] 56.16 Chen and Chang's method [45] 60.48 Chen and Chen's method [46] 61.94 Yu and Huarng's method [47] 55   In Table 4, we can verify the model availability by comparing with the RMSEs of different methods for forecasting the TAIEX2004.The advantages of the proposed method are that it does not need to determine the boundary of discourse and the interaction of two factors.The method proposed is simple and suitable for practical application.

Forecasting the Shanghai Stock Exchange Composite Index
We applied the method to forecast SHSECI, which occupies an important position in China [48].The Dow Jones was chosen as a secondary factor to build the model.For each year, we used the data from January to October to be the training data, and then we forecast SHSECI from November to December.The RMSE of forecast errors are shown in Table 5.As is shown in Table 5, forecasting the SHSECI stock market obtains great results by using the proposed method.

Conclusions
In this paper, we propose a novel forecasting model for financial forecasting problems based on multi-valued neutrosophic logical relationships and Hamming distance.The major contributions are the usage of a multi-valued neutrosophic set (MVNS).Due to its ability in reflecting the up, equal, and down fluctuation trends, it can efficiently represent the inherent rules of the stock market.Meanwhile, Hamming distances of different MVNS could measure the similarity between different fluctuation patterns.We also applied another related time series as a secondary factor to help with qualifying the prediction of the main stock market.The empirical analysis showed that our model could perform well in forecasting different stock markets in different years.In fact, there are many other factors inside the stock market which can influence the fluctuation patterns.For example, volume fluctuation may also be considered as another facilitating factor.We would also consider applying the model in forecasting other time series, such as university enrollment, power consumption, etc.

Appendix A
Symmetry 2018, 10, x FOR PEER REVIEW 5 of 18
Figure 2. Grouping and converting processes for FFLR.TAIEX: Taiwan Stock Exchange Capitalization Weighted Stock Index. 3.
Figure 2. Grouping and converting processes for FFLR.TAIEX: Taiwan Stock Exchange Capitalization Weighted Stock Index.

Table 2 .
Comparison of forecasting errors for different nth-orders.

Table 4 .
A comparison of RMSEs for different methods for forecasting the TAIEX2004.

Table 4 .
A comparison of RMSEs for different methods for forecasting the TAIEX2004.

Table 5 .
RMSEs of forecast errors for the Shanghai Stock Exchange Composite Index (SHSECI) from 2004 to 2015.

Table A1 .
Historical training data and fuzzified fluctuation data of Taiwan Stock Exchange Capitalization Weighted Stock (TAIEX) 2004.

Table A2 .
Historical training data and fuzzified fluctuation data of Dow Jones 2004.