#### Abstract

Extensive research results of stock market time series using classical fuzzy sets (type-1) are available in the literature. However, type-1 fuzzy sets cannot fully capture the uncertainty associated with stock market developments due to their limited descriptiveness. This paper fills a scientific gap and focuses on type-2 fuzzy logic applied to stock markets. Type-2 fuzzy sets may include additional uncertainty resulting from unclear, uncertain, or inaccurate financial data through which model inputs are calculated. Here we propose four methods based on type-2 fuzzy logic, which differ in the level of uncertainty contained in fuzzy sets and compared with the type-1 fuzzy model. The case study aims to create a model to support investment decisions in Exchange-Traded Funds (ETFs) listed on international equity markets. The created models of type-2 fuzzy logic are compared with the classic type-1 fuzzy logic model. Based on the results of the comparison, it can be said that type-2 fuzzy logic with dual fuzzy sets is able to better describe data from financial time series and provides more accurate outputs. The results reflect the capability and effectiveness of the approach proposed in this document. However, the performance of type-2 fuzzy logic models decreases with the inclusion of increasing uncertainty in fuzzy sets. For further research, it would be appropriate to examine the different levels of uncertainty in the input parameters themselves and monitor the performance of such a modified model.

#### 1. Introduction

The stock market occupies a key position in the economic system of each country. Predicting the future development of the stock market is a key task and an important area of research in the financial field, and thus in the economy as a whole. Stock markets are characterized by nonlinear behavior, including its chaotic nature; therefore the data collected generally show some uncertainty and may be incomplete or even incorrect. Uncertainty is therefore a major challenge in real-world applications, and there is a need for easy access to deal with such vague information, as Shukla et al. [1]. In this paper, attention is focused on the integration of the approach facilitating decisions on the future direction of the stock market through fuzzy logic. Fuzzy set theory was first introduced by Lotfi Zadeh in the 1960s as a way to capture uncertainty and ambiguity. Fuzzy logic can be considered as a generalization of classical set theory. Over time, research has revealed improvements in fuzzy logic that better reflect its true meaning, i.e., the linguistic expression of input variables, including uncertainty stemming from unclear or ambiguous information. This idea has sprung three main representations of fuzzy logic: type-1 fuzzy sets (T1FS), interval type-2 fuzzy sets (IT2FS), and general type-2 fuzzy sets (GT2FS). The first approach is the simplest form of fuzzy logic and also the most widespread and applicable. A more complex approach is represented by IT2FS, where the concept of uncertainty in the form of intervals is introduced. Although computationally complex compared to T1FS, they derive an improvement in the general fuzzy model by being more resistant to external noise, as reported by Castro et al. [2]; Puška et al. [3]; Eren [4]; Tavossi et al. [5].

Fuzzy logic is widely used in many areas not only because it can handle incomplete or uncertain data, but also because its tools have been simplified using parameterized FS. Building fuzzy rules and building the right membership function (MF) have been challenging for decades now. The fuzzy membership feature is a key concept in designing fuzzy systems. Correct and accurate use of the membership function is essential for the reliability of the results obtained. The construction of the member function and the determination of its parameters are therefore still a current problem, as stated by Yankova et al. [6]. The choice of the shape and parameters of the membership functions plays an important role in the fuzzy model, as it can affect the performance of the whole system as a state of Wijayasekara and Manic [7]. Although the user can choose from a large number of shapes of membership functions, the choice of parameters is individual depending on the specific application. This will require expertise or sophisticated methods to fine-tune membership features. In addition, membership functions are, as reported by Kayacan et al. [8], a subjective matter of perceiving vague concepts entering the model. Sadollah [9] further adds that there is still no clear criterion for assessing the appropriateness of choosing the membership function. The MFs can take any shape and form as long as they map the data with the required degree of membership. As for the choice of MF, it is up to us to decide. This is where the fuzzy system offers individual degrees of freedom. With experience, you will learn which MF shape is suitable for the intended application.

In this work, we use type-2 fuzzy sets to overcome this uncertainty and develop a fuzzy system to support stock market investment decisions. This type-2 fuzzy system takes the delayed value of the stock index as inputs, fuzzifies it is using a type-2 fuzzy member function, and implies fuzzy rules in the fuzzy system. The output of the fuzzy system, which is in the form of a type-2 fuzzy membership function, reduced to a type-1 fuzzy membership function, decrypts it to a sharp value and creates decision support for the future development of the monitored stock index. The aim of the paper is to create models based on type-2 fuzzy logic with different levels of uncertainty contained in type-2 fuzzy sets with application to stock markets with subsequent comparison with classical type-1 fuzzy logic. The model will serve as decision support for investors. The purpose is to determine whether IT2FLS provides more accurate results compared to classical T1FLS.

The main contributions of the research can be considered: (1) creation of models that combine different locations of upper and lower functions of type-2 fuzzy logic membership focused on the financial and economic area of interest which has so far been insufficiently researched in terms of the applicability of type-2 fuzzy logic. (3) The model is intended directly to support decision-making regarding investments in Exchange-Traded Funds. We believe that focusing on a specific investment instrument is more suitable for the general investor public and makes it easier to invest your funds in the entire portfolio of assets through a single share than focusing on the stock index. (4) The authors provide an alternative approach to investment evaluation for investment funds compared to classical statistical methods. Our study is organized as follows: Section 1 focuses on a review of the literature applying fuzzy logic in stock markets. Section 2 explains the type-2 fuzzy logic technique, including metrics for evaluating the overall performance and error rate of the model. Section 3 describes the examined data set, including the creation of the IT2FLS model, and Section 4 deals with the subsequent validation and comparison of the created models.

#### 2. Review of the Scientific Literature

Fuzzy logic is used in a wide range of decision-making problems such as risk management, finance, economics, and management, but also in weather forecasting, physics, and many other areas. The usability of fuzzy logic is huge, mainly due to the fact that they allow you to work on the principle of human thinking, unlike neural networks or genetic algorithms. Since the introduction of fuzzy logic prediction models, this method is increasingly used in a number of studies to solve problems related to stock market forecasts or as a support to decision-making tool for investors, analysts, or the general investor public.

An example is the short-term technical business strategy discussed in Chourmouziadis and Chatzoglou [10] using fuzzy logic. The authors focused on the methodology of buying and selling securities without the support of portfolio managers. Ijegwa et al. [11] developed a fuzzy model that, based on technical indicators, provides a signal to buy, sell, or hold an investment. Model outputs provide satisfactory results. Khayamim et al.’s [12] results showed that the proposed fuzzy method responds appropriately to the psychological component of the market. In addition, for all investor profiles, the recommended strategy completely outperforms the market and the remaining strategies. The conditional fuzzy inference approach is used in the study by Hassanniakalager et al. [13]. This approach is used for forecasting under constraint file conditions. Through conditional selection of rules, the model is able to achieve higher performance and interpretability. To predict the Chinese stock index, Sun et al. [14] use fuzzy sets and combine the traditional fuzzy model with the rough set method. This approach, according to the authors, provides better prediction results. Mansour et al. [15] formulated a multiobjective financial portfolio selection approach involving fuzzy parameters, where the distribution options are given by fuzzy numbers from the information provided by the decision environment. Tsai et al. [16], in contrast to traditional methods, use more variables included in the fuzzy model to predict and better reflect the issue of stock volatility. The results suggest that the authors' model with multiple periods is better and provides sufficient decision support for investors. Hasan and Fong [17] introduced some components for improving decision-making through sentiment analysis and simple fuzzy decision-making. The best model was chosen as the basis for a fuzzy decision-making mechanism provided to investors.

Other researchers have focused on hybrid strategies such as the integration of fuzzy logic and neural networks. Examples are the studies of Su and Cheng [18] and Vella and Ng [19]. These authors used adaptive neurofuzzy inference systems (ANFIS), modifying this model to type-2 fuzzy logic instead of classical type-1 fuzzy logic. Vlasenko et al. [20] modify the classical ANFIS model, where in the fourth layer they use multidimensional Gaussian functions instead of polynomials. The experimental results showed clear advantages of the described model and its learning. Dutta [21] states that the nature of stock/capital market data makes it more complex and challenging to predict stock price movements. The study combined both fuzzy c-means and neural network technique for stock price prediction. Research will find the optimal solution for predicting the future share price. A comparison of the complexity of time and space has shown that the proposed method is better than existing methods. Rajab and Sharma [22] focused on the Bombay Stock Exchange, CNX Nifty, and S&P 500 and proposed an effective neurofuzzy model for their prediction. The authors point out that the hybrid model strikes a better balance between accuracy and interpretability. In her study, Janková [23] discusses the design of a neurofuzzy model to support decision-making when investing in investment instruments listed on the stock exchange in the Czech Republic. Empirical results show that the neurofuzzy model behaves more naturally than other statistical tools that simulate the decision-making process in stock trading without increasing the risk in the form of the investor's subjective judgment. Similarly, García et al. [24] demonstrate the suitability of the implementation of technical indicators and their predictive ability on the German stock index DAX-30 using a hybrid neurofuzzy model. In addition to the accuracy of the model, the authors also highlight the creation of less risky strategies, which are more profitable than using other methods.

The above study demonstrated exclusively the use of type-1 fuzzy logic, which is represented by membership functions or fuzzy sets ranging from zero to one. Such membership functions represent a precise point or exact degree of membership. However, this leads to problems with the inclusion of additional uncertainty and unclear information that enters the model according to Jiang et al. [25]. Therefore, type-2 fuzzy sets have been introduced that allow the uncertainty of the associated degrees of membership to solve the uncertainty problems of Liu et al. [26]. The proposed models based on the type-2 fuzzy system are used in finding solutions to some known problems reported in the literature, as described by Sumati et al. [27]. An example of using type-2 fuzzy logic is given in the following paragraph.

Jiang et al. [25] propose an interval type-2 fuzzy system for stock index prediction based on fuzzy time series and fuzzy logical relationship map (FLRM). The authors applied this methodology to data from the Taiwan Stock Exchange Capitalization Weighted Stock Index, the Dow Jones Industrial Average, and the National Association of Securities Dealers Automated Quotation. The outputs of the authors point out that the chosen method of solution exceeds classical statistical methods. Huarng and Yu [28] study their extension of type-1 fuzzy time series models to type-2 models. They designed a type-2 model for TAIEX index prediction. In this model, additional observations were made to refine the FLRs obtained from the type-1 model, resulting in better predictive performance. The authors' empirical evidence points to a lower error rate measured by RMSE type-2 than in the case of type-1 fuzzy logic. Similar results are presented by Bajestani and Zare [29], adding that this new type of fuzzy logic is more efficient than previous methods. Liu et al. [26] modified the classical hybrid neurofuzzy model and integrated a type-2 fuzzy set into it, which they used to predict the TAIEX index. The obtained knowledge points to a higher accuracy of the prognosis of this hybrid model than to the individual approaches alone. Zarandi et al. [30] developed an expert system based on type-2 fuzzy rules in their article for stock price analysis. They used a type-2 fuzzy model to predict the company's stock prices in Asia. The results of the forecast of price deviations are very encouraging. The genetic system of type-2 fuzzy logic was introduced in Bernardo et al. [31]. The authors used this hybrid model for prediction and modeling in the field of finance. This model overcame the white box problem and provided comparable performance to black box models. Janková and Dostál [32] apply IT2FL on the Czech stock market and they are used when deciding on investing in shares of the PX index. The proposed type-2 fuzzy model uses the return and risk of investment instruments as input variables. The created system is able to generate aggregated models from a number of language rules, which allows the investor to understand the created financial model. The use of T2FLS can lead to more realistic and accurate results than T1FLS. Another hybrid approach to IT2FLS was provided by Hasan et al. [33]. Their results correspond to similar outputs of other authors. Thus, it can be stated that type-2 fuzzy logic is able to improve the performance of existing models.

#### 3. Type-2 Fuzzy Logic System

Quantification of sustainability data is very difficult; therefore, the evaluation of this data requires a personal point of view, namely, the evaluation by experienced experts in the field who provide a relevant opinion. In addition, sustainability data are often imperfect or inaccessible. This problem can be solved by fuzzy logic, the main advantage of which is that it allows language evaluation of each indicator. In order to implement the required assessment technique, methodologies should provide flexibility regarding the set of indicators applied, recognize data uncertainty, and mimic the human cognitive ability to assign scores to evaluated scores. This is essential for the holistic sustainability of evaluation and the associated large-scale impacts, as stated [34].

Fuzzy logic is based on the ability to deal with highly uncertain, inaccurate, or chaotic data files. Zadeh [34] has developed acceptable techniques for characterizing this uncertainty through fuzzy sets instead of complex mathematical formulations. The obvious advantage of fuzzy models is the ability to present data through linguistic qualitative concepts rather than quantitative data [35]. Fuzzy logic consists of three basic mechanisms, which are fuzzification, inference engine, and defuzzification. The relationship of these components is schematically illustrated in Figure 1, including fuzzy logic operators, member functions, and fuzzy rules. Member functions allow you to demonstrate a fuzzy set. In addition, fuzzy “if-then” rules represent the views and opinions of experts in their field that can be easily calculated.

The method of fuzzy logic allows the system to take advantage of modeling an environment that mimics human cognitive behavior and to enable language input in recognizing record uncertainty. The goal of FLS is therefore to provide a person with a descriptive understanding of problem solving. Without losing the generality, it is a fuzzy set of elements that allow their members different degrees of membership in the range [0, 1]. The degree of similarity of each input variable in such a fuzzy set is thus given by the membership function [36, 37]. A type-1 fuzzy membership function is defined by accurate and sharp values in the range [0, 1], while type-2 fuzzy membership function can be designed for each input variable in domain *x*. Furthermore, it can be stated that the T2FLS membership function can handle a higher level of uncertainty compared to the T2FLS membership function [38]. This is achieved by incorporating different degrees of footprint of uncertainty (FOU) combined with the three-dimensional nature of type-2 fuzzy sets. The secondary membership function is linked to the degree of membership. When this secondary member function takes the maximum uncertainty 1 in a certain interval [a, b], a fuzzy set of a type-2 interval is formed. The key elements of the interval type-2 fuzzy sets are footprint of uncertainty (FOU), upper membership function (UMF), and lower membership function (LMF). Note that the maximum uncertainty expressed in the secondary membership function is equal to 1, so a fuzzy set of type-2 intervals can be simplified. Fuzzy sets are associated with linguistic terms that form part of fuzzy rules that are conditioned by statements [39].

The T2FLS structure is very similar to the T1FLS structure. The measured real variables are first transformed in a fuzzification block into linguistic variables, with the linguistic variables based on the basic linguistic variables. Janková et al. [40] state that three to seven attributes of this basic variable are usually used. The degree of attribute of a given variable in a set is represented by a mathematical function. Three types of fuzzification are available in T2FLS. If the measured data is perfect, modeled as a sharp set, data with noise and data with stationary noise are modeled as type-1 fuzzy sets, with nonstationary noise modeled as type-2 fuzzy sets. The latter type of fuzzification cannot be performed in T1FLS.

Type-2 fuzzy logic systems are represented by the possibility of a distribution function that can be written, according to Sang et al. [41] and Mendel et al. [42], such aswhere *x* is the first variable, is the first fuzzy possibility of , is the second variable, and is secondary fuzzy possibility distribution at .

Mendel [43] defines the IT2FLS method, in which they use a generalized interval fuzzy set interval. The requirement for secondary possibility distribution is a condition of normality, which means that the *X* elements are fully distributed for *x*, which are defined as follows: IT2FLS iswhere *x* is the first variable, is the first possibility distribution of , is the second variable, and is secondary possibility distribution at .

For IT2FLS are upper possibility distribution and lower possibility distribution , type-1 possibility distribution, the footprint uncertainty of is defined as [42]

IT2FLS , where and are fuzzy sets of type-1, are reference points of the IT2FLS, indicates the possible value of the element in the upper possibility function, indicates the possibility value of the element in lower possibility function, , and . And the lower possibility distribution and the upper possibility distribution can be denoted as

The comparison method for IT2FLS is described below, which is based on the assumption of an uncertain average and variation coefficient. For all , whose possibility uncertainty mean value is defined, according to Sang and Liu [44], where possibility uncertainty mean of the upper membership function and lower membership function are, respectively, written as is an increasing function satisfying , and .

For all IT2FLS, as further reported by Sang and Liu [44], the coefficient of variation of possibility uncertainty is defined aswhere is an extremely small value to present the approximate is the variation values. This expression is defined aswhere is an increasing function satisfying , and .

Let and be two IT2FLS, whose comparison criteria are defined according to Sang and Liu [44] as follows:

It is denoted that > means “larger than” in the sense of order, < means “less than” in the sense of order, and ∼ means “same order”.

##### 3.1. Evaluation of the Accuracy of the Model

The model can be used in practice if the verification shows that the model provides accurate results. The following metrics are used to verify and evaluate the accuracy or error rate of individual MFs. For this reason, the RMSE indicator is used, which is focused on comparing the original data with the data generated by the model. The Mean Absolute Percentage Error (MAPE), Mean Absolute Error (MAE), Relative Root Mean Squared Error (RMSE), and Mean Squared Error (MSE) indicators are also used. These metrics are used to evaluate which type of MF and which level of uncertainty provide the best results for analyzing a stock market that exhibits a specific feature, as described by Soto et al. [45] and Bas et al. [46].

The formulas of these evaluations are shown below:

#### 4. Data and Methodology

It is well known that the stock market is a dynamic system exhibiting chaotic behavior, which makes it very difficult to predict its future development. In particular, nonlinear and complex laws limit quick decisions on the right investments. For this reason, many researchers are focusing on developing an intelligent system that is able to reduce the amount of risk in the market that results from its nonlinear nature. For this reason, alternative techniques are increasingly used in stock market modeling and analysis, including fuzzy logic, which is able to include the uncertainty, nonlinearity, and noise that occur in financial time series. The study focuses on the application of interval type-2 fuzzy logic as a sophisticated tool that is able to intuitively model human judgment through linguistic values in combination with quantitative data, as reported by Ulubeyli and Kazaz [47]. Fuzzy logic allows you to better express preferences and subjective opinions when making decisions. In other words, if objective facts cannot be accurately identified, at least its scope of membership can be defined. The fuzzy logic interval operates with approximate numerical data used for decision-making, as stated by Liu [48].

##### 4.1. Description and Processing of the Dataset

For testing interval type-2 fuzzy logic system, which in this paper serves to create a model to support decision-making in investment instruments, a data set of 40 Exchange-Traded Funds (ETFs) from four continents over the last 5 years, i.e., from 2015 to 2019, is selected. Monthly data is used. Specifically, the 10 most powerful ETFs are selected from each continent of Europe, USA, and Asia-Pacific and Emerging markets. ETFs are basically index funds, which represent an alternative way of investing for institutional and retail investors. The most important characteristic of Exchange-Traded Funds is, as the name suggests, the fact that they are traded similarly to shares on the stock exchange. They are valued and traded on an ongoing basis throughout the trading day, allowing investors to buy or sell without delay. Exchange-Traded Funds invest in a defined index, or baskets of assets, thus allowing investors to invest in the entire portfolio using a single share. Originally, they were established as passive funds with the aim of replicating the underlying benchmark as faithfully as possible; however, in recent years, ETFs with active management have also expanded to outperform the underlying index or basket of assets.

Figure 2 shows a PMFG graph from a pairwise correlation matrix based on the monthly data of all 40 examined ETFs. This graph is the first extension of the Minimum Spanning Tree (MST) and the full name is Planar Maximally Filtered Graph. PMFG is a comprehensive network that was first introduced in Tumminello et al. [49] and Aste et al. [50]. In this case, the degree of similarity of the ETFs is given by the Person correlation coefficient. Individual ETFs are marked according to ticker. A lighter color indicates a stronger correlation between the funds. Conversely, a darker color indicates independence or even a negative correlation between individual ETFs. The largest correlation is between European, American, and Asia-Pacific funds. ETFs from Europe and Asia-Pacific correlate more positively. On the contrary, the positive correlation between the USA and Europe or Asia-Pacific is not so dominant. Conversely, some Emerging markets ETFs even have a negative correlation with all other funds.

Table 1 shows the basic characteristics of ETFs by continents. The table shows that ETFs from the USA have the highest return with an average return of 65.59%, followed by funds from the Asia-Pacific continent with an average return of 23.46%. The lowest average return was achieved by ETFs from Emerging markets with a value of 7.88%. In terms of fluctuations in returns or riskiness of the fund represented by the standard deviation, ETFs from Asia-Pacific are calculated to be the riskiest. Paradoxically, although US funds have the highest returns, they also have the lowest risks. In terms of total cost ratio, measured by the total expansion ratio (TER), ETFs from the US show the lowest cost on average, followed by ETFs from Europe. On the contrary, similar costs above 0.5% are achieved by ETFs from the Asia-Pacific and Emerging markets. Despite these values, all analyzed ETFs show a low overall cost compared to mutual funds, which is one of the main advantages of these Exchange-Traded Funds. Selected ETFs are then compared with their underlying indices. All analyzed funds are equity, so to determine the coefficient of determination and subsequent indicators, the underlying index specified in the fund's articles of association is chosen, or the best alternative is chosen according to the availability of data. Funds from the USA with a value of the coefficient of determination of 0.94 best replicate their benchmarks. From this point of view, it can be assumed that the deviation from the underlying index is very small. Both underlying assets and ETFs from Emerging markets replicate relatively well. ETFs from Europe and the Asia-Pacific continent show the same value of the coefficient of determination with a value of 0.76. The last of the analyzed indicators in Table 1 is the beta coefficient. A beta coefficient value higher than 1 means that the fund is able to outperform the market and these are cyclical funds, while a value below 1 indicates anticyclical funds that do not achieve comparable or higher performance in a bull market, respectively. They are unable to outperform the market. On the contrary, these funds are suitable at a time of a bear market, when they limit losses compared to the market as a whole. It can be noted that values above 1 are achieved by ETFs from Asia-Pacific and Emerging market, respectively, and basically the USA. On the contrary, funds from Europe with a beta coefficient of 0.95 lag behind the market, which can be attributed to the not very good replication of benchmarks.

##### 4.2. Calculation of Input Variables

The indicators are then selected as input variables into the interval type-2 fuzzy model, which are explained in Table 2 and scored in Table 3. Based on the analyzed ETFs, indicators of return, risk, and performance are calculated. Subsequently, the results are summarized according to the individual continents and the average score is determined for each indicator separately. The higher the point rating is, the higher the ETF achieves higher returns, higher risk, or higher performance.

From Table 3 it is clear that the highest annual return is achieved by ETFs from the USA, which has already resulted from Table 1. It is also evident that ETFs from the USA also show the highest return above risk-free rate and also have the highest telling value in the form of information ratio. On the contrary, ETFs from Europe show the highest return above benchmark. In terms of overall profitability indicators, ETFs from Emerging markets are the worst off. In terms of risk, they clearly dominate with the lowest score, and thus the lowest risk, through standard deviation, specific and systematic risk, and ETFs from the US. A similarly low risk can be seen with ETFs from Europe. Therefore, it can be concluded that especially American and European ETFs have an almost perfectly diversified portfolio. ETFs from Emerging markets show the greatest systematic risk, while the greatest specific risk and standard deviation can be seen in ETFs from Asia-Pacific. The specific risk can be diversified with a suitable composition of investment instruments. Therefore, the reason may be the inadequate number of constituents included in the portfolio, but also the poor management of the asset manager of the ETF from the Asia-Pacific continent. The tracking error indicator is derived from the return above the benchmark, which expresses the volatility of the differences in the performance of the fund and the benchmark by means of a standard deviation. It is desirable that the value of this indicator for passively managed ETFs be as small as possible. The absolute best results were achieved by ETFs from the USA, which perfectly replicate the underlying benchmarks. On the contrary, funds from the Asia-Pacific continent are worse off. The chart also shows the ratios that represent the fund's performance. The Treynor ratio expresses the reward for volatility. Therefore, a higher score is desirable, which means higher performance of the fund. All analyzed continents show very similar points. However, the US is the worst off, which may be surprising given the claims made so far. The reason can be seen in the fact that the shortcoming of the Treynor ratio is that it completely ignores the unique risk, as it presupposes a perfect diversification of the portfolio. Jensen's alpha expresses the added value of the fund manager to achieve a higher return than the market return, taking into account the sensitivity of the fund to the movement of the entire market represented by the beta coefficient. If alpha shows positive values, it indicates the ability of the fund manager to beat the market and better deal with systematic risk; with a negative alpha, active portfolio management fails. All analyzed funds managed to outperform the market represented by the reference index. ETFs from the Asia-Pacific market achieved the highest score. The last indicator is the Appraisal ratio. This indicator evaluates the quality selection of equities for the fund's portfolio by the manager and focuses on the nondiversified part of the portfolio.

#### 5. Creating the IT2FLS Model

In particular, the stock market works with vague concepts, so it is appropriate to use fuzzy logic, which is able to contain this data, as a decision support. The MATLAB software toolbox is used to create a type-2 fuzzy model. The fuzzy model for examining equity ETFs consists of three input variables (return, risk, and performance), one block of rules, and one output variable to determine whether or not it is appropriate to invest in the ETFs. This model is shown in Figure 3, with the figure showing that each of the three input indicators consists of other indicators, which were described in Section 3. The aim is to create a suitable, clear, and accurate model based on IT2FLS, which will serve as a support for investors to decide whether or not to invest in ETFs according to input parameters.

A fuzzy inference system of the Mamdani type is chosen for the creation of the model, because it is able to work better and more intuitively with unstructured or poorly structured data inputs than the Sugeno type. In addition, it is able to imitate human thinking and comprehensively describe the system using natural language. This type of output is sufficient to interpret stock ETF analysis. Each input variable is represented by a Gaussian membership function (MF), which consists of fuzzy sets containing a total of five linguistic fuzzy values or attributes: VL: very low, *L*: low, *M*: medium, H: high, and VH: very high. Input 1 represents the overall return of the ETF, input 2 represents the overall riskiness of the ETF, and finally input 3 indicates the overall performance of the ETF examined on three continents, namely, Europe, the USA, Asia-Pacific, and Emerging markets. The output variable is also represented through the five attributes of the member function based on the point rating, namely, S: sell (0 points), RS: rather sell, H: hold, RB: rather buy, and B: buy (100 points). Member functions are in the range [0; 1] and are used to create fuzzy models with different degrees of uncertainty. Table 4 shows examples of input variables and output variables by means of numerical values as well as linguistic expressions corresponding to the attributes of MF.

As an example, the first ETF can be described, which in terms of input 1 achieves a score of 35.85 points, or the total return for this ETF is medium. Input 2 expresses the overall riskiness of a particular ETF with a score of 24.35, which is a fuzzy set with low risk. Input 3 evaluates the overall performance with the total point score of the given ETF 33.11 or according to the fuzzy notation it is a high score. The recommendation for the ETF is a score of 80, which means rather buy. A similar procedure can be used for all other analyzed ETFs.

#### 6. Results and Evaluations

This study focuses on IT2FL, which consists of dual membership functions containing upper and lower MFs, with the space between these MFs being filled with additional FOU uncertainty. According to the literature mentioned in Section 1, the use of IT2FL should bring more accurate results, especially for use in a stock market that contains a high degree of uncertainty. Several representative models were selected to evaluate the accuracy of the generated IT2FLs. In total, 5 models are created and tested, which differ in the level and degree of uncertainty contained in the type-2 fuzzy sets. The functions of membership depend on the scope and depth of knowledge of the problem being solved, as well as on the context in which the problem is solved.(i)Model 1: T1FLS or IT2FLS with 0% uncertainty in MF,(ii)Model 2: IT2FLS with 10% uncertainty in MF,(iii)Model 3: IT2FLS with 20% uncertainty in MF,(iv)Model 4: IT2FLS with 30% uncertainty in MF,(v)Model 5: IT2FLS with 40% uncertainty in MF.

Other models with higher uncertainty were not considered relevant by the authors of the paper. Subsequently, to evaluate the created models, it is necessary to determine the knowledge base or block of rules. The knowledge base representing rules in the form “if - then” expresses expert knowledge about the relationship between input variables and output variables. A total of 125 rules are created, based on which the created models are evaluated. The block of rules is determined by experts and authors of the article. The rules represent a knowledge base that describes the behavior of the entire fuzzy system. For this reason, it is necessary to describe the whole issue using a sufficient number of rules. These rules were generated by experts in the field. The result is the assignment of a verbal description to the output variables based on the knowledge base. In other words, the input data is converted to output data using these rules. The defuzzification part of the model sets out the final assessment, which serves as a decision support for investors whether to invest in the ETF or not. The specific defuzzification value from all 5 models is given in Table 4; the values given correspond to the input values, which are given in Table 3. In particular, an ETF with a total return of 35.85 points, a total risk of 24.35 points, and a total performance of 33.11 points should have a score of 80 points with a rather buy recommendation. Model 1, i.e., the classic T1FLS, sets the total value of the result at 70 points. Models 2 and 3, i.e., IT2FLS with 10% and 20% uncertainty, contained in the MF give a result of 75 points. Models 4 and 5, based on the knowledge base and the uncertainty contained in the MF, give a final score of 74 points. Thus, specifically for this fund, the recommendation for all models is rather buy, while the most accurate results were achieved by models with 10% and 20% uncertainty. Similarly, other examples of ETFs entering the models can be analyzed.

From Table 5 it can be further noted that the differences in the point evaluation of the results are not very different for all examined models. Especially for IT2FLS models, the results differ by 1 to 3 points, which is not a big difference. To evaluate the performance of the analyzed models, the selected metrics are listed in Section 2.3. The results of evaluation and comparison of models are given in Tables 6–10. The tables also show MFs with different levels of uncertainty. The figure also shows how the distance between the individual functions gradually increases with the addition of uncertainty.

Table 6 shows an evaluation of the error rate and performance of the T1FLS model. The RMSE indicator is used to compare the quality of models. Equation (12) is used to calculate it. A lower RMSE value indicates a better model. Model 1 shows the value of this indicator is 15.43. Compared to other models, T1FLS shows the worst result or other IT2FLS models containing uncertainty in membership functions provide better results than the classic fuzzy model. Indicator value for model 1, the MAE value calculated based on equation (14), is set to 12.1. In terms of this indicator, model 1 achieves the highest error rate and deviates the most from reality compared to all other models. The last indicator used to compare the created models is the MAPE indicator calculated on the basis of equation (13). The value of the MAPE indicator is a dimensionless characteristic by which different models can be compared. Even with this indicator, the T1FLS model achieves the worst results with a value of 13.95 compared to other models.

Table 7 evaluates the indicators described above for the IT2FLS model with a degree of uncertainty of 10%. The figures captured in this table already show the difference between the upper and lower membership function. This space is filled with additional uncertainty resulting from uncertain data coming from the stock market. It is clear that model 2 shows the lowest values of all examined indicators. Specifically, the RMSE indicator indicates the value for this model is 12.15, i.e., the best model when compared to other IT2FLS models. The MAE and MAPE error indicators are also the lowest, so the model with 10% uncertainty shows the smallest deviation from the original result and is best able to serve as a decision support for investors regarding investments in ETFs.

Table 8 evaluates the performance of model 3 with 20% uncertainty included in the MF. Although this model is worse than model 2, it still provides much better results than T1FLS, as well as other models with a higher degree of uncertainty in MF. In addition, it can be stated that the difference in performance between the best model (model 2) and model 3 is very small to negligible in our case. Because RMSE is 12.32, MAE is 9.29, and MAPE is 10.88, looking back at Table 6, there is a minimal difference in performance and in any case, using this model would not significantly distort the final assessment of whether or not to invest in ETFs.

The evaluation of the penultimate model is given in Table 9, which evaluates a model containing 30% uncertainty in MF. A higher degree of uncertainty is also evident from the MFs shown in the figure, which are more distant from each other than in the other models described earlier. Also, in this model, as in model 3, there is a deterioration in performance according to the error indicators MAE (9.47) and MAPE (9.47) and the performance indicator RMSE (11.02).

The last model examined is model 5 containing the highest degree of uncertainty or the most distant fuzzy MF. It is also the model with the worst performance compared to other IT2FLS models. However, even this model still achieves much better results than the classic T1FLS model. Type-2 fuzzy logic features three-dimensional shapes of membership functions. These duplicate membership functions are able to include additional uncertainty resulting from insufficient information. They are used especially when it is difficult to determine the exact shape and location of membership functions. Using these functions, type-2 fuzzy logic is severely limited mainly due to the increasing computational complexity associated with their implementation.

Figure 4 captures the surface of the three input variables: overall return, overall risk, and overall performance of the analyzed ETFs in relation to the overall model outcome. It is clear from the figure that the higher the fund's performance score and the lower the fund's risk score (Figure 4(a)), the more recommended it is to invest in ETFs. On the contrary, the higher the risk rating and the lower the performance score (Figure 4(b)), the more recommended it is, according to the results of IT2FLS, not to invest in ETFs or sell ETF shares. The last combination concerns performance and return (Figure 4(c)). In the case of the mean values of these variables, the investor is advised to hold ETF shares or refrain from any action, whether in terms of sale or purchase.

**(a)**

**(b)**

**(c)**

#### 7. Conclusion and Future Search

The presented paper tried to apply a sophisticated method that is rarely used in the financial field and points out to the general investor public the possibility of using it to successfully analyze the stock market based on intuitive behavior. We present specific advanced methods of fuzzy logic for decision-making areas for successful investing. Conventional methods for decision support in various fields require accurate and unambiguous numerical evaluation. However, an accurate numerical assessment may not fully reflect the real preferences of decision-makers. People are often sensitive to intuitive judgments based on an individual's experience and knowledge. It offers a suitable alternative to use the method of evaluation, which is able to evaluate verbal descriptions and expressions. This achieves a subjective expression of the decision-maker on the basis of their own judgments. A fuzzy logic tool is suitable for this purpose.

In this research, a new fuzzy time series model is used to predict stock market prices. The proposed model is based on the type-2 fuzzy logic approach. The proposed model is verified using experimental data sets originating from stock markets from different continents. Specifically, this study focuses on Exchange-Traded Funds (ETF) shares. These investment instruments provide investors with better performance due to their nature compared to traditional mutual funds. In addition, the authors believe that the use of ETFs will provide more realistic results for investors. Because the majority of the contributions examined focus exclusively on the stock index, in which it is not easy to invest, an alternative to investing in stock indices is ETFs, which try to replicate the underlying benchmarks as faithfully as possible.

The aim of the papers was to create a model based on type-2 fuzzy logic, which has not yet been sufficiently researched in the literature. Moreover, in the context of the ETF, such a model was not created at all according to the authors' findings. Based on the time series examined by the ETFs over a five-year period, indicators were compiled, which are summarized into three input variables entering the model: indicators of overall return, overall risk, and overall performance. Based on expert judgment, a knowledge base or a set of rules was determined, on the basis of which the overall model is compiled. The result of the model is a recommendation for potential investors whether or not to invest in ETF shares based on set parameters.

The created models of type-2 fuzzy logic are compared with the classic type-1 fuzzy logic model. Based on the evaluation and comparison of different degrees of uncertainty in fuzzy sets, it can be stated that the analysis of the stock market represented by the ETF is best suited to the MF with 10% uncertainty. Based on the results of the comparison, it can be said that type-2 fuzzy logic with dual membership functions is able to better describe data from financial time series. However, the performance of type-2 fuzzy logic models decreases with the inclusion of increasing uncertainty in fuzzy sets, as evidenced by a comparison of MAPE, MSE, and RMSE performance indicators, where in other 20%, 30%, and 40% models levels of uncertainty continue to increase. However, the increase in these indicators is not significant and in no way will affect the overall decision for investors whether to invest in ETFs or not. Based on the results of the comparison, it can be said that type-2 fuzzy logic with dual fuzzy sets is able to better describe data from financial time series and provides more accurate outputs. The results reflect the capability and effectiveness of the approach proposed in this document. However, the performance of type-2 fuzzy logic models decreases with the inclusion of increasing uncertainty in fuzzy sets.

However, it is necessary to point out the weaknesses and limitations of our research. As described in previous research, when applying fuzzy methods, fuzzy rules are established and defined through human judgment and may involve a degree of subjectivity. However, this process of setting fuzzy rules and defining membership functions can be time consuming. For this reason, some other techniques and methods are being promoted that will facilitate the process of setting fuzzy rules. For example, machine learning techniques (e.g., decision tree) or combinations of fuzzy logic and neural networks (e.g., ANFIS) are used in the literature for this purpose, which are able to generate a set of fuzzy rules automatically. Model with a larger number of variables, the number of fuzzy rules that need to be defined logically, increases, thus increasing computational complexity and increasing the time required for computation. Inherent limitations in the selection of a database concerns in particular the input data. Another limitation concerns especially the fuzzy logic itself, as it is an approach that is not able to learn and has no memory. In addition, the results of the fuzzy model can be skewed due to the choice of multiple shapes and numbers of member functions.

For further research, it would be appropriate to examine the different levels of uncertainty in the input parameters themselves and monitor the performance of such a modified model. It would be appropriate to examine different types of fuzzy sets, not just the Gaussian function of membership, which is demonstrated in this study, and to monitor the validity and accuracy of different types of fuzzy sets that can improve the model. Furthermore, it would be appropriate to focus the paper on a larger dataset using, for example, stocks or stocks of continental companies, as most studies still concern Anglo-Saxon companies**.** Last but not least, it would be appropriate to revise the further developed model and integrate it, for example, with neural networks.

#### Data Availability

The authors provide relevant data of calculation used to support the findings of this study in the Supplementary Information files.

#### Conflicts of Interest

The authors declare that there are no conflicts of interest regarding the publication of this paper.

#### Acknowledgments

This paper was supported by project No. FP-S-20-6376 ‘Modeling and optimization of business processes in conditions of digital transformation’ from the Internal Grant Agency at Brno University of Technology.

#### Supplementary Materials

The manuscript is accompanied by Supplementary Materials containing a raw data set, which is used for financial analysis, processed, and used as inputs to the model.* (Supplementary Materials)*